sw/source/core/layout/frmtool.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
New commits: commit 825195269b73192fb4003db78ce0cf034a5e857c Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Fri Sep 6 14:09:15 2024 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Sep 7 10:05:26 2024 +0200 sw: fix hiding of flys in hidden sections, part 3 Sigh... the new section frame can be deleted! Missed that... (regression from commit e2f3ba12c238c895dfd61ad09fcd76789ebbfd53) Change-Id: I48f2b09ececf8fb8469c53a5ec0a3c75be5f7306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172966 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 0c6ec63c81676ed675931d9aa8a78d91ed0d9b6e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172954 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 0a7f5ae16456..d7d97c64c189 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1908,10 +1908,6 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, //section again. pActualSection.reset(pActualSection->GetUpper()); pLay = pLay->FindSctFrame(); - if (pLay->IsHiddenNow()) - { - newHiddenSections.push_back(static_cast<SwSectionFrame*>(pLay)); - } if ( pActualSection ) { //Could be, that the last SectionFrame remains empty. @@ -1926,6 +1922,10 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, } else { + if (pLay->IsHiddenNow()) + { + newHiddenSections.push_back(static_cast<SwSectionFrame*>(pLay)); + } pPrv = pLay; pLay = pLay->GetUpper(); } @@ -1969,6 +1969,10 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, } else { + if (pLay->IsHiddenNow()) + { + newHiddenSections.push_back(static_cast<SwSectionFrame*>(pLay)); + } //Nothing more with sections, it goes on right behind //the SectionFrame. pPrv = pLay;