diff options
author | László Németh <nemeth@numbertext.org> | 2013-09-26 12:19:01 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2013-09-26 12:22:53 +0200 |
commit | 634f1d11d2a027887807494b3ca67f33825d5d23 (patch) | |
tree | d2f144ee9fda82ce4c7a63de0170e2842467c6cf | |
parent | 7f436c1fd3a5f879fc99652043befb35158b3321 (diff) |
fdo#56392 fix hyph. of words with single punctuation marks
Change-Id: I0a24fb53c2ff48c26b1c97b9a4768c3a725cd686
-rw-r--r-- | i18npool/source/breakiterator/breakiterator_unicode.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx index 4c08a5f63d9b..5c7d588e5f4e 100644 --- a/i18npool/source/breakiterator/breakiterator_unicode.cxx +++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx @@ -383,10 +383,10 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLineBreak( Boundary wBoundary = getWordBoundary( Text, nStartPosWordEnd, rLocale, WordType::DICTIONARY_WORD, false); - nStartPosWordEnd = wBoundary.endPos + 1; + nStartPosWordEnd = wBoundary.endPos; while (nStartPosWordEnd < Text.getLength() && (u_ispunct((sal_uInt32)Text[nStartPosWordEnd]))) // ending punctuation nStartPosWordEnd ++; - nStartPosWordEnd = nStartPosWordEnd - wBoundary.endPos - 1; + nStartPosWordEnd = nStartPosWordEnd - wBoundary.endPos; if (hOptions.hyphenIndex - wBoundary.startPos < nStartPosWordEnd) nStartPosWordEnd = hOptions.hyphenIndex - wBoundary.startPos; #define SPACE 0x0020 while (boundary_with_punctuation > wBoundary.endPos && Text[--boundary_with_punctuation] == SPACE); |