summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-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 ac6c74f4fc57..f3b80311c52f 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1238,6 +1238,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();
@@ -1265,8 +1267,6 @@ namespace
!pSibling->FindFirstBodyContent() &&
(!pRefPage || !isDeleteForbidden(pSibling)) )
{
- if (pSibling->IsDeleteForbidden())
- throw uno::RuntimeException("bad layout");
pRoot->RemovePage( pRefSibling, SwRemoveResult::Next ) ;
return false;
}