diff options
-rw-r--r-- | sw/qa/extras/layout/data/forcepoint98.html | bin | 0 -> 7171 bytes | |||
-rw-r--r-- | sw/qa/extras/layout/layout.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/layout/sectfrm.cxx | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/sw/qa/extras/layout/data/forcepoint98.html b/sw/qa/extras/layout/data/forcepoint98.html Binary files differnew file mode 100644 index 000000000000..9d4b76c53e76 --- /dev/null +++ b/sw/qa/extras/layout/data/forcepoint98.html diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx index ef7962aa09fe..8c80f37c1680 100644 --- a/sw/qa/extras/layout/layout.cxx +++ b/sw/qa/extras/layout/layout.cxx @@ -3007,6 +3007,14 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint94) #endif //just care it doesn't crash/assert +#if 0 // no createSwWebDoc +CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint98) +{ + createSwWebDoc(DATA_DIRECTORY, "forcepoint98.html"); +} +#endif + +//just care it doesn't crash/assert CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf147485Forcepoint) { createDoc("tdf147485-forcepoint.doc"); diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 524562585bd1..48debbcc399a 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -2863,7 +2863,8 @@ void SwRootFrame::DeleteEmptySct_() mpDestroy->erase( mpDestroy->begin() ); OSL_ENSURE( !pSect->IsColLocked() && !pSect->IsJoinLocked(), "DeleteEmptySct: Locked SectionFrame" ); - if( !pSect->getFrameArea().HasArea() && !pSect->ContainsContent() ) + SAL_WARN_IF(pSect->IsDeleteForbidden(), "sw.layout", "not allowed delete SwFrame"); + if( !pSect->getFrameArea().HasArea() && !pSect->ContainsContent() && !pSect->IsDeleteForbidden() ) { SwLayoutFrame* pUp = pSect->GetUpper(); pSect->RemoveFromLayout(); |