summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-16 16:45:14 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2019-08-06 13:59:37 +0200
commit1ace038162d962707cee08f2a2ef73778908bcdb (patch)
tree48f6362b2829d1cbbe3d4c164c26207900ba7911
parentofz#10879 stay inside sSecStr bounds (diff)
downloadcore-1ace038162d962707cee08f2a2ef73778908bcdb.tar.gz
core-1ace038162d962707cee08f2a2ef73778908bcdb.zip
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> (cherry picked from commit 2a957e408530cd16526d793c87f0e6fd4bed1548)
-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 aaa74c72ba0f..54442191f4e6 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1363,6 +1363,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 9f61fab99771..53afdb0425d1 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1213,6 +1213,8 @@ namespace
!pSibling->FindFirstBodyContent() &&
(!pRefPage || !isDeleteForbidden(pSibling)) )
{
+ if (pSibling->IsDeleteForbidden())
+ throw uno::RuntimeException("bad layout");
pRoot->RemovePage( pRefSibling, SwRemoveResult::Next ) ;
return false;
}