diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-05 21:37:00 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-10-10 22:35:04 +0200 |
commit | 7be01c3b3c41113a58aa41a561d684fb7d5fa83f (patch) | |
tree | bcb8d2ac6aa6edfc6753ac97934f7a42ed7a4f6b | |
parent | f069d0954b8b30cb0c6f7020e197d501851a6600 (diff) |
tdf#121005 forcepoint#44 merge into isDeleteForbidden
Reviewed-on: https://gerrit.libreoffice.org/55355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit c6222fb6b8b429fa2e767c73ad616147f95ab1b9)
Change-Id: If7ce44786975c5f9bdc9e64d16274728b03bed32
Reviewed-on: https://gerrit.libreoffice.org/62629
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | sw/qa/core/data/ww8/fail/forcepoint-44.doc | bin | 0 -> 119808 bytes | |||
-rw-r--r-- | sw/source/core/layout/pagechg.cxx | 4 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/qa/core/data/ww8/fail/forcepoint-44.doc b/sw/qa/core/data/ww8/fail/forcepoint-44.doc Binary files differnew file mode 100644 index 000000000000..100422a2249c --- /dev/null +++ b/sw/qa/core/data/ww8/fail/forcepoint-44.doc diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 4286387aefe0..95bdb5137ade 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -1217,6 +1217,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(); @@ -1244,8 +1246,6 @@ namespace !pSibling->FindFirstBodyContent() && (!pRefPage || !isDeleteForbidden(pSibling)) ) { - if (pSibling->IsDeleteForbidden()) - throw uno::RuntimeException("bad layout"); pRoot->RemovePage( pRefSibling, SwRemoveResult::Next ) ; return false; } |