sw/source/core/layout/tabfrm.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
New commits: commit 206c35b832ef939e05c7261c78d8196c2258bd4c Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Thu Aug 22 11:20:27 2024 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Thu Aug 22 19:49:54 2024 +0200 sw: layout: allow table in hidden section to move back The problem is that a SwTabFrame in a hidden section will never MoveBwd because its height is always set to 1 erroneously in SwTabFrame::Format() due to some border or so, and thus it doesn't fit. So prevent Format() from being called by disabling invalidations. (regression from commit ff7f1b59e22092d8548459e75fe912db852f056f) Change-Id: I25232b31b22b98c852c2f28eefff34f51e088eda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172251 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Jenkins (cherry picked from commit 20b8f3922a374378cef7b87ee30cde2ae1d6264e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172204 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 39d936cf7a23..c765bd35e0cc 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -2262,7 +2262,8 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) } } - if (IsHiddenNow()) + bool const isHiddenNow(IsHiddenNow()); + if (isHiddenNow) MakeValidZeroHeight(); int nUnSplitted = 5; // Just another loop control :-( @@ -2299,7 +2300,10 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) pLayout->GetBrowseWidthByTabFrame( *this ) ); } - setFramePrintAreaValid(false); + if (!isHiddenNow) + { + setFramePrintAreaValid(false); + } aNotify.SetLowersComplete( false ); } SwFrame *pPre; @@ -2402,7 +2406,10 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) pHTMLLayout->GetBrowseWidthByTabFrame( *this ) ); } - setFramePrintAreaValid(false); + if (!isHiddenNow) + { + setFramePrintAreaValid(false); + } if (!oAccess) {