diff options
author | Justin Luth <justin_luth@sil.org> | 2017-03-09 17:29:34 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-10 12:44:40 +0000 |
commit | 3a9e87d14eb4bf9415dd96c77cbec75c03e9682c (patch) | |
tree | 9bc3bd308861ed8f3fc4138cc0bc5c8075132e1a /sw | |
parent | 3d21afb8aac5da0139d85498607d40c748b6db53 (diff) |
ooxmlexport: move tdf103931 unit test to ooxmlimport
Visually, this unit test round-trips terribly.
During round-tripping, the 3 columns (related to textsections)
in the very first section get transferred into the pagedesc. Thus the
first section is "lost". For some unknown reason, another section
is added later on. So, cummulatively, the section count remained
the same, but whatever fixes these two situations will also affect
the section count.
However, it should work fine as an import only test. There ARE
three sections in MSWord after all.
Change-Id: I1973977f5c5a45189896b10cacd757600e7684db
Reviewed-on: https://gerrit.libreoffice.org/35012
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 8 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf103931.docx (renamed from sw/qa/extras/ooxmlexport/data/tdf103931.docx) | bin | 3542 -> 3542 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 9 |
3 files changed, 9 insertions, 8 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index 3ab81d2b5b97..a54d0239e6b6 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -241,14 +241,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106001_2, "tdf106001-2.odt") assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:rPr/w:w","val","600"); } -DECLARE_OOXMLEXPORT_TEST(testTdf103931, "tdf103931.docx") -{ - uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY); - uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY); - // This was 2, the last (empty) section of the document was lost on import. - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), xTextSections->getCount()); -} - CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/extras/ooxmlexport/data/tdf103931.docx b/sw/qa/extras/ooxmlimport/data/tdf103931.docx Binary files differindex 094fe1ba91cf..094fe1ba91cf 100644 --- a/sw/qa/extras/ooxmlexport/data/tdf103931.docx +++ b/sw/qa/extras/ooxmlimport/data/tdf103931.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 28edf90f1e8c..bb012fc87776 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -131,6 +131,15 @@ DECLARE_SW_IMPORT_TEST(testMathMalformedXml, "math-malformed_xml.docx", nullptr, CPPUNIT_ASSERT(!mxComponent.is()); } +DECLARE_OOXMLIMPORT_TEST(testTdf103931, "tdf103931.docx") +{ + uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY); + // This was 2, the last (empty) section of the document was lost on import. + // (import test only: Columns/Sections do not round-trip well) + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), xTextSections->getCount()); +} + DECLARE_OOXMLIMPORT_TEST(testTdf103975_notPageBreakB, "tdf103975_notPageBreakB.docx") { // turn on View Formatting Marks to see these documents. |