Kaydet (Commit) 0fe112db authored tarafından Caolán McNamara's avatar Caolán McNamara

forcepoint#80 avoid crash

Change-Id: I7a96d2951fbcd5f53a2f7e65e8c07926fc035a11
Reviewed-on: https://gerrit.libreoffice.org/70936
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 453e6fb7
This diff is collapsed.
......@@ -206,6 +206,7 @@ public:
void testXFlatParagraph();
void testTdf81995();
void testForcepoint3();
void testForcepoint80();
void testExportToPicture();
void testTdf77340();
void testTdf79236();
......@@ -410,6 +411,7 @@ public:
CPPUNIT_TEST(testXFlatParagraph);
CPPUNIT_TEST(testTdf81995);
CPPUNIT_TEST(testForcepoint3);
CPPUNIT_TEST(testForcepoint80);
CPPUNIT_TEST(testExportToPicture);
CPPUNIT_TEST(testTdf77340);
CPPUNIT_TEST(testTdf79236);
......@@ -2019,6 +2021,25 @@ void SwUiWriterTest::testForcepoint3()
aTempFile.EnableKillingFile();
}
void SwUiWriterTest::testForcepoint80()
{
try
{
createDoc("forcepoint80-1.rtf");
uno::Sequence<beans::PropertyValue> aDescriptor( comphelper::InitPropertySequence({
{ "FilterName", uno::Any(OUString("writer_pdf_Export")) },
}));
utl::TempFile aTempFile;
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
// printing asserted in SwCellFrame::FindStartEndOfRowSpanCell
xStorable->storeToURL(aTempFile.GetURL(), aDescriptor);
aTempFile.EnableKillingFile();
}
catch(...)
{
}
}
void SwUiWriterTest::testExportToPicture()
{
createDoc();
......
......@@ -482,6 +482,7 @@ void SwLayoutFrame::DestroyImpl()
if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() )
{
bool bFatalError = false;
while ( pFrame )
{
//First delete the Objs of the Frame because they can't unregister
......@@ -520,12 +521,19 @@ void SwLayoutFrame::DestroyImpl()
}
}
pFrame->RemoveFromLayout();
//forcepoint#74, testcase swanchoredobject_considerobjwrapinfluenceonobjpos
// see testForcepoint80
if (pFrame->IsDeleteForbidden())
throw std::logic_error("DeleteForbidden");
{
pFrame->AllowDelete();
bFatalError = true;
}
SwFrame::DestroyFrame(pFrame);
pFrame = m_pLower;
}
if (bFatalError)
throw std::logic_error("DeleteForbidden");
//Delete the Flys, the last one also deletes the array.
while ( GetDrawObjs() && GetDrawObjs()->size() )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment