summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/layout/pagechg.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 73a003223495..e09c1a265e2c 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1339,13 +1339,19 @@ namespace
pPage->PreparePage( bFootnote );
// If the sibling has no body text, destroy it as long as it is no footnote page.
- if ( pSibling && !pSibling->IsFootnotePage() &&
- !pSibling->FindFirstBodyContent() &&
- (!pRefPage || !isDeleteForbidden(pSibling)) )
+ if (!pSibling)
+ return true;
+ if (pSibling->IsFootnotePage())
+ return true;
+ if (pSibling->FindFirstBodyContent())
+ return true;
+
+ if (!pRefPage || !isDeleteForbidden(pSibling))
{
pRoot->RemovePage( pRefSibling, SwRemoveResult::Next ) ;
return false;
}
+
return true;
}
}