summaryrefslogtreecommitdiff
path: root/i18npool/source
diff options
context:
space:
mode:
Diffstat (limited to 'i18npool/source')
-rw-r--r--i18npool/source/breakiterator/breakiterator_unicode.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index 126ac7a8d354..5270b1db5bad 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -398,7 +398,7 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLineBreak(
uno::Reference< linguistic2::XHyphenatedWord > aHyphenatedWord;
aHyphenatedWord = hOptions.rHyphenator->hyphenate(Text.copy(wBoundary.startPos,
wBoundary.endPos - wBoundary.startPos), rLocale,
- (sal_Int16) (hOptions.hyphenIndex - wBoundary.startPos - nStartPosWordEnd), hOptions.aHyphenationOptions);
+ (sal_Int16) (hOptions.hyphenIndex - wBoundary.startPos - ((hOptions.hyphenIndex == wBoundary.endPos)? nStartPosWordEnd : 0)), hOptions.aHyphenationOptions);
if (aHyphenatedWord.is()) {
lbr.rHyphenatedWord = aHyphenatedWord;
if(wBoundary.startPos + aHyphenatedWord->getHyphenationPos() + 1 < nMinBreakPos )