summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/pagechg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/pagechg.cxx')
-rw-r--r--sw/source/core/layout/pagechg.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 53afdb0425d1..14407d2b75c3 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1186,6 +1186,8 @@ namespace
{
bool isDeleteForbidden(const SwPageFrame *pDel)
{
+ if (pDel->IsDeleteForbidden())
+ return true;
const SwLayoutFrame* pBody = pDel->FindBodyCont();
const SwFrame* pBodyContent = pBody ? pBody->Lower() : nullptr;
return pBodyContent && pBodyContent->IsDeleteForbidden();
@@ -1213,8 +1215,6 @@ namespace
!pSibling->FindFirstBodyContent() &&
(!pRefPage || !isDeleteForbidden(pSibling)) )
{
- if (pSibling->IsDeleteForbidden())
- throw uno::RuntimeException("bad layout");
pRoot->RemovePage( pRefSibling, SwRemoveResult::Next ) ;
return false;
}