sw/source/core/layout/findfrm.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bd996a23bc4780579fc17e23d8f9f16e2af60289
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Wed Aug 2 18:20:50 2023 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Thu Aug 3 09:53:59 2023 +0200

    tdf#145743 sw: don't delete empty page with ColLocked section
    
    In MakeFrames(), the new frames are inserted into a section frame,
    before an existing frame; the existing frame is MoveFwd() to the next
    page, so the call to CheckPageDescs() finds the page frame empty and
    deletes it, along with the section frame.
    
    Check the mbColLocked flag set by MakeFrames() to prevent it.
    
    (regression from commit b9ef71476fd70bc13f50ebe80390e0730d1b7afb)
    
    Change-Id: I4e02a85314adaf07794fd6b5447bd78d39597b8d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155266
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/core/layout/findfrm.cxx 
b/sw/source/core/layout/findfrm.cxx
index 3e2c26a8bbf9..ae2c7473baf3 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -180,7 +180,7 @@ bool SwLayoutFrame::ContainsDeleteForbiddenLayFrame() const
             continue;
         }
         SwLayoutFrame const*const pLay(static_cast<SwLayoutFrame 
const*>(pFrame));
-        if (pLay->ContainsDeleteForbiddenLayFrame())
+        if (pLay->ContainsDeleteForbiddenLayFrame() || pLay->IsColLocked())
         {
             return true;
         }

Reply via email to