[Libreoffice-commits] core.git: sw/CppunitTest_sw_filters_test.mk sw/qa

Miklos Vajna vmiklos at suse.cz
Tue May 7 06:13:29 PDT 2013


 dev/null                                 |binary
 sw/CppunitTest_sw_filters_test.mk        |    7 +++++++
 sw/qa/core/data/ooxml/pass/fdo64256.docx |binary
 sw/qa/core/filters-test.cxx              |    5 +++++
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |    9 ++++-----
 5 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit cb088e6d20ce5411035c163f57ba1532657a7509
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Tue May 7 14:37:18 2013 +0200

    sw_filters_test: add support for ooxml files
    
    The motivation is that if -- after fixing a crash -- the document looks
    OK, then all the paperwork in the ooxmlimport isn't necessary, just drop
    in the file to qa/core/data/ooxml/pass/, and we're done.
    
    Change-Id: I2287189bd3c49c5e53489f9d89a6341685359b33

diff --git a/sw/CppunitTest_sw_filters_test.mk b/sw/CppunitTest_sw_filters_test.mk
index 641b381..df13402 100644
--- a/sw/CppunitTest_sw_filters_test.mk
+++ b/sw/CppunitTest_sw_filters_test.mk
@@ -58,12 +58,15 @@ $(eval $(call gb_CppunitTest_use_components,sw_filters_test,\
     configmgr/source/configmgr \
     dbaccess/util/dba \
     fileaccess/source/fileacc \
+    filter/source/config/cache/filterconfig1 \
     forms/util/frm \
     framework/util/fwk \
     i18npool/util/i18npool \
+    oox/util/oox \
     package/source/xstor/xstor \
     package/util/package2 \
     sax/source/expatwrap/expwrap \
+    sax/source/fastparser/fastsax \
     sfx2/util/sfx \
     svtools/util/svt \
     sw/util/msword \
@@ -71,7 +74,9 @@ $(eval $(call gb_CppunitTest_use_components,sw_filters_test,\
     toolkit/util/tk \
     ucb/source/core/ucb1 \
     ucb/source/ucp/file/ucpfile1 \
+    unotools/util/utl \
     unoxml/source/service/unoxml \
+    writerfilter/util/writerfilter \
 	$(if $(filter DESKTOP,$(BUILD_TYPE)),xmlhelp/util/ucpchelp1) \
 	xmloff/source/transform/xof \
     xmloff/util/xo \
@@ -79,4 +84,6 @@ $(eval $(call gb_CppunitTest_use_components,sw_filters_test,\
 
 $(eval $(call gb_CppunitTest_use_configuration,sw_filters_test))
 
+$(eval $(call gb_CppunitTest_use_filter_configuration,sw_filters_test))
+
 # vim: set noet sw=4 ts=4:
diff --git a/sw/qa/core/data/ooxml/fail/.gitignore b/sw/qa/core/data/ooxml/fail/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/sw/qa/core/data/ooxml/indeterminate/.gitignore b/sw/qa/core/data/ooxml/indeterminate/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/sw/qa/extras/ooxmlimport/data/fdo64256.docx b/sw/qa/core/data/ooxml/pass/fdo64256.docx
similarity index 100%
rename from sw/qa/extras/ooxmlimport/data/fdo64256.docx
rename to sw/qa/core/data/ooxml/pass/fdo64256.docx
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx
index d90627e..26fcd58 100644
--- a/sw/qa/core/filters-test.cxx
+++ b/sw/qa/core/filters-test.cxx
@@ -107,6 +107,11 @@ void SwFiltersTest::testCVEs()
     testDir(OUString("Text (encoded)"),
             getURLFromSrc("/sw/qa/core/data/txt/"),
             OUString(FILTER_TEXT_DLG));
+
+    testDir(OUString("MS Word 2007 XML"),
+            getURLFromSrc("/sw/qa/core/data/ooxml/"),
+            OUString(),
+            SFX_FILTER_STARONEFILTER);
 }
 
 void SwFiltersTest::setUp()
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index cadc68b..8c64063 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -77,7 +77,7 @@ public:
     void testN778140();
     void testN778828();
     void testInk();
-    void testNoCrash();
+    void testN779834();
     void testN779627();
     void testN779941();
     void testFdo55187();
@@ -157,7 +157,7 @@ void Test::run()
         {"n778140.docx", &Test::testN778140},
         {"n778828.docx", &Test::testN778828},
         {"ink.docx", &Test::testInk},
-        {"n779834.docx", &Test::testNoCrash},
+        {"n779834.docx", &Test::testN779834},
         {"n779627.docx", &Test::testN779627},
         {"n779941.docx", &Test::testN779941},
         {"fdo55187.docx", &Test::testFdo55187},
@@ -191,7 +191,6 @@ void Test::run()
         {"n592908-frame.docx", &Test::testN592908_Frame},
         {"n592908-picture.docx", &Test::testN592908_Picture},
         {"n779630.docx", &Test::testN779630},
-        {"fdo64256.docx", &Test::testNoCrash},
     };
     header();
     for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -879,9 +878,9 @@ void Test::testInk()
     CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.drawing.OpenBezierShape"));
 }
 
-void Test::testNoCrash()
+void Test::testN779834()
 {
-    // These documents simply crashed the importer.
+    // This document simply crashed the importer.
 }
 
 void Test::testN779627()


More information about the Libreoffice-commits mailing list