Skip to content

Commit

Permalink
Fix Bug: XWPFParagraph SearchIndex In Several Paragraph Reset BeginCh…
Browse files Browse the repository at this point in the history
…arPos Each Time Move To Next Run
  • Loading branch information
軒竹 吳 committed Aug 24, 2020
1 parent c17cddf commit 38cdadd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ooxml/XWPF/Usermodel/XWPFParagraph.cs
Expand Up @@ -1338,11 +1338,11 @@ public TextSegment SearchText(String searched, PositionInParagraph startPos)
int startRun = startPos.Run,
startText = startPos.Text,
startChar = startPos.Char;
int beginRunPos = 0, candCharPos = 0;
int beginRunPos = 0, beginTextPos = 0, beginCharPos = 0,candCharPos = 0;
bool newList = false;
for (int runPos = startRun; runPos < paragraph.GetRList().Count; runPos++)
{
int beginTextPos = 0, beginCharPos = 0, textPos = 0, charPos = 0;
int textPos = 0, charPos = 0;
CT_R ctRun = paragraph.GetRList()[runPos];
foreach (object o in ctRun.Items)
{
Expand Down

0 comments on commit 38cdadd

Please sign in to comment.