From 634f1d11d2a027887807494b3ca67f33825d5d23 Mon Sep 17 00:00:00 2001 From: László Németh Date: Thu, 26 Sep 2013 12:19:01 +0200 Subject: fdo#56392 fix hyph. of words with single punctuation marks Change-Id: I0a24fb53c2ff48c26b1c97b9a4768c3a725cd686 --- i18npool/source/breakiterator/breakiterator_unicode.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'i18npool') 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); -- cgit