// Is this a paragraph, or a heading?
String tag = "p";
String styleClass = null;
if(paragraph.getStyleID() != null) {
XWPFStyle style = styles.getStyle(
paragraph.getStyleID()
);
if (style != null && style.getName() != null) {
TagAndStyle tas = WordExtractor.buildParagraphTagAndStyle(
style.getName(), paragraph.getPartType() == BodyType.TABLECELL
);
tag = tas.getTag();
styleClass = tas.getStyleClass();
}
}