[Libreoffice-commits] core.git: sw/qa sw/source
Caolán McNamara
caolanm at redhat.com
Tue May 1 12:22:43 UTC 2018
sw/qa/core/data/ww8/pass/forcepoint-layout-1.doc |binary
sw/source/core/layout/fly.cxx | 1 +
sw/source/core/layout/pagechg.cxx | 2 ++
3 files changed, 3 insertions(+)
New commits:
commit 2a957e408530cd16526d793c87f0e6fd4bed1548
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Apr 16 16:45:14 2018 +0100
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 at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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
Binary files /dev/null and b/sw/qa/core/data/ww8/pass/forcepoint-layout-1.doc 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;
}
More information about the Libreoffice-commits
mailing list