summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2021-01-02 22:58:23 +0800
committerMark Hung <marklh9@gmail.com>2021-01-04 13:40:01 +0100
commit2ffa6c897379bf07367d445918b4c142cd493e7f (patch)
tree033db6a7bf532d8f6b1bb80c5bfdbc89e8ea006f /editeng
parent8e55b3041a5bf5b4d6752bada241033283331a62 (diff)
tdf#120171 editeng: don't reduce nBreakPos
even if it is greater then nMaxBreakPos. The only situation that happens is when there is a hanging punctuation. Reducing nBreakPos to nMaxBreakPos always break that punctuation to the next line. Change-Id: Ie4b61d21f4d8f6f874e2a969260c13a3bca2a049 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108594 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit3.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index a271aa37c1e6..7df8aaa92bf4 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1900,10 +1900,9 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
OSL_FAIL( "I18N: XBreakIterator::getLineBreak returns position > Max" );
nBreakPos = nMaxBreakPos;
}
-
- // nBreakPos can never be outside the portion, even not with hanging punctuation
- if ( nBreakPos > nMaxBreakPos )
- nBreakPos = nMaxBreakPos;
+ // Hanging punctuation is the only case that increases nBreakPos and makes
+ // nBreakPos > nMaxBreakPos. It's expected that the hanging punctuation goes over
+ // the border of the object.
}
// BUG in I18N - the japanese dot is in the next line!