sw/source/core/layout/tabfrm.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit e7fa2f25de45a60c6b6d6f8b489e52bafbc4b9de Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Thu Sep 5 12:37:46 2024 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Thu Sep 5 17:11:40 2024 +0200 sw: fix empty pages after hiding section due to SwTabFrame The problem with a full customer doc is that a table doesn't MoveBwd because ShouldBwdMoved finds that the rows don't fit as the rows still have non-0 heights, and the result is an empty page at the end; also the table later splits. Turns out that setting bDontSplit prevents both problems; the inner frames are all set to 0 height by lcl_RecalcTable(). (regression from commit ff7f1b59e22092d8548459e75fe912db852f056f) Change-Id: I5012142a0019ee2e978d5b8a9eb445ff0949e569 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172910 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Jenkins (cherry picked from commit 8087f479b373299d45469ff3996dba793a9cdb28) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172896 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 dc948b5d5634..e8fa6a39da53 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -2178,9 +2178,10 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) std::optional<SwBorderAttrAccess> oAccess(std::in_place, SwFrame::GetCache(), this); const SwBorderAttrs *pAttrs = oAccess->Get(); + bool const isHiddenNow(IsHiddenNow()); // All rows should keep together - bool bDontSplit = !IsFollow() && - ( !GetFormat()->GetLayoutSplit().GetValue() ); + bool bDontSplit = isHiddenNow + || (!IsFollow() && !GetFormat()->GetLayoutSplit().GetValue()); // The number of repeated headlines const sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat(); @@ -2275,7 +2276,6 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) } } - bool const isHiddenNow(IsHiddenNow()); if (isHiddenNow) MakeValidZeroHeight();