summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-16 16:45:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-05-01 14:22:19 +0200
commit2a957e408530cd16526d793c87f0e6fd4bed1548 (patch)
tree8eca966ea1cefa4a5a0fda87f77978cc2d10e875
parent6c05d28d1446d805933ea7dd924dc94f890a7acb (diff)
forcepoint#39 bad layout
reproducible with ./instdir/program/soffice.bin --headless --convert-to pdf sw/qa/core/data/ww8/pass/forcepoint-layout-1.doc Change-Id: I93bd8a75196ddb2a1a242752bb1e06164bf7148e Reviewed-on: https://gerrit.libreoffice.org/53002 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rwxr-xr-xsw/qa/core/data/ww8/pass/forcepoint-layout-1.docbin0 -> 580608 bytes
-rw-r--r--sw/source/core/layout/fly.cxx1
-rw-r--r--sw/source/core/layout/pagechg.cxx2
3 files changed, 3 insertions, 0 deletions
diff --git a/sw/qa/core/data/ww8/pass/forcepoint-layout-1.doc b/sw/qa/core/data/ww8/pass/forcepoint-layout-1.doc
new file mode 100755
index 000000000000..37801a9b14e2
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/forcepoint-layout-1.doc
Binary files differ
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 90cf8c5ae5d1..7e6876432a67 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1422,6 +1422,7 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
}
{
+ SwFrameDeleteGuard aDeletePageGuard(pSect->FindPageFrame());
SwFrameDeleteGuard aDeleteGuard(pSect);
pFrame->Calc(pRenderContext);
}
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 238f44cc1afb..d31162d79aa3 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1264,6 +1264,8 @@ namespace
!pSibling->FindFirstBodyContent() &&
(!pRefPage || !isDeleteForbidden(pSibling)) )
{
+ if (pSibling->IsDeleteForbidden())
+ throw uno::RuntimeException("bad layout");
pRoot->RemovePage( pRefSibling, SwRemoveResult::Next ) ;
return false;
}