List of usage examples for org.apache.poi.xwpf.usermodel XWPFRelation STYLES
XWPFRelation STYLES
To view the source code for org.apache.poi.xwpf.usermodel XWPFRelation STYLES.
Click Source Link
From source file:org.apache.tika.parser.microsoft.ooxml.SXWPFWordExtractorDecorator.java
License:Apache License
private XWPFStylesShim loadStyles(PackagePart packagePart) { try {/*www. j a v a 2 s . co m*/ PackageRelationshipCollection stylesParts = packagePart .getRelationshipsByType(XWPFRelation.STYLES.getRelation()); if (stylesParts.size() > 0) { PackageRelationship stylesRelationShip = stylesParts.getRelationship(0); if (stylesRelationShip == null) { return null; } PackagePart stylesPart = packagePart.getRelatedPart(stylesRelationShip); if (stylesPart == null) { return null; } return new XWPFStylesShim(stylesPart, context); } } catch (OpenXML4JException e) { //swallow } return null; }