Kaydet (Commit) ba4861a0 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Miklos Vajna

tdf#121005 forcepoint#44 merge into isDeleteForbidden

Reviewed-on: https://gerrit.libreoffice.org/55355Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
(cherry picked from commit c6222fb6)

Change-Id: If7ce44786975c5f9bdc9e64d16274728b03bed32
Reviewed-on: https://gerrit.libreoffice.org/62629
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst b6052b6f
This diff was suppressed by a .gitattributes entry.
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment