https://bz.apache.org/bugzilla/show_bug.cgi?id=62779
Bug ID: 62779
Summary: Paragraph text search results start with an error
marker.
Product: POI
Version: 4.0.0-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XWPF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 36177
--> https://bz.apache.org/bugzilla/attachment.cgi?id=36177&action=edit
Fix the sample
Fix paragraph text search results start point marking error.
##src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java
Each loop of rArray in the searchText method causes beginTextPos and
beginCharPos to be reset accordingly. The resulting TextSegment returns invalid
data.
Such as:
Search ${code} in Runs data ["code:${", "code","}"].
The correct result returned should be
### start
startRun 0
startText 0
startChar 5
### end
endRun 2
endText 0
endChar 0
But the actual interior only retains the startRun state, and startText,
startChar are reset at each loop.
startRun 0
startText 0
startChar 0
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]