* @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();
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);
*
* @param segment
*/
- public String getText(TextSegement segment) {
+ public String getText(TextSegment segment) {
int runBegin = segment.getBeginRun();
int textBegin = segment.getBeginText();
int charBegin = segment.getBeginChar();
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));