summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/fly.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/fly.cxx')
-rw-r--r--sw/source/core/layout/fly.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index ff51d377f405..877e618aa582 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1463,14 +1463,10 @@ void CalcContent( SwLayoutFrm *pLay,
if ( bNoCalcFollow && pFrm->IsTextFrm() )
static_cast<SwTextFrm*>(pFrm)->ForbidFollowFormat();
- const bool bDeleteForbidden(pSect && pSect->IsDeleteForbidden());
- if (pSect && !bDeleteForbidden)
- pSect->ForbidDelete();
-
- pFrm->Calc(pRenderContext);
-
- if (pSect && !bDeleteForbidden)
- pSect->AllowDelete();
+ {
+ SwFrmDeleteGuard aDeleteGuard(pSect);
+ pFrm->Calc(pRenderContext);
+ }
// OD 14.03.2003 #i11760# - reset control flag for follow format.
if ( pFrm->IsTextFrm() )