Kaydet (Commit) 92025973 authored tarafından Justin Luth's avatar Justin Luth

tdf#106572 writerfilter: don't write to dummy paragraph

I found a few existing unit tests that this fixes, and
a few unit tests that already worked without this. So
something else is at play here, but it doesn't appear
to be hurt by this fix since each one still starts
with "First Page" style.

Change-Id: Idc61279fc5fddc9df62b6ab7a9bcd3822d52cbbb
Reviewed-on: https://gerrit.libreoffice.org/59033Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
Tested-by: 's avatarJustin Luth <justin_luth@sil.org>
üst 0f369c16
......@@ -299,6 +299,9 @@ DECLARE_OOXMLEXPORT_TEST(testSegFaultWhileSave, "test_segfault_while_save.docx")
if (!pXmlDoc)
return;
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(6137), getXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tblGrid/w:gridCol[2]", "w").toInt32());
// tdf#106572 - preventative test matching danger conditions, but imported OK anyway
CPPUNIT_ASSERT_EQUAL(OUString("First Page"), getProperty<OUString>(getParagraphOrTable(1), "PageDescName"));
}
DECLARE_OOXMLEXPORT_TEST(fdo69656, "Table_cell_auto_width_fdo69656.docx")
......
......@@ -760,6 +760,11 @@ DECLARE_OOXMLEXPORT_TEST(testN779642, "n779642.docx")
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation", text::VertOrientation::BOTTOM, nValue);
xFrame->getPropertyValue("VertOrientRelation") >>= nValue;
CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation relation", text::RelOrientation::PAGE_PRINT_AREA, nValue);
// tdf#106572 - perhaps not the best test to hijack since this file
// produces an error in Word, but it nicely matches danger points,
// and has a different first footer, so nice visual confirmation.
CPPUNIT_ASSERT_EQUAL(OUString("First Page"), getProperty<OUString>(getParagraphOrTable(1), "PageDescName"));
}
DECLARE_OOXMLEXPORT_TEST(testTbLrHeight, "tblr-height.docx")
......
......@@ -1026,6 +1026,8 @@ uno::Reference< beans::XPropertySet > lcl_GetRangeProperties( bool bIsFirstSecti
uno::Reference< container::XEnumerationAccess > xEnumAccess( rDM_Impl.GetBodyText(), uno::UNO_QUERY_THROW );
uno::Reference< container::XEnumeration > xEnum = xEnumAccess->createEnumeration();
xRangeProperties.set( xEnum->nextElement(), uno::UNO_QUERY_THROW );
if ( rDM_Impl.GetIsDummyParaAddedForTableInSection() && xEnum->hasMoreElements() )
xRangeProperties.set( xEnum->nextElement(), uno::UNO_QUERY_THROW );
}
else if ( xStartingRange.is() )
xRangeProperties.set( xStartingRange, uno::UNO_QUERY_THROW );
......
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