sw: fix hiding of flys in hidden sections, part 3

Sigh... the new section frame can be deleted! Missed that...

(regression from commit e2f3ba12c2)

Change-Id: I48f2b09ececf8fb8469c53a5ec0a3c75be5f7306
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172966
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
This commit is contained in:
Michael Stahl
2024-09-06 17:53:34 +02:00
parent 52eceeb51b
commit 0c6ec63c81
+8 -4
View File
@@ -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;