From: PJ Fanning Date: Sun, 27 May 2018 20:58:21 +0000 (+0000) Subject: [githib-110] rename text segment class. This closes #110 X-Git-Tag: REL_4_0_0_FINAL~158 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1caafe043173ed5e5c550855b1c85cbeeff710d3;p=poi.git [githib-110] rename text segment class. This closes #110 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1832352 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java index adbbfd1797..bb45f1cb3e 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java @@ -1468,7 +1468,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para * @param searched * @param startPos */ - public TextSegement searchText(String searched, PositionInParagraph startPos) { + public TextSegment searchText(String searched, PositionInParagraph startPos) { int startRun = startPos.getRun(), startText = startPos.getText(), startChar = startPos.getChar(); @@ -1504,7 +1504,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para if (candCharPos + 1 < searched.length()) { candCharPos++; } else if (newList) { - TextSegement segement = new TextSegement(); + TextSegment segement = new TextSegment(); segement.setBeginRun(beginRunPos); segement.setBeginText(beginTextPos); segement.setBeginChar(beginCharPos); @@ -1539,7 +1539,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para * * @param segment */ - public String getText(TextSegement segment) { + public String getText(TextSegment segment) { int runBegin = segment.getBeginRun(); int textBegin = segment.getBeginText(); int charBegin = segment.getBeginChar(); diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java index 30d9d7ef29..e367f04ae4 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java @@ -559,7 +559,7 @@ public final class TestXWPFParagraph { XWPFParagraph p = ps.get(0); - TextSegement segment = p.searchText("sample word document", new PositionInParagraph()); + TextSegment segment = p.searchText("sample word document", new PositionInParagraph()); assertNotNull(segment); assertEquals("sample word document", p.getText(segment));