[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Fri Apr 27 12:47:03 UTC 2018


 sw/source/core/layout/calcmove.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 2b6c79ee5882d69e4e743a893f39e6ac60aa66a2
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 27 09:32:18 2018 +0100

    use SwFrameDeleteGuard
    
    Change-Id: I40970d1f4ece49e2b9faa0a534ae1d85358591b3
    Reviewed-on: https://gerrit.libreoffice.org/53554
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 4062c55ea1f6..f914dc7fee6c 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1170,8 +1170,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
         return;
     }
 
-    bool const bDeleteForbidden(IsDeleteForbidden());
-    ForbidDelete();
+    auto xDeleteGuard = o3tl::make_unique<SwFrameDeleteGuard>(this);
     LockJoin();
     long nFormatCount = 0;
     // - loop prevention
@@ -1835,8 +1834,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
     delete pSaveFootnote;
 
     UnlockJoin();
-    if (!bDeleteForbidden)
-        AllowDelete();
+    xDeleteGuard.reset();
     if ( bMovedFwd || bMovedBwd )
         pNotify->SetInvaKeep();
     if ( bMovedFwd )


More information about the Libreoffice-commits mailing list