[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
This commit is contained in:
PJ Fanning 2018-05-27 20:58:21 +00:00
parent 70055b806d
commit 917dace980
2 changed files with 4 additions and 4 deletions

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

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