From c6222fb6b8b429fa2e767c73ad616147f95ab1b9 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 5 Jun 2018 21:37:00 +0100 Subject: forcepoint#44 merge into isDeleteForbidden MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If7ce44786975c5f9bdc9e64d16274728b03bed32 Reviewed-on: https://gerrit.libreoffice.org/55355 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/qa/core/data/ww8/fail/forcepoint-44.doc | Bin 0 -> 119808 bytes sw/source/core/layout/pagechg.cxx | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 sw/qa/core/data/ww8/fail/forcepoint-44.doc diff --git a/sw/qa/core/data/ww8/fail/forcepoint-44.doc b/sw/qa/core/data/ww8/fail/forcepoint-44.doc new file mode 100644 index 000000000000..100422a2249c Binary files /dev/null and b/sw/qa/core/data/ww8/fail/forcepoint-44.doc differ diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index d31162d79aa3..ee41a0d4f77b 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -1237,6 +1237,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(); @@ -1264,8 +1266,6 @@ namespace !pSibling->FindFirstBodyContent() && (!pRefPage || !isDeleteForbidden(pSibling)) ) { - if (pSibling->IsDeleteForbidden()) - throw uno::RuntimeException("bad layout"); pRoot->RemovePage( pRefSibling, SwRemoveResult::Next ) ; return false; } -- cgit v1.2.3