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

tdf#75573 - relocate code: alternate stream already started

moving this keeps the original fix and prevents losing a table
in this unit test

fixes regression commit ecea3431

Change-Id: I5e94760649020ddf1c468d52b91aaf0521bbfdda
Reviewed-on: https://gerrit.libreoffice.org/32269Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
Tested-by: 's avatarJustin Luth <justin_luth@sil.org>
üst e37563c3
......@@ -726,6 +726,21 @@ DECLARE_OOXMLIMPORT_TEST(testTdf75573, "tdf75573_page1frame.docx")
CPPUNIT_ASSERT(!bProt);
}
DECLARE_OOXMLIMPORT_TEST(testTdf75573_lostTable, "tdf75573_lostTable.docx")
{
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL_MESSAGE("# of tables", 1, xTables->getCount() );
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL_MESSAGE("# of frames/shapes", 0, xDraws->getCount() );
CPPUNIT_ASSERT_EQUAL_MESSAGE("# of paragraphs", 6, getParagraphs() );
CPPUNIT_ASSERT_EQUAL_MESSAGE("# of pages", 3, getPages() );
}
DECLARE_OOXMLIMPORT_TEST(testMultiColumnSeparator, "multi-column-separator-with-line.docx")
{
uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(1, "First data."), "TextSection");
......
......@@ -5282,16 +5282,16 @@ void DomainMapper_Impl::substream(Id rName,
}
#endif
//finalize any waiting frames before starting alternate streams
CheckUnregisteredFrameConversion();
ExecuteFrameConversion();
appendTableManager();
// Appending a TableManager resets its TableHandler, so we need to append
// that as well, or tables won't be imported properly in headers/footers.
appendTableHandler();
getTableManager().startLevel();
//finalize any waiting frames before starting alternate streams
CheckUnregisteredFrameConversion();
ExecuteFrameConversion();
//import of page header/footer
switch( rName )
......
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