sw/source/core/text/frmform.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
New commits: commit 43b659c82ce6a3443ea839181371b1887a44c194 Author: Mike Kaganski <[email protected]> AuthorDate: Thu Nov 13 08:21:19 2025 +0100 Commit: Mike Kaganski <[email protected]> CommitDate: Thu Nov 13 14:59:50 2025 +0100 No need to adjust range length twice Just take start position into account from start. Change-Id: Ia5af9259a088dc3952f6c3fe3ff4a171636eb729 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193937 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 88bdb9736859..43e54789e65b 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -1598,11 +1598,8 @@ void SwTextFrame::Format_( SwTextFormatter &rLine, SwTextFormatInfo &rInf, // Due to performance reasons we set rReformat to COMPLETE_STRING in Init() // In this case we adjust rReformat - if( rReformat.Len() > nStrLen ) - rReformat.Len() = nStrLen; - - if( rReformat.Start() + rReformat.Len() > nStrLen ) - rReformat.Len() = nStrLen - rReformat.Start(); + if (auto nMax = nStrLen - rReformat.Start(); rReformat.Len() > nMax) + rReformat.Len() = nMax; SwTwips nOldBottom; if( GetOffset() && !IsFollow() )
