Summary: | XWPFParagraph.searchText may return invalid result when searched string is in more runs | ||
---|---|---|---|
Product: | POI | Reporter: | Vladimir Glasnak <vglasnak> |
Component: | XWPF | Assignee: | POI Developers List <dev> |
Status: | NEW --- | ||
Severity: | normal | CC: | vglasnak |
Priority: | P2 | ||
Version: | 3.12-dev | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows NT |
Description
Vladimir Glasnak
2015-03-19 13:54:59 UTC
Sorry for the late response on this one, but it would make it easier to reproduce this if you can provide both a sample file and a self-contained unit-test, that would help a lot! Hi, I created a testcase and a fixed version of the algorithm for this bug: https://github.com/fsomme2s/apache-poi-bug57727 Go to test class "BeginCharTest". Note: In this repo, I also demonstrate and fix a second bug in a second test case. The bug is that the searchText() method returns null (= not found) although the searched string is part of the paragraph. I will create a second bug for this one. Could you do a pull request in https://github.com/apache/poi with the TODOs in your tests resolved? Sorry I still have a bug in my "fix"... I work on it, when I'm done with everything I'll create the PR! |