Kaydet (Commit) 634f1d11 authored tarafından László Németh's avatar László Németh

fdo#56392 fix hyph. of words with single punctuation marks

Change-Id: I0a24fb53c2ff48c26b1c97b9a4768c3a725cd686
üst 7f436c1f
...@@ -383,10 +383,10 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLineBreak( ...@@ -383,10 +383,10 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLineBreak(
Boundary wBoundary = getWordBoundary( Text, nStartPosWordEnd, rLocale, Boundary wBoundary = getWordBoundary( Text, nStartPosWordEnd, rLocale,
WordType::DICTIONARY_WORD, false); WordType::DICTIONARY_WORD, false);
nStartPosWordEnd = wBoundary.endPos + 1; nStartPosWordEnd = wBoundary.endPos;
while (nStartPosWordEnd < Text.getLength() && (u_ispunct((sal_uInt32)Text[nStartPosWordEnd]))) // ending punctuation while (nStartPosWordEnd < Text.getLength() && (u_ispunct((sal_uInt32)Text[nStartPosWordEnd]))) // ending punctuation
nStartPosWordEnd ++; nStartPosWordEnd ++;
nStartPosWordEnd = nStartPosWordEnd - wBoundary.endPos - 1; nStartPosWordEnd = nStartPosWordEnd - wBoundary.endPos;
if (hOptions.hyphenIndex - wBoundary.startPos < nStartPosWordEnd) nStartPosWordEnd = hOptions.hyphenIndex - wBoundary.startPos; if (hOptions.hyphenIndex - wBoundary.startPos < nStartPosWordEnd) nStartPosWordEnd = hOptions.hyphenIndex - wBoundary.startPos;
#define SPACE 0x0020 #define SPACE 0x0020
while (boundary_with_punctuation > wBoundary.endPos && Text[--boundary_with_punctuation] == SPACE); while (boundary_with_punctuation > wBoundary.endPos && Text[--boundary_with_punctuation] == SPACE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment