sw/source/core/text/inftxt.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit 09978b049570e00eae863f36f834885fd6ea8fe3 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Jun 25 15:22:56 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Jun 27 17:01:30 2024 +0200 tdf#161721 sw: text formatting: TabOverMargin allow 55cm of crazy Also remove the limitation to a single text portion after tab, seems it was overly cautious. Change-Id: I07da5fdc97d84a056db87c8b74cdfc5bca85cf1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169521 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Jenkins (cherry picked from commit 4acedb794c1ba0de24f2c8703e07d7f2d5143bdb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169527 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 66dae09b35c4..3b1bbf087dac 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1942,11 +1942,10 @@ SwTwips SwTextFormatInfo::GetLineWidth() if (pLastTab->GetWhichPor() == PortionType::TabLeft) nLineWidth = nTextFrameWidth - pLastTab->GetTabPos(); } - else if (GetLast() == pLastTab) + else { // tdf#158658 Put content after tab into margin like Word. - // FIXME using Width() is entirely arbitrary here, Word adds even more - // width but not infinitely much. - nLineWidth = std::max<SwTwips>(Width(), nLineWidth); + // Try to limit the paragraph to 55.87cm, it's max tab pos in Word UI. + nLineWidth = o3tl::toTwips(558, o3tl::Length::mm) - X(); } return nLineWidth; }