https://bz.apache.org/bugzilla/show_bug.cgi?id=64561
Bug ID: 64561 Summary: [PATCH] XWPFSDTContent.getText() is empty for nested SDT elements Product: POI Version: unspecified Hardware: PC Status: NEW Severity: normal Priority: P2 Component: XWPF Assignee: dev@poi.apache.org Reporter: c.sterna...@gmail.com Target Milestone: --- Created attachment 37331 --> https://bz.apache.org/bugzilla/attachment.cgi?id=37331&action=edit patch produced by SVN diff The current implementation of XWPFSDTContent, more specifically its constructor public XWPFSDTContent(CTSdtContentRun sdtRun, IBody part, IRunBody parent) uses sdtRun.getRArray() to obtain its body elements. Thus only runs (class CTR) are considered as body elements. However, I am currently working on a project where most documents come with a level-2 nesting of <w:sdt> Tags (apparently this is required in order to manage lists of custom controls). Furthermore, we create a search index for our *.docx files based on getText(), which currently misses the parts that are stored in nested <w:sdt> Tags. The attached patch is a minor modification that would improve this situation by considering also CTSdtRuns (in addition to CTRs) when collecting the body elements of an XWPFSDTContent. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org