[Libreoffice-commits] core.git: i18npool/source

László Németh nemeth at numbertext.org
Thu Sep 26 03:24:21 PDT 2013


 i18npool/source/breakiterator/breakiterator_unicode.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 634f1d11d2a027887807494b3ca67f33825d5d23
Author: László Németh <nemeth at numbertext.org>
Date:   Thu Sep 26 12:19:01 2013 +0200

    fdo#56392 fix hyph. of words with single punctuation marks
    
    Change-Id: I0a24fb53c2ff48c26b1c97b9a4768c3a725cd686

diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index 4c08a5f..5c7d588 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);


More information about the Libreoffice-commits mailing list