Bug 49446

Summary: [patch] please don't insert field codes in the XWPFWordExtractor output
Product: POI Reporter: Antoni Mylka <antoni.mylka>
Component: XWPFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.6-dev   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: a patch
A test case, to be placed in test-data/document

Description Antoni Mylka 2010-06-16 08:56:02 UTC
Created attachment 25597 [details]
a patch

The OpenXML specification defines in sec. 17.16.23 a w:instrText tag. It contains field codes which are usually uninteresting for consumers of the fulltext. In the XMLBeans model they show up as instances of CText.

I suggest that the XWPFParagraph.readNewText method should take this into account.

A patch is attached.
Comment 1 Antoni Mylka 2010-06-16 08:57:09 UTC
Created attachment 25598 [details]
A test case, to be placed in test-data/document

added a sample docx file with AUTHOR and CREATEDATE fields
Comment 2 Antoni Mylka 2010-06-24 04:57:34 UTC
Comment on attachment 25597 [details]
a patch

Enabled the "patch" checkbox on the poi-fieldcodes.patch attachment.
Comment 3 Nick Burch 2010-06-29 09:39:21 UTC
Thanks for the patch, applied in r958965.