[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - sw/qa writerfilter/source
Justin Luth
justin_luth at sil.org
Fri Dec 23 04:20:50 UTC 2016
sw/qa/extras/ooxmlimport/data/tdf75573_lostTable.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 +++++++++++++
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 8 ++++----
3 files changed, 17 insertions(+), 4 deletions(-)
New commits:
commit 4cbe2e712bab42e95fb55d78da6b1daf326f7f1b
Author: Justin Luth <justin_luth at sil.org>
Date: Wed Dec 21 07:32:14 2016 +0300
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 ecea3431ca761369d8180a74eba2877533050516
Change-Id: I5e94760649020ddf1c468d52b91aaf0521bbfdda
Reviewed-on: https://gerrit.libreoffice.org/32269
Reviewed-by: Justin Luth <justin_luth at sil.org>
Tested-by: Justin Luth <justin_luth at sil.org>
(cherry picked from commit 34324bff1252dc5a51c9408f9502654453f319b6)
Reviewed-on: https://gerrit.libreoffice.org/32324
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/qa/extras/ooxmlimport/data/tdf75573_lostTable.docx b/sw/qa/extras/ooxmlimport/data/tdf75573_lostTable.docx
new file mode 100644
index 0000000..8ddb661
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf75573_lostTable.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index eb45e22..b1ccafc 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -726,6 +726,19 @@ 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", sal_Int32(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", sal_Int32(0), xDraws->getCount() );
+
+ 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 013518f..bfecc4e 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 )
More information about the Libreoffice-commits
mailing list