From 2b6c79ee5882d69e4e743a893f39e6ac60aa66a2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 27 Apr 2018 09:32:18 +0100 Subject: use SwFrameDeleteGuard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I40970d1f4ece49e2b9faa0a534ae1d85358591b3 Reviewed-on: https://gerrit.libreoffice.org/53554 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/core/layout/calcmove.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sw') 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(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 ) -- cgit