diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2024-08-22 11:20:27 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2024-08-23 13:16:18 +0200 |
commit | aed7ed4abe450c5b9b67e53e699e53b2160fe6e2 (patch) | |
tree | 8597bac6729003881dc323881884453ce46545f5 | |
parent | bafb0e2f4c557e2271e7c7528c44786271f7614e (diff) |
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.stahl@allotropia.de>
Tested-by: Jenkins
(cherry picked from commit 20b8f3922a374378cef7b87ee30cde2ae1d6264e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172203
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r-- | sw/source/core/layout/tabfrm.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 42116672708f..a7286a4860b9 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -2275,7 +2275,8 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) } } - if (IsHiddenNow()) + bool const isHiddenNow(IsHiddenNow()); + if (isHiddenNow) MakeValidZeroHeight(); int nUnSplitted = 5; // Just another loop control :-( @@ -2312,7 +2313,10 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) pLayout->GetBrowseWidthByTabFrame( *this ) ); } - setFramePrintAreaValid(false); + if (!isHiddenNow) + { + setFramePrintAreaValid(false); + } aNotify.SetLowersComplete( false ); } SwFrame *pPre; @@ -2415,7 +2419,10 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) pHTMLLayout->GetBrowseWidthByTabFrame( *this ) ); } - setFramePrintAreaValid(false); + if (!isHiddenNow) + { + setFramePrintAreaValid(false); + } if (!oAccess) { |