File tree 1 file changed +8
-1
lines changed
tika-parsers/src/main/java/org/apache/tika/parser/microsoft/ooxml
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 28
28
import org .apache .poi .xwpf .usermodel .XWPFParagraph ;
29
29
import org .apache .tika .sax .XHTMLContentHandler ;
30
30
import org .apache .xmlbeans .XmlException ;
31
+ import org .openxmlformats .schemas .wordprocessingml .x2006 .main .CTBookmark ;
31
32
import org .openxmlformats .schemas .wordprocessingml .x2006 .main .CTP ;
32
33
import org .openxmlformats .schemas .wordprocessingml .x2006 .main .CTRow ;
33
34
import org .openxmlformats .schemas .wordprocessingml .x2006 .main .CTSectPr ;
@@ -70,9 +71,15 @@ protected void buildXHTML(XHTMLContentHandler xhtml)
70
71
new XWPFHeaderFooterPolicy (document , ctSectPr );
71
72
extractHeaders (xhtml , headerFooterPolicy );
72
73
}
73
-
74
+
74
75
XWPFParagraphDecorator decorator = new XWPFCommentsDecorator (
75
76
new XWPFHyperlinkDecorator (paragraph , null , true ));
77
+
78
+ CTBookmark [] bookmarks = paragraph .getCTP ().getBookmarkStartArray ();
79
+ for (CTBookmark bookmark : bookmarks ) {
80
+ xhtml .element ("p" , bookmark .getName ());
81
+ }
82
+
76
83
xhtml .element ("p" , decorator .getText ());
77
84
78
85
if (ctSectPr != null ) {
You can’t perform that action at this time.
0 commit comments