dev/null                                     |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx    |    8 --------
 sw/qa/extras/ooxmlimport/data/tdf103931.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx     |    9 +++++++++
 4 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 3a9e87d14eb4bf9415dd96c77cbec75c03e9682c
Author: Justin Luth <justin_l...@sil.org>
Date:   Thu Mar 9 17:29:34 2017 +0300

    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 <c...@libreoffice.org>
    Reviewed-by: Justin Luth <justin_l...@sil.org>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 3ab81d2..a54d023 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
similarity index 100%
rename from sw/qa/extras/ooxmlexport/data/tdf103931.docx
rename to sw/qa/extras/ooxmlimport/data/tdf103931.docx
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 28edf90..bb012fc 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.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to