sw/qa/extras/layout/layout3.cxx | 2 +- sw/source/core/layout/frmtool.cxx | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-)
New commits: commit fbf070f38d25de29de3b8d7192e96cb957852965 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Wed Aug 23 15:49:44 2023 +0200 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Sep 26 13:37:00 2023 +0200 tdf#137523 sw: layout: fix text below tables in footer differently This fix is better than commit 027f8328eef1e149b6c99b478ed5df870291dc2d because it turns out the last text frame had a height of 219 in 6.1. One of the following commits would break this, so a different fix is needed. In SwFrameNotify::ImplDestroy(), if the frame changes its position the next frame's position is invalidated; if the next frame is undersized then also invalidate its size so that it will be formatted again, with more space. Change-Id: I8e6a3fe3127ebfa2246c440d2a3455b217476475 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155986 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 492ddef596c99a9c24d2778276025aafc612a7cb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156963 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx index 8ce2ba090602..7d591e1bd3a4 100644 --- a/sw/qa/extras/layout/layout3.cxx +++ b/sw/qa/extras/layout/layout3.cxx @@ -106,7 +106,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf137523) // had wrong height and were not visible assertXPath(pXmlDoc, "/root/page/footer/txt[1]/infos/bounds", "height", "304"); assertXPath(pXmlDoc, "/root/page/footer/txt[2]/infos/bounds", "height", "191"); - assertXPath(pXmlDoc, "/root/page/footer/txt[3]/infos/bounds", "height", "153"); + assertXPath(pXmlDoc, "/root/page/footer/txt[3]/infos/bounds", "height", "219"); assertXPath(pXmlDoc, "/root/page/footer/tab/infos/bounds", "height", "1378"); } diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index f3de2a7e201e..7f27932434c6 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -202,7 +202,14 @@ void SwFrameNotify::ImplDestroy() } if ( pNxt ) + { pNxt->InvalidatePos(); + if (pNxt->IsTextFrame() && static_cast<SwTextFrame*>(pNxt)->IsUndersized()) + { // tdf#137523 it could have more space at new pos + pNxt->InvalidateSize(); + pNxt->Prepare(PrepareHint::AdjustSizeWithoutFormatting); + } + } else { // #104100# - correct condition for setting retouche