sw/source/core/layout/frmtool.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 9910c123e8177aa942f9aa4a6efe49b2afdc2658
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:31 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/+/172953
    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 6ea91ee1c727..05b968737cc3 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1909,10 +1909,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.
@@ -1927,6 +1923,10 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
                 }
                 else
                 {
+                    if (pLay->IsHiddenNow())
+                    {
+                        
newHiddenSections.push_back(static_cast<SwSectionFrame*>(pLay));
+                    }
                     pPrv = pLay;
                     pLay = pLay->GetUpper();
                 }
@@ -1970,6 +1970,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;

Reply via email to