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

New commits:
commit b308c3b3242d920e9ef054a0bf118623cf8d235c
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Wed Aug 2 18:20:50 2023 +0200
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 4 15:59:54 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>
    (cherry picked from commit bd996a23bc4780579fc17e23d8f9f16e2af60289)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155246
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/layout/findfrm.cxx 
b/sw/source/core/layout/findfrm.cxx
index d6a70186231a..37dc2807574d 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -178,7 +178,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