Summary: | [PATCH] XWPFWordExtractor does not extract footnote references | ||
---|---|---|---|
Product: | POI | Reporter: | Andrey Hihlovskiy <akhikhl> |
Component: | XWPF | Assignee: | POI Developers List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 3.9-dev | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux | ||
Attachments: | svn patch |
Created attachment 29508 [details] svn patch Problem: Say, source docx file contains a text with a footnote. XWPFWordExtractor extracts the footnote just fine, but location of the footnote reference is lost. Example: extractor.getText() on "test-data/document/footnotes.docx" returns: "Eto ochen prostoy text so snoskoy [1: snoska]" The position just after the word "prostoy" contains footnote reference, but the returned text does not contain such reference. Suggested improvement: Let's insert a footnote reference into output text, for example, like this: "Eto ochen prostoy[fnote:1] text so snoskoy [1: snoska]" The footnotes marked such way could be used for accurate rendering in HTML (or any other relevant format). Solution: attached patch contains change for "XWPFRun.java" and relevant test in "TestXWPFWordExtractor.java".