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));