sw/source/core/text/inftxt.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit a48ca0a653dd3a49369f21895556e336012107d9 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Jun 25 15:22:56 2024 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Wed Jun 26 11:58:59 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/+/169503 diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 34c0c4717fb8..66018134718d 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -2005,11 +2005,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(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; }