Lines Matching refs:anyPos
322 Boundary xdictionary::previousWord(const OUString& rText, sal_Int32 anyPos, sal_Int16 wordType) in previousWord() argument
325 sal_uInt32 ch = rText.iterateCodePoints(&anyPos, -1); in previousWord()
327 while (anyPos > 0 && u_isWhitespace(ch)) ch = rText.iterateCodePoints(&anyPos, -1); in previousWord()
329 return getWordBoundary(rText, anyPos, wordType, true); in previousWord()
332 Boundary xdictionary::nextWord(const OUString& rText, sal_Int32 anyPos, sal_Int16 wordType) in nextWord() argument
334 boundary = getWordBoundary(rText, anyPos, wordType, true); in nextWord()
335 anyPos = boundary.endPos; in nextWord()
336 if (anyPos < rText.getLength()) { in nextWord()
338 sal_uInt32 ch = rText.iterateCodePoints(&anyPos, 1); in nextWord()
339 while (u_isWhitespace(ch)) ch=rText.iterateCodePoints(&anyPos, 1); in nextWord()
340 rText.iterateCodePoints(&anyPos, -1); in nextWord()
343 return getWordBoundary(rText, anyPos, wordType, true); in nextWord()
346 Boundary xdictionary::getWordBoundary(const OUString& rText, sal_Int32 anyPos, sal_Int16 wordType, … in getWordBoundary() argument
350 if (anyPos >= len || anyPos < 0) { in getWordBoundary()
351 boundary.startPos = boundary.endPos = anyPos < 0 ? 0 : len; in getWordBoundary()
352 } else if (seekSegment(rText, anyPos, boundary)) { // character in dict in getWordBoundary()
356 while (aCache.wordboundary[i] <= anyPos - boundary.startPos) i++; in getWordBoundary()
360 if (!bDirection && startPos > 0 && startPos == (anyPos - boundary.startPos)) in getWordBoundary()
362 sal_Int32 indexUtf16 = anyPos-1; in getWordBoundary()
371 boundary.startPos = anyPos; in getWordBoundary()
372 if (anyPos < len) rText.iterateCodePoints(&anyPos, 1); in getWordBoundary()
373 boundary.endPos = anyPos < len ? anyPos : len; in getWordBoundary()