editeng/source/editeng/impedit3.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit 2ffa6c897379bf07367d445918b4c142cd493e7f Author: Mark Hung <mark...@gmail.com> AuthorDate: Sat Jan 2 22:58:23 2021 +0800 Commit: Mark Hung <mark...@gmail.com> CommitDate: Mon Jan 4 13:40:01 2021 +0100 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 <mark...@gmail.com> 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! _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits