diff options
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf75573_lostTable.docx | bin | 0 -> 25590 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 15 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 8 |
3 files changed, 19 insertions, 4 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf75573_lostTable.docx b/sw/qa/extras/ooxmlimport/data/tdf75573_lostTable.docx Binary files differnew file mode 100644 index 000000000000..8ddb6619e0ad --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf75573_lostTable.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index eb45e2270a87..2372307b3778 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -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"); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 9997f1a076f1..07e008feb32e 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -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 ) |