diff --git a/sw/qa/extras/uiwriter/data/flowframe_null_ptr_deref.sample b/sw/qa/extras/uiwriter/data/flowframe_null_ptr_deref.sample new file mode 100644 index 000000000000..ec4e8423a08a --- /dev/null +++ b/sw/qa/extras/uiwriter/data/flowframe_null_ptr_deref.sample @@ -0,0 +1,654 @@ + + + + + + + + + + KDE::Enterprise Homepage - Business Directory + + + + + + + + + + + + + + + + + KDE::Enterprise Homepage - Business Directory + + + + + + + + + + + + + + + + + KDE::Enterprise Homepage - Business Directory + + + + + + + + + + + + + + + + + KDE::Enterprise Homepage - Business Directory + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
 
+ +
+ + +

Business Directory

+ +

A problem has been detected with your submisson

+

In the Business Name box you did not enter a valid name.

+

Please correct the problem below and resubmit.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
--> Business Name + +
Contact Name + +
Email Address + + Publish e-mail address
Website + +
Address + +
+ +
+ +

+ If more than one address, please add your head office. +

Postcode / Zip Code + +
Country + +
Phone Number + +
Fax Number + +
Business Services + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
On Site Support
Phone Support
Distribution
Free software development
Commercial development
Consulting
Retail
Other + +
+
Comments + +
+ + +
+
+

+ Back to the Business Directory +

+ + +
+ +

Inform

+ +

KDE::Enterprise

+ + + + + + + +
+ +
+ + diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index f16dec2a61a4..5b97e54f6867 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -175,6 +175,7 @@ public: void testDeleteTableRedlines(); void testXFlatParagraph(); void testTdf81995(); + void testForcepoint3(); void testExportToPicture(); void testTdf77340(); void testTdf79236(); @@ -360,6 +361,7 @@ public: CPPUNIT_TEST(testDeleteTableRedlines); CPPUNIT_TEST(testXFlatParagraph); CPPUNIT_TEST(testTdf81995); + CPPUNIT_TEST(testForcepoint3); CPPUNIT_TEST(testExportToPicture); CPPUNIT_TEST(testTdf77340); CPPUNIT_TEST(testTdf79236); @@ -1901,6 +1903,19 @@ void SwUiWriterTest::testTdf81995() } } +void SwUiWriterTest::testForcepoint3() +{ + createDoc("flowframe_null_ptr_deref.sample"); + uno::Sequence aDescriptor( comphelper::InitPropertySequence({ + { "FilterName", uno::Any(OUString("writer_pdf_Export")) }, + })); + utl::TempFile aTempFile; + uno::Reference xStorable(mxComponent, uno::UNO_QUERY); + // printing asserted in SwFrame::GetNextSctLeaf() + xStorable->storeToURL(aTempFile.GetURL(), aDescriptor); + aTempFile.EnableKillingFile(); +} + void SwUiWriterTest::testExportToPicture() { createDoc(); diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 206e9deac04e..e8eddce278c1 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -792,11 +792,14 @@ bool SwFrame::IsFootnoteAllowed() const if ( !IsInDocBody() ) return false; - // no footnotes in repeated headlines - const SwTabFrame *pTab = IsInTab() ? const_cast(this)->ImplFindTabFrame() : nullptr; - if (pTab && pTab->IsFollow()) - return !pTab->IsInHeadline( *this ); - + if ( IsInTab() ) + { + // no footnotes in repeated headlines + const SwTabFrame *pTab = const_cast(this)->ImplFindTabFrame(); + assert(pTab); + if ( pTab->IsFollow() ) + return !pTab->IsInHeadline( *this ); + } return true; } diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index ce3c2017ace0..8f68adf082c7 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -1614,6 +1614,10 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage ) SwLayoutFrame* pCellLeaf = nullptr; if (GetUpper()->IsInTab()) { + if (IsTabFrame()) + { + return nullptr; // table in section in table: split disabled for now + } // We are *in* a table (not an outermost SwTabFrame), see if there // is a follow cell frame created already. pCellLeaf = GetNextCellLeaf();