diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-04-27 09:32:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-04-27 14:46:16 +0200 |
commit | 2b6c79ee5882d69e4e743a893f39e6ac60aa66a2 (patch) | |
tree | be61c36fee955220f5ba9701493055fd19b2eeee | |
parent | 632bc11ce8fab1c4046ab24810b90a7ce9ac5914 (diff) |
use SwFrameDeleteGuard
Change-Id: I40970d1f4ece49e2b9faa0a534ae1d85358591b3
Reviewed-on: https://gerrit.libreoffice.org/53554
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/layout/calcmove.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
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 ) |