]> source.dussan.org Git - poi.git/commitdiff
[githib-110] rename text segment class. This closes #110
authorPJ Fanning <fanningpj@apache.org>
Sun, 27 May 2018 20:58:21 +0000 (20:58 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sun, 27 May 2018 20:58:21 +0000 (20:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1832352 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java
src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFParagraph.java

index adbbfd179732479549bfc703148ff3a87661e418..bb45f1cb3e31db9ea8be61cfba2a55068322b5a7 100644 (file)
@@ -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();
index 30d9d7ef29f723375d97bf93b93ef03504218342..e367f04ae4fe3c918c137339f6a597571e8fdd80 100644 (file)
@@ -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));