[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - 8 commits - external/libebook filter/Configuration_filter.mk filter/source writerperfect/CppunitTest_writerperfect_stream.mk writerperfect/Library_wpftdraw.mk writerperfect/qa writerperfect/source

David Tardon dtardon at redhat.com
Thu May 29 04:59:21 PDT 2014


 dev/null                                                              |binary
 external/libebook/0001-parse-zipped-FictionBook-2-files-again.patch   |   58 
 external/libebook/UnpackedTarball_libebook.mk                         |    1 
 filter/Configuration_filter.mk                                        |   17 
 filter/source/config/fragments/filters/Beagle_Works_Draw.xcu          |   29 
 filter/source/config/fragments/filters/ClarisWorks_Draw.xcu           |   30 
 filter/source/config/fragments/filters/Great_Works_Draw.xcu           |   29 
 filter/source/config/fragments/filters/MacPaint_Draw.xcu              |   30 
 filter/source/config/fragments/filters/Mac_Works_Draw.xcu             |   30 
 filter/source/config/fragments/filters/SuperPaint_Draw.xcu            |   30 
 filter/source/config/fragments/types/draw_Beagle_Works.xcu            |   29 
 filter/source/config/fragments/types/draw_ClarisWorks.xcu             |   29 
 filter/source/config/fragments/types/draw_Great_Works.xcu             |   29 
 filter/source/config/fragments/types/draw_MacPaint.xcu                |   29 
 filter/source/config/fragments/types/draw_Mac_Works.xcu               |   29 
 filter/source/config/fragments/types/draw_SuperPaint.xcu              |   29 
 writerperfect/CppunitTest_writerperfect_stream.mk                     |    1 
 writerperfect/Library_wpftdraw.mk                                     |    2 
 writerperfect/qa/unit/WPXSvStreamTest.cxx                             |   46 
 writerperfect/qa/unit/WpftDrawFilterTest.cxx                          |   12 
 writerperfect/qa/unit/WpftImpressFilterTest.cxx                       |    2 
 writerperfect/qa/unit/WpftWriterFilterTest.cxx                        |   10 
 writerperfect/qa/unit/data/draw/libwpg/pass/WPG1.wpg                  |binary
 writerperfect/qa/unit/data/impress/libetonyek/fail/v6.zip             |binary
 writerperfect/qa/unit/data/impress/libetonyek/pass/v2.zip             |binary
 writerperfect/qa/unit/data/impress/libetonyek/pass/v3.zip             |binary
 writerperfect/qa/unit/data/impress/libetonyek/pass/v4.zip             |binary
 writerperfect/qa/unit/data/impress/libetonyek/pass/v5.key             |binary
 writerperfect/qa/unit/data/libabw/pass/hello.abw                      |   32 
 writerperfect/qa/unit/data/libe-book/pass/FictionBook2.fb2            |   26 
 writerperfect/qa/unit/data/libmwaw/fail/HanMac_2.0.4J.hqx             |  178 -
 writerperfect/qa/unit/data/libmwaw/pass/BeagleWorks_v1.hqx            |   49 
 writerperfect/qa/unit/data/libmwaw/pass/DOCMaker_4.hqx                | 1496 ----------
 writerperfect/qa/unit/data/libmwaw/pass/GreatWorks_v2.hqx             |  180 -
 writerperfect/qa/unit/data/libmwaw/pass/HanMac_2.0.6K.hqx             |   94 
 writerperfect/qa/unit/data/libmwaw/pass/MarinerWrite_1.6L.hqx         |  222 -
 writerperfect/qa/unit/data/libmwaw/pass/More.hqx                      |  123 
 writerperfect/qa/unit/data/libmwaw/pass/NisusWriter_4.0.hqx           |  206 -
 writerperfect/qa/unit/data/stream/fdo40686-1.doc                      |binary
 writerperfect/qa/unit/data/stream/test.odt                            |binary
 writerperfect/qa/unit/data/writer/libabw/pass/hello.abw               |   32 
 writerperfect/qa/unit/data/writer/libabw/pass/hello.zabw              |binary
 writerperfect/qa/unit/data/writer/libe-book/fail/TCR.tcr              |binary
 writerperfect/qa/unit/data/writer/libe-book/pass/FictionBook2.fb2     |   26 
 writerperfect/qa/unit/data/writer/libe-book/pass/FictionBook2.fb2.zip |binary
 writerperfect/qa/unit/data/writer/libe-book/pass/PalmDOC.pdb          |binary
 writerperfect/qa/unit/data/writer/libe-book/pass/Plucker.pdb          |binary
 writerperfect/qa/unit/data/writer/libmwaw/fail/ClarisWorks_6.0.cwk    |binary
 writerperfect/qa/unit/data/writer/libmwaw/fail/HanMac_2.0.4J.hqx      |  178 +
 writerperfect/qa/unit/data/writer/libmwaw/pass/BeagleWorks_v1.hqx     |   49 
 writerperfect/qa/unit/data/writer/libmwaw/pass/ClarisWorks_1.0        |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/ClarisWorks_2.0        |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/DOCMaker_4.hqx         | 1496 ++++++++++
 writerperfect/qa/unit/data/writer/libmwaw/pass/FullWrite_1.0          |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/FullWrite_2.0          |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/GreatWorks_v2.hqx      |  180 +
 writerperfect/qa/unit/data/writer/libmwaw/pass/HanMac_2.0.6K.hqx      |   94 
 writerperfect/qa/unit/data/writer/libmwaw/pass/MacWrite_4.5           |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/MacWrite_Pro1.0        |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/MarinerWrite_1.6L.hqx  |  222 +
 writerperfect/qa/unit/data/writer/libmwaw/pass/MarinerWrite_3.5.hqx   |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWord_1.0      |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWord_3.0      |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWord_5.0      |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWorks_1.0     |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWorks_2.0     |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/MindWrite_2.1          |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/More.hqx               |  123 
 writerperfect/qa/unit/data/writer/libmwaw/pass/NisusWriter_4.0.hqx    |  206 +
 writerperfect/qa/unit/data/writer/libmwaw/pass/WriteNow_2.0           |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/WriteNow_4.0           |binary
 writerperfect/qa/unit/data/writer/libmwaw/pass/WriterPlus             |binary
 writerperfect/qa/unit/data/writer/libwpd/pass/WP1.wpd                 |binary
 writerperfect/qa/unit/data/writer/libwpd/pass/WP3.wpd                 |binary
 writerperfect/qa/unit/data/writer/libwpd/pass/WP4.wp                  |binary
 writerperfect/qa/unit/data/writer/libwpd/pass/WP5.wp                  |binary
 writerperfect/qa/unit/data/writer/libwpd/pass/WP6.wpd                 |binary
 writerperfect/source/draw/ImportFilterBase.cxx                        |    6 
 writerperfect/source/draw/ImportFilterBase.hxx                        |    3 
 writerperfect/source/draw/MWAWDrawImportFilter.cxx                    |  191 +
 writerperfect/source/draw/MWAWDrawImportFilter.hxx                    |   53 
 writerperfect/source/draw/wpftdraw.component                          |    4 
 writerperfect/source/draw/wpftdraw_genericfilter.cxx                  |    5 
 writerperfect/source/writer/EBookImportFilter.cxx                     |   17 
 writerperfect/source/writer/MSWorksImportFilter.cxx                   |   12 
 writerperfect/source/writer/MSWorksImportFilter.hxx                   |    1 
 writerperfect/source/writer/MWAWImportFilter.cxx                      |   52 
 87 files changed, 3418 insertions(+), 2639 deletions(-)

New commits:
commit 93f09843c0922341c52fbe78eb756c2eb2469608
Author: David Tardon <dtardon at redhat.com>
Date:   Thu May 29 13:33:04 2014 +0200

    re-enable libe-book integration test
    
    Change-Id: I217183d55607f16c3b996b27b131953962afee96
    (cherry picked from commit 5dfb6e74c68073eb1742c53393c683d5841de255)

diff --git a/writerperfect/qa/unit/WpftWriterFilterTest.cxx b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
index 2e60222..8028522 100644
--- a/writerperfect/qa/unit/WpftWriterFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
@@ -32,7 +32,7 @@ WpftWriterFilterTest::WpftWriterFilterTest()
 void WpftWriterFilterTest::test()
 {
     doTest("com.sun.star.comp.Writer.AbiWordImportFilter", "/writerperfect/qa/unit/data/writer/libabw/");
-    // doTest("org.libreoffice.comp.Writer.EBookImportFilter", "/writerperfect/qa/unit/data/writer/libe-book/");
+    doTest("org.libreoffice.comp.Writer.EBookImportFilter", "/writerperfect/qa/unit/data/writer/libe-book/");
     doTest("com.sun.star.comp.Writer.MSWorksImportFilter", "/writerperfect/qa/unit/data/writer/libwps/");
     // doTest("com.sun.star.comp.Writer.MWAWImportFilter", "/writerperfect/qa/unit/data/writer/libmwaw/");
     doTest("com.sun.star.comp.Writer.WordPerfectImportFilter", "/writerperfect/qa/unit/data/writer/libwpd/");
commit 5cfb2664d94e777d25b10d5339fbac18426e2789
Author: David Tardon <dtardon at redhat.com>
Date:   Thu May 29 13:31:54 2014 +0200

    parse zipped FictionBook 2 files again
    
    Change-Id: I04eda7844a5557f834f3ada2cef991b0a181c8a0
    (cherry picked from commit 2ac1d3949c383656e54d54556e52631cf4f45b71)

diff --git a/external/libebook/0001-parse-zipped-FictionBook-2-files-again.patch b/external/libebook/0001-parse-zipped-FictionBook-2-files-again.patch
new file mode 100644
index 0000000..d068e79
--- /dev/null
+++ b/external/libebook/0001-parse-zipped-FictionBook-2-files-again.patch
@@ -0,0 +1,58 @@
+From 5690c18cb2de1bf4f3cce3da8a2132303a0c731f Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Thu, 29 May 2014 13:30:13 +0200
+Subject: [PATCH] parse zipped FictionBook 2 files again
+
+---
+ src/lib/EBOOKDocument.cpp | 28 +++++++++++++++++++++++++++-
+ 1 file changed, 27 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/EBOOKDocument.cpp b/src/lib/EBOOKDocument.cpp
+index 5b8e7ec..c4f9913 100644
+--- a/src/lib/EBOOKDocument.cpp
++++ b/src/lib/EBOOKDocument.cpp
+@@ -427,6 +427,25 @@ EBOOKAPI EBOOKDocument::Confidence EBOOKDocument::isSupported(librevenge::RVNGIn
+       }
+     }
+ #endif
++
++    // TODO: This needs improvement: zipped FictionBook 2 files can contain images too...
++    if (1 == input->subStreamCount())
++    {
++      const librevenge::RVNGString name(input->subStreamName(0));
++      const unsigned long size = name.size();
++      const char *const cName = name.cstr();
++      if (equal(cName + (size - 4), cName + size, ".fb2"))
++      {
++        const scoped_ptr<RVNGInputStream> fb2(input->getSubStreamById(0));
++        const Type xmlType = detectXML(fb2.get());
++        if (TYPE_FICTIONBOOK2 == xmlType)
++        {
++          if (type)
++            *type = xmlType;
++          return CONFIDENCE_EXCELLENT;
++        }
++      }
++    }
+   }
+ 
+   Confidence confidence = CONFIDENCE_NONE;
+@@ -533,7 +552,14 @@ EBOOKAPI EBOOKDocument::Result EBOOKDocument::parse(librevenge::RVNGInputStream
+ #endif
+   case TYPE_FICTIONBOOK2 :
+   {
+-    FB2Parser parser(input_.get());
++    RVNGInputStreamPtr_t fb2Input(input_);
++    // TODO: this needs to handle package with images too
++    if (input_->isStructured())
++    {
++      assert(1 == input->subStreamCount());
++      fb2Input.reset(input->getSubStreamById(0));
++    }
++    FB2Parser parser(fb2Input.get());
+     return parser.parse(document) ? RESULT_OK : RESULT_UNKNOWN_ERROR;
+   }
+ #if defined ENABLE_EXPERIMENTAL
+-- 
+1.9.3
+
diff --git a/external/libebook/UnpackedTarball_libebook.mk b/external/libebook/UnpackedTarball_libebook.mk
index bcc098a..4986981 100644
--- a/external/libebook/UnpackedTarball_libebook.mk
+++ b/external/libebook/UnpackedTarball_libebook.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,1))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libebook,\
 	external/libebook/0001-blind-attempt-to-workaround-MSVC-bug.patch \
+	external/libebook/0001-parse-zipped-FictionBook-2-files-again.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
commit a45b0bcf91f228a1b2125c2c63cf68d692872534
Author: David Tardon <dtardon at redhat.com>
Date:   Thu May 29 13:03:31 2014 +0200

    fix return value for libe-book import filter
    
    Change-Id: Idd84489a3123d506166a24ff5c85a4e7f75ee676
    (cherry picked from commit 5fde8e38c127a872a66b8029b69aff55b01d6d88)

diff --git a/writerperfect/source/writer/EBookImportFilter.cxx b/writerperfect/source/writer/EBookImportFilter.cxx
index 3003768..efe5334 100644
--- a/writerperfect/source/writer/EBookImportFilter.cxx
+++ b/writerperfect/source/writer/EBookImportFilter.cxx
@@ -28,18 +28,23 @@ using libebook::EBOOKDocument;
 
 bool EBookImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator )
 {
+    EBOOKDocument::Type type = EBOOKDocument::TYPE_UNKNOWN;
+
     if (rFilterName == "FictionBook 2")
-        return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_FICTIONBOOK2);
+        type = EBOOKDocument::TYPE_FICTIONBOOK2;
     else if (rFilterName == "PalmDoc")
-        return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_PALMDOC);
+        type = EBOOKDocument::TYPE_PALMDOC;
     else if (rFilterName == "Plucker eBook")
-        return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_PLUCKER);
+        type = EBOOKDocument::TYPE_PLUCKER;
     else if (rFilterName == "eReader eBook")
-        return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_PEANUTPRESS);
+        type = EBOOKDocument::TYPE_PEANUTPRESS;
     else if (rFilterName == "TealDoc")
-        return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_TEALDOC);
+        type = EBOOKDocument::TYPE_TEALDOC;
     else if (rFilterName == "zTXT")
-        return EBOOKDocument::parse(&rInput, &rGenerator, EBOOKDocument::TYPE_ZTXT);
+        type = EBOOKDocument::TYPE_ZTXT;
+
+    if (EBOOKDocument::TYPE_UNKNOWN != type)
+        return EBOOKDocument::RESULT_OK == EBOOKDocument::parse(&rInput, &rGenerator, type);
 
     return false;
 }
commit ca8494e8717136c838a8b7a464005afca7165854
Author: David Tardon <dtardon at redhat.com>
Date:   Thu May 29 12:04:42 2014 +0200

    organize the test data files by test
    
    Change-Id: I769e7fc77513c795d51a763bbe3f1192c6fe4ac7
    (cherry picked from commit b2719a71a268e824b8d1b9c1187a464c07018989)

diff --git a/writerperfect/qa/unit/WPXSvStreamTest.cxx b/writerperfect/qa/unit/WPXSvStreamTest.cxx
index c2b4f20..0b6ea5d 100644
--- a/writerperfect/qa/unit/WPXSvStreamTest.cxx
+++ b/writerperfect/qa/unit/WPXSvStreamTest.cxx
@@ -67,8 +67,8 @@ private:
 };
 
 static const char aText[] = "hello world";
-static const char aOLEFile[] = "/writerperfect/qa/unit/data/fdo40686-1.doc";
-static const char aZipFile[] = "/writerperfect/qa/unit/data/test.odt";
+static const char aOLEFile[] = "/writerperfect/qa/unit/data/stream/fdo40686-1.doc";
+static const char aZipFile[] = "/writerperfect/qa/unit/data/stream/test.odt";
 
 shared_ptr<RVNGInputStream> lcl_createStream()
 {
diff --git a/writerperfect/qa/unit/WpftDrawFilterTest.cxx b/writerperfect/qa/unit/WpftDrawFilterTest.cxx
index 5118ff7..3de83ac 100644
--- a/writerperfect/qa/unit/WpftDrawFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftDrawFilterTest.cxx
@@ -31,12 +31,12 @@ WpftDrawFilterTest::WpftDrawFilterTest()
 
 void WpftDrawFilterTest::test()
 {
-    doTest("com.sun.star.comp.Draw.CDRImportFilter", "/writerperfect/qa/unit/data/libcdr/");
-    doTest("com.sun.star.comp.Draw.CMXImportFilter", "/writerperfect/qa/unit/data/libcdr-cmx/");
-    doTest("com.sun.star.comp.Draw.FreehandImportFilter", "/writerperfect/qa/unit/data/libfreehand/");
-    doTest("com.sun.star.comp.Draw.MSPUBImportFilter", "/writerperfect/qa/unit/data/libmspub/");
-    doTest("com.sun.star.comp.Draw.VisioImportFilter", "/writerperfect/qa/unit/data/libvisio/");
-    doTest("com.sun.star.comp.Draw.WPGImportFilter", "/writerperfect/qa/unit/data/libwpg/");
+    doTest("com.sun.star.comp.Draw.CDRImportFilter", "/writerperfect/qa/unit/data/draw/libcdr/");
+    doTest("com.sun.star.comp.Draw.CMXImportFilter", "/writerperfect/qa/unit/data/draw/libcdr-cmx/");
+    doTest("com.sun.star.comp.Draw.FreehandImportFilter", "/writerperfect/qa/unit/data/draw/libfreehand/");
+    doTest("com.sun.star.comp.Draw.MSPUBImportFilter", "/writerperfect/qa/unit/data/draw/libmspub/");
+    doTest("com.sun.star.comp.Draw.VisioImportFilter", "/writerperfect/qa/unit/data/draw/libvisio/");
+    doTest("com.sun.star.comp.Draw.WPGImportFilter", "/writerperfect/qa/unit/data/draw/libwpg/");
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(WpftDrawFilterTest);
diff --git a/writerperfect/qa/unit/WpftImpressFilterTest.cxx b/writerperfect/qa/unit/WpftImpressFilterTest.cxx
index 4286f8a..f148c8f 100644
--- a/writerperfect/qa/unit/WpftImpressFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftImpressFilterTest.cxx
@@ -31,7 +31,7 @@ WpftImpressFilterTest::WpftImpressFilterTest()
 
 void WpftImpressFilterTest::test()
 {
-    // doTest("org.libreoffice.comp.Impress.KeynoteImportFilter", "/writerperfect/qa/unit/data/libetonyek/");
+    // doTest("org.libreoffice.comp.Impress.KeynoteImportFilter", "/writerperfect/qa/unit/data/impress/libetonyek/");
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(WpftImpressFilterTest);
diff --git a/writerperfect/qa/unit/WpftWriterFilterTest.cxx b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
index 2afc4e7..2e60222 100644
--- a/writerperfect/qa/unit/WpftWriterFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
@@ -31,11 +31,11 @@ WpftWriterFilterTest::WpftWriterFilterTest()
 
 void WpftWriterFilterTest::test()
 {
-    doTest("com.sun.star.comp.Writer.AbiWordImportFilter", "/writerperfect/qa/unit/data/libabw/");
-    // doTest("org.libreoffice.comp.Writer.EBookImportFilter", "/writerperfect/qa/unit/data/libe-book/");
-    doTest("com.sun.star.comp.Writer.MSWorksImportFilter", "/writerperfect/qa/unit/data/libwps/");
-    // doTest("com.sun.star.comp.Writer.MWAWImportFilter", "/writerperfect/qa/unit/data/libmwaw/");
-    doTest("com.sun.star.comp.Writer.WordPerfectImportFilter", "/writerperfect/qa/unit/data/libwpd/");
+    doTest("com.sun.star.comp.Writer.AbiWordImportFilter", "/writerperfect/qa/unit/data/writer/libabw/");
+    // doTest("org.libreoffice.comp.Writer.EBookImportFilter", "/writerperfect/qa/unit/data/writer/libe-book/");
+    doTest("com.sun.star.comp.Writer.MSWorksImportFilter", "/writerperfect/qa/unit/data/writer/libwps/");
+    // doTest("com.sun.star.comp.Writer.MWAWImportFilter", "/writerperfect/qa/unit/data/writer/libmwaw/");
+    doTest("com.sun.star.comp.Writer.WordPerfectImportFilter", "/writerperfect/qa/unit/data/writer/libwpd/");
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(WpftWriterFilterTest);
diff --git a/writerperfect/qa/unit/data/libabw/fail/.gitignore b/writerperfect/qa/unit/data/draw/libcdr-cmx/fail/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libabw/fail/.gitignore
rename to writerperfect/qa/unit/data/draw/libcdr-cmx/fail/.gitignore
diff --git a/writerperfect/qa/unit/data/libabw/indeterminate/.gitignore b/writerperfect/qa/unit/data/draw/libcdr-cmx/indeterminate/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libabw/indeterminate/.gitignore
rename to writerperfect/qa/unit/data/draw/libcdr-cmx/indeterminate/.gitignore
diff --git a/writerperfect/qa/unit/data/libcdr-cmx/fail/.gitignore b/writerperfect/qa/unit/data/draw/libcdr-cmx/pass/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libcdr-cmx/fail/.gitignore
rename to writerperfect/qa/unit/data/draw/libcdr-cmx/pass/.gitignore
diff --git a/writerperfect/qa/unit/data/libcdr-cmx/indeterminate/.gitignore b/writerperfect/qa/unit/data/draw/libcdr/fail/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libcdr-cmx/indeterminate/.gitignore
rename to writerperfect/qa/unit/data/draw/libcdr/fail/.gitignore
diff --git a/writerperfect/qa/unit/data/libcdr-cmx/pass/.gitignore b/writerperfect/qa/unit/data/draw/libcdr/indeterminate/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libcdr-cmx/pass/.gitignore
rename to writerperfect/qa/unit/data/draw/libcdr/indeterminate/.gitignore
diff --git a/writerperfect/qa/unit/data/libcdr/fail/.gitignore b/writerperfect/qa/unit/data/draw/libcdr/pass/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libcdr/fail/.gitignore
rename to writerperfect/qa/unit/data/draw/libcdr/pass/.gitignore
diff --git a/writerperfect/qa/unit/data/libcdr/indeterminate/.gitignore b/writerperfect/qa/unit/data/draw/libfreehand/fail/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libcdr/indeterminate/.gitignore
rename to writerperfect/qa/unit/data/draw/libfreehand/fail/.gitignore
diff --git a/writerperfect/qa/unit/data/libcdr/pass/.gitignore b/writerperfect/qa/unit/data/draw/libfreehand/indeterminate/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libcdr/pass/.gitignore
rename to writerperfect/qa/unit/data/draw/libfreehand/indeterminate/.gitignore
diff --git a/writerperfect/qa/unit/data/libe-book/indeterminate/.gitignore b/writerperfect/qa/unit/data/draw/libfreehand/pass/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libe-book/indeterminate/.gitignore
rename to writerperfect/qa/unit/data/draw/libfreehand/pass/.gitignore
diff --git a/writerperfect/qa/unit/data/libetonyek/indeterminate/.gitignore b/writerperfect/qa/unit/data/draw/libmspub/fail/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libetonyek/indeterminate/.gitignore
rename to writerperfect/qa/unit/data/draw/libmspub/fail/.gitignore
diff --git a/writerperfect/qa/unit/data/libfreehand/fail/.gitignore b/writerperfect/qa/unit/data/draw/libmspub/indeterminate/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libfreehand/fail/.gitignore
rename to writerperfect/qa/unit/data/draw/libmspub/indeterminate/.gitignore
diff --git a/writerperfect/qa/unit/data/libfreehand/indeterminate/.gitignore b/writerperfect/qa/unit/data/draw/libmspub/pass/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libfreehand/indeterminate/.gitignore
rename to writerperfect/qa/unit/data/draw/libmspub/pass/.gitignore
diff --git a/writerperfect/qa/unit/data/libfreehand/pass/.gitignore b/writerperfect/qa/unit/data/draw/libvisio/fail/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libfreehand/pass/.gitignore
rename to writerperfect/qa/unit/data/draw/libvisio/fail/.gitignore
diff --git a/writerperfect/qa/unit/data/libmspub/fail/.gitignore b/writerperfect/qa/unit/data/draw/libvisio/indeterminate/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libmspub/fail/.gitignore
rename to writerperfect/qa/unit/data/draw/libvisio/indeterminate/.gitignore
diff --git a/writerperfect/qa/unit/data/libmspub/indeterminate/.gitignore b/writerperfect/qa/unit/data/draw/libvisio/pass/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libmspub/indeterminate/.gitignore
rename to writerperfect/qa/unit/data/draw/libvisio/pass/.gitignore
diff --git a/writerperfect/qa/unit/data/libmspub/pass/.gitignore b/writerperfect/qa/unit/data/draw/libwpg/fail/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libmspub/pass/.gitignore
rename to writerperfect/qa/unit/data/draw/libwpg/fail/.gitignore
diff --git a/writerperfect/qa/unit/data/libmwaw/indeterminate/.gitignore b/writerperfect/qa/unit/data/draw/libwpg/indeterminate/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/indeterminate/.gitignore
rename to writerperfect/qa/unit/data/draw/libwpg/indeterminate/.gitignore
diff --git a/writerperfect/qa/unit/data/libwpg/pass/WPG1.wpg b/writerperfect/qa/unit/data/draw/libwpg/pass/WPG1.wpg
similarity index 100%
rename from writerperfect/qa/unit/data/libwpg/pass/WPG1.wpg
rename to writerperfect/qa/unit/data/draw/libwpg/pass/WPG1.wpg
diff --git a/writerperfect/qa/unit/data/libetonyek/fail/v6.zip b/writerperfect/qa/unit/data/impress/libetonyek/fail/v6.zip
similarity index 100%
rename from writerperfect/qa/unit/data/libetonyek/fail/v6.zip
rename to writerperfect/qa/unit/data/impress/libetonyek/fail/v6.zip
diff --git a/writerperfect/qa/unit/data/libvisio/fail/.gitignore b/writerperfect/qa/unit/data/impress/libetonyek/indeterminate/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libvisio/fail/.gitignore
rename to writerperfect/qa/unit/data/impress/libetonyek/indeterminate/.gitignore
diff --git a/writerperfect/qa/unit/data/libetonyek/pass/v2.zip b/writerperfect/qa/unit/data/impress/libetonyek/pass/v2.zip
similarity index 100%
rename from writerperfect/qa/unit/data/libetonyek/pass/v2.zip
rename to writerperfect/qa/unit/data/impress/libetonyek/pass/v2.zip
diff --git a/writerperfect/qa/unit/data/libetonyek/pass/v3.zip b/writerperfect/qa/unit/data/impress/libetonyek/pass/v3.zip
similarity index 100%
rename from writerperfect/qa/unit/data/libetonyek/pass/v3.zip
rename to writerperfect/qa/unit/data/impress/libetonyek/pass/v3.zip
diff --git a/writerperfect/qa/unit/data/libetonyek/pass/v4.zip b/writerperfect/qa/unit/data/impress/libetonyek/pass/v4.zip
similarity index 100%
rename from writerperfect/qa/unit/data/libetonyek/pass/v4.zip
rename to writerperfect/qa/unit/data/impress/libetonyek/pass/v4.zip
diff --git a/writerperfect/qa/unit/data/libetonyek/pass/v5.key b/writerperfect/qa/unit/data/impress/libetonyek/pass/v5.key
similarity index 100%
rename from writerperfect/qa/unit/data/libetonyek/pass/v5.key
rename to writerperfect/qa/unit/data/impress/libetonyek/pass/v5.key
diff --git a/writerperfect/qa/unit/data/fdo40686-1.doc b/writerperfect/qa/unit/data/stream/fdo40686-1.doc
similarity index 100%
rename from writerperfect/qa/unit/data/fdo40686-1.doc
rename to writerperfect/qa/unit/data/stream/fdo40686-1.doc
diff --git a/writerperfect/qa/unit/data/test.odt b/writerperfect/qa/unit/data/stream/test.odt
similarity index 100%
rename from writerperfect/qa/unit/data/test.odt
rename to writerperfect/qa/unit/data/stream/test.odt
diff --git a/writerperfect/qa/unit/data/libvisio/indeterminate/.gitignore b/writerperfect/qa/unit/data/writer/libabw/fail/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libvisio/indeterminate/.gitignore
rename to writerperfect/qa/unit/data/writer/libabw/fail/.gitignore
diff --git a/writerperfect/qa/unit/data/libvisio/pass/.gitignore b/writerperfect/qa/unit/data/writer/libabw/indeterminate/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libvisio/pass/.gitignore
rename to writerperfect/qa/unit/data/writer/libabw/indeterminate/.gitignore
diff --git a/writerperfect/qa/unit/data/libabw/pass/hello.abw b/writerperfect/qa/unit/data/writer/libabw/pass/hello.abw
similarity index 100%
rename from writerperfect/qa/unit/data/libabw/pass/hello.abw
rename to writerperfect/qa/unit/data/writer/libabw/pass/hello.abw
diff --git a/writerperfect/qa/unit/data/libabw/pass/hello.zabw b/writerperfect/qa/unit/data/writer/libabw/pass/hello.zabw
similarity index 100%
rename from writerperfect/qa/unit/data/libabw/pass/hello.zabw
rename to writerperfect/qa/unit/data/writer/libabw/pass/hello.zabw
diff --git a/writerperfect/qa/unit/data/libe-book/fail/TCR.tcr b/writerperfect/qa/unit/data/writer/libe-book/fail/TCR.tcr
similarity index 100%
rename from writerperfect/qa/unit/data/libe-book/fail/TCR.tcr
rename to writerperfect/qa/unit/data/writer/libe-book/fail/TCR.tcr
diff --git a/writerperfect/qa/unit/data/libwpd/fail/.gitignore b/writerperfect/qa/unit/data/writer/libe-book/indeterminate/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libwpd/fail/.gitignore
rename to writerperfect/qa/unit/data/writer/libe-book/indeterminate/.gitignore
diff --git a/writerperfect/qa/unit/data/libe-book/pass/FictionBook2.fb2 b/writerperfect/qa/unit/data/writer/libe-book/pass/FictionBook2.fb2
similarity index 100%
rename from writerperfect/qa/unit/data/libe-book/pass/FictionBook2.fb2
rename to writerperfect/qa/unit/data/writer/libe-book/pass/FictionBook2.fb2
diff --git a/writerperfect/qa/unit/data/libe-book/pass/FictionBook2.fb2.zip b/writerperfect/qa/unit/data/writer/libe-book/pass/FictionBook2.fb2.zip
similarity index 100%
rename from writerperfect/qa/unit/data/libe-book/pass/FictionBook2.fb2.zip
rename to writerperfect/qa/unit/data/writer/libe-book/pass/FictionBook2.fb2.zip
diff --git a/writerperfect/qa/unit/data/libe-book/pass/PalmDOC.pdb b/writerperfect/qa/unit/data/writer/libe-book/pass/PalmDOC.pdb
similarity index 100%
rename from writerperfect/qa/unit/data/libe-book/pass/PalmDOC.pdb
rename to writerperfect/qa/unit/data/writer/libe-book/pass/PalmDOC.pdb
diff --git a/writerperfect/qa/unit/data/libe-book/pass/Plucker.pdb b/writerperfect/qa/unit/data/writer/libe-book/pass/Plucker.pdb
similarity index 100%
rename from writerperfect/qa/unit/data/libe-book/pass/Plucker.pdb
rename to writerperfect/qa/unit/data/writer/libe-book/pass/Plucker.pdb
diff --git a/writerperfect/qa/unit/data/libmwaw/fail/ClarisWorks_6.0.cwk b/writerperfect/qa/unit/data/writer/libmwaw/fail/ClarisWorks_6.0.cwk
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/fail/ClarisWorks_6.0.cwk
rename to writerperfect/qa/unit/data/writer/libmwaw/fail/ClarisWorks_6.0.cwk
diff --git a/writerperfect/qa/unit/data/libmwaw/fail/HanMac_2.0.4J.hqx b/writerperfect/qa/unit/data/writer/libmwaw/fail/HanMac_2.0.4J.hqx
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/fail/HanMac_2.0.4J.hqx
rename to writerperfect/qa/unit/data/writer/libmwaw/fail/HanMac_2.0.4J.hqx
diff --git a/writerperfect/qa/unit/data/libwpd/indeterminate/.gitignore b/writerperfect/qa/unit/data/writer/libmwaw/indeterminate/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libwpd/indeterminate/.gitignore
rename to writerperfect/qa/unit/data/writer/libmwaw/indeterminate/.gitignore
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/BeagleWorks_v1.hqx b/writerperfect/qa/unit/data/writer/libmwaw/pass/BeagleWorks_v1.hqx
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/BeagleWorks_v1.hqx
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/BeagleWorks_v1.hqx
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/ClarisWorks_1.0 b/writerperfect/qa/unit/data/writer/libmwaw/pass/ClarisWorks_1.0
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/ClarisWorks_1.0
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/ClarisWorks_1.0
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/ClarisWorks_2.0 b/writerperfect/qa/unit/data/writer/libmwaw/pass/ClarisWorks_2.0
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/ClarisWorks_2.0
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/ClarisWorks_2.0
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/DOCMaker_4.hqx b/writerperfect/qa/unit/data/writer/libmwaw/pass/DOCMaker_4.hqx
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/DOCMaker_4.hqx
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/DOCMaker_4.hqx
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/FullWrite_1.0 b/writerperfect/qa/unit/data/writer/libmwaw/pass/FullWrite_1.0
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/FullWrite_1.0
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/FullWrite_1.0
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/FullWrite_2.0 b/writerperfect/qa/unit/data/writer/libmwaw/pass/FullWrite_2.0
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/FullWrite_2.0
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/FullWrite_2.0
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/GreatWorks_v2.hqx b/writerperfect/qa/unit/data/writer/libmwaw/pass/GreatWorks_v2.hqx
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/GreatWorks_v2.hqx
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/GreatWorks_v2.hqx
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/HanMac_2.0.6K.hqx b/writerperfect/qa/unit/data/writer/libmwaw/pass/HanMac_2.0.6K.hqx
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/HanMac_2.0.6K.hqx
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/HanMac_2.0.6K.hqx
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/MacWrite_4.5 b/writerperfect/qa/unit/data/writer/libmwaw/pass/MacWrite_4.5
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/MacWrite_4.5
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/MacWrite_4.5
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/MacWrite_Pro1.0 b/writerperfect/qa/unit/data/writer/libmwaw/pass/MacWrite_Pro1.0
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/MacWrite_Pro1.0
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/MacWrite_Pro1.0
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/MarinerWrite_1.6L.hqx b/writerperfect/qa/unit/data/writer/libmwaw/pass/MarinerWrite_1.6L.hqx
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/MarinerWrite_1.6L.hqx
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/MarinerWrite_1.6L.hqx
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/MarinerWrite_3.5.hqx b/writerperfect/qa/unit/data/writer/libmwaw/pass/MarinerWrite_3.5.hqx
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/MarinerWrite_3.5.hqx
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/MarinerWrite_3.5.hqx
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/MicrosoftWord_1.0 b/writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWord_1.0
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/MicrosoftWord_1.0
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWord_1.0
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/MicrosoftWord_3.0 b/writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWord_3.0
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/MicrosoftWord_3.0
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWord_3.0
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/MicrosoftWord_5.0 b/writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWord_5.0
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/MicrosoftWord_5.0
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWord_5.0
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/MicrosoftWorks_1.0 b/writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWorks_1.0
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/MicrosoftWorks_1.0
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWorks_1.0
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/MicrosoftWorks_2.0 b/writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWorks_2.0
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/MicrosoftWorks_2.0
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/MicrosoftWorks_2.0
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/MindWrite_2.1 b/writerperfect/qa/unit/data/writer/libmwaw/pass/MindWrite_2.1
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/MindWrite_2.1
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/MindWrite_2.1
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/More.hqx b/writerperfect/qa/unit/data/writer/libmwaw/pass/More.hqx
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/More.hqx
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/More.hqx
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/NisusWriter_4.0.hqx b/writerperfect/qa/unit/data/writer/libmwaw/pass/NisusWriter_4.0.hqx
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/NisusWriter_4.0.hqx
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/NisusWriter_4.0.hqx
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/WriteNow_2.0 b/writerperfect/qa/unit/data/writer/libmwaw/pass/WriteNow_2.0
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/WriteNow_2.0
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/WriteNow_2.0
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/WriteNow_4.0 b/writerperfect/qa/unit/data/writer/libmwaw/pass/WriteNow_4.0
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/WriteNow_4.0
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/WriteNow_4.0
diff --git a/writerperfect/qa/unit/data/libmwaw/pass/WriterPlus b/writerperfect/qa/unit/data/writer/libmwaw/pass/WriterPlus
similarity index 100%
rename from writerperfect/qa/unit/data/libmwaw/pass/WriterPlus
rename to writerperfect/qa/unit/data/writer/libmwaw/pass/WriterPlus
diff --git a/writerperfect/qa/unit/data/libwpg/fail/.gitignore b/writerperfect/qa/unit/data/writer/libwpd/fail/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libwpg/fail/.gitignore
rename to writerperfect/qa/unit/data/writer/libwpd/fail/.gitignore
diff --git a/writerperfect/qa/unit/data/libwpg/indeterminate/.gitignore b/writerperfect/qa/unit/data/writer/libwpd/indeterminate/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libwpg/indeterminate/.gitignore
rename to writerperfect/qa/unit/data/writer/libwpd/indeterminate/.gitignore
diff --git a/writerperfect/qa/unit/data/libwpd/pass/WP1.wpd b/writerperfect/qa/unit/data/writer/libwpd/pass/WP1.wpd
similarity index 100%
rename from writerperfect/qa/unit/data/libwpd/pass/WP1.wpd
rename to writerperfect/qa/unit/data/writer/libwpd/pass/WP1.wpd
diff --git a/writerperfect/qa/unit/data/libwpd/pass/WP3.wpd b/writerperfect/qa/unit/data/writer/libwpd/pass/WP3.wpd
similarity index 100%
rename from writerperfect/qa/unit/data/libwpd/pass/WP3.wpd
rename to writerperfect/qa/unit/data/writer/libwpd/pass/WP3.wpd
diff --git a/writerperfect/qa/unit/data/libwpd/pass/WP4.wp b/writerperfect/qa/unit/data/writer/libwpd/pass/WP4.wp
similarity index 100%
rename from writerperfect/qa/unit/data/libwpd/pass/WP4.wp
rename to writerperfect/qa/unit/data/writer/libwpd/pass/WP4.wp
diff --git a/writerperfect/qa/unit/data/libwpd/pass/WP5.wp b/writerperfect/qa/unit/data/writer/libwpd/pass/WP5.wp
similarity index 100%
rename from writerperfect/qa/unit/data/libwpd/pass/WP5.wp
rename to writerperfect/qa/unit/data/writer/libwpd/pass/WP5.wp
diff --git a/writerperfect/qa/unit/data/libwpd/pass/WP6.wpd b/writerperfect/qa/unit/data/writer/libwpd/pass/WP6.wpd
similarity index 100%
rename from writerperfect/qa/unit/data/libwpd/pass/WP6.wpd
rename to writerperfect/qa/unit/data/writer/libwpd/pass/WP6.wpd
diff --git a/writerperfect/qa/unit/data/libwps/fail/.gitignore b/writerperfect/qa/unit/data/writer/libwps/fail/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libwps/fail/.gitignore
rename to writerperfect/qa/unit/data/writer/libwps/fail/.gitignore
diff --git a/writerperfect/qa/unit/data/libwps/indeterminate/.gitignore b/writerperfect/qa/unit/data/writer/libwps/indeterminate/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libwps/indeterminate/.gitignore
rename to writerperfect/qa/unit/data/writer/libwps/indeterminate/.gitignore
diff --git a/writerperfect/qa/unit/data/libwps/pass/.gitignore b/writerperfect/qa/unit/data/writer/libwps/pass/.gitignore
similarity index 100%
rename from writerperfect/qa/unit/data/libwps/pass/.gitignore
rename to writerperfect/qa/unit/data/writer/libwps/pass/.gitignore
commit f1978b92c68bbe70ac297fac51ac45a340e237a8
Author: osnola <alonso at loria.fr>
Date:   Wed May 28 18:13:06 2014 +0200

    add new libmwaw drawing formats (forgotten files)
    
    Change-Id: Ib9ecd643a552063e2a09874776b3ea0f30e8440a
    (cherry picked from commit ba0b63869ace532720bd7c13099e62c478d8cc31)

diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index fcc989b..9783f50 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -599,10 +599,17 @@ $(call filter_Configuration_add_types,fcfg_langpack,fcfg_draw_types.xcu,filter/s
 	draw8_template \
 	draw_WordPerfect_Graphics \
 	draw_Visio_Document \
-    draw_Publisher_Document \
+	draw_Publisher_Document \
 	draw_CorelDraw_Document \
 	draw_Corel_Presentation_Exchange \
 	draw_Freehand_Document \
+	draw_Visio_Document \
+	draw_Beagle_Works \
+	draw_ClarisWorks \
+	draw_Great_Works \
+	draw_Mac_Works \
+	draw_MacPaint \
+	draw_SuperPaint \
 )
 
 $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_draw_filters.xcu,filter/source/config/fragments/filters,\
@@ -613,10 +620,16 @@ $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_draw_filters.xcu,filt
 	draw8_template \
 	WordPerfectGraphics \
 	VisioDocument \
-    PublisherDocument \
+	PublisherDocument \
 	CorelDrawDocument \
 	CorelPresentationExchange \
 	FreehandDocument \
+	Beagle_Works_Draw \
+	ClarisWorks_Draw \
+	Great_Works_Draw \
+	Mac_Works_Draw \
+	MacPaint_Draw \
+	SuperPaint_Draw \
 )
 
 $(call filter_Configuration_add_ui_filters,fcfg_langpack,filter/source/config/fragments/filters,\
diff --git a/writerperfect/Library_wpftdraw.mk b/writerperfect/Library_wpftdraw.mk
index 807afc9..01a1ebe 100644
--- a/writerperfect/Library_wpftdraw.mk
+++ b/writerperfect/Library_wpftdraw.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_Library_use_externals,wpftdraw,\
 	cdr \
 	freehand \
 	mspub \
+	mwaw \
 	odfgen \
 	revenge \
 	visio \
@@ -58,6 +59,7 @@ $(eval $(call gb_Library_add_exception_objects,wpftdraw,\
 	writerperfect/source/draw/FreehandImportFilter \
 	writerperfect/source/draw/ImportFilterBase \
 	writerperfect/source/draw/MSPUBImportFilter \
+	writerperfect/source/draw/MWAWDrawImportFilter \
 	writerperfect/source/draw/VisioImportFilter \
 	writerperfect/source/draw/WPGImportFilter \
 	writerperfect/source/draw/wpftdraw_genericfilter \
diff --git a/writerperfect/source/draw/ImportFilterBase.cxx b/writerperfect/source/draw/ImportFilterBase.cxx
index 6fc09b2..fc6c8ee 100644
--- a/writerperfect/source/draw/ImportFilterBase.cxx
+++ b/writerperfect/source/draw/ImportFilterBase.cxx
@@ -95,6 +95,8 @@ throw (RuntimeException, std::exception)
     OdgGenerator exporter;
     exporter.addDocumentHandler(&xHandler, ODF_FLAT_XML);
 
+    doRegisterHandlers(exporter);
+
     return doImportDocument(input, exporter);
 }
 
@@ -170,6 +172,10 @@ throw (Exception, RuntimeException, std::exception)
     }
 }
 
+void ImportFilterImpl::doRegisterHandlers( OdgGenerator & )
+{
+}
+
 }
 }
 
diff --git a/writerperfect/source/draw/ImportFilterBase.hxx b/writerperfect/source/draw/ImportFilterBase.hxx
index 56a1808..f326d98 100644
--- a/writerperfect/source/draw/ImportFilterBase.hxx
+++ b/writerperfect/source/draw/ImportFilterBase.hxx
@@ -39,6 +39,8 @@ namespace xml { namespace sax {
 }
 } } }
 
+class OdgGenerator;
+
 namespace writerperfect
 {
 namespace draw
@@ -80,6 +82,7 @@ public:
 private:
     virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) = 0;
     virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) = 0;
+    virtual void doRegisterHandlers( OdgGenerator &rGenerator );
 
 private:
     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > mxContext;
diff --git a/writerperfect/source/draw/wpftdraw.component b/writerperfect/source/draw/wpftdraw.component
index d524116..cc65f3c 100644
--- a/writerperfect/source/draw/wpftdraw.component
+++ b/writerperfect/source/draw/wpftdraw.component
@@ -25,6 +25,10 @@
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
   </implementation>
+  <implementation name="com.sun.star.comp.Draw.MWAWDrawImportFilter">
+    <service name="com.sun.star.document.ImportFilter"/>
+    <service name="com.sun.star.document.ExtendedTypeDetection"/>
+  </implementation>
   <implementation name="com.sun.star.comp.Draw.VisioImportFilter">
     <service name="com.sun.star.document.ImportFilter"/>
     <service name="com.sun.star.document.ExtendedTypeDetection"/>
diff --git a/writerperfect/source/draw/wpftdraw_genericfilter.cxx b/writerperfect/source/draw/wpftdraw_genericfilter.cxx
index 43cabc1..821ac7c 100644
--- a/writerperfect/source/draw/wpftdraw_genericfilter.cxx
+++ b/writerperfect/source/draw/wpftdraw_genericfilter.cxx
@@ -32,6 +32,7 @@
 #include "CDRImportFilter.hxx"
 #include "CMXImportFilter.hxx"
 #include "MSPUBImportFilter.hxx"
+#include "MWAWDrawImportFilter.hxx"
 #include "FreehandImportFilter.hxx"
 #include "VisioImportFilter.hxx"
 #include "WPGImportFilter.hxx"
@@ -53,6 +54,10 @@ static cppu::ImplementationEntry const services[] = {
       &MSPUBImportFilter_getImplementationName,
       &MSPUBImportFilter_getSupportedServiceNames,
       &cppu::createSingleComponentFactory, 0, 0 },
+    { &MWAWDrawImportFilter_createInstance,
+      &MWAWDrawImportFilter_getImplementationName,
+      &MWAWDrawImportFilter_getSupportedServiceNames,
+      &cppu::createSingleComponentFactory, 0, 0 },
     { &VisioImportFilter_createInstance,
       &VisioImportFilter_getImplementationName,
       &VisioImportFilter_getSupportedServiceNames,
commit bb57864cfbc22e208a96cb26d3e6cc819b3c957e
Author: osnola <alonso at loria.fr>
Date:   Wed May 28 18:09:57 2014 +0200

    Add new libmwaw drawing format...
    
    Change-Id: I7fa7a46143126bdf27cf7cb30245dbcb244645ef
    (cherry picked from commit 0e17d7bb8acdbc0c36406a352c37f5cb0a987ced)

diff --git a/filter/source/config/fragments/filters/Beagle_Works_Draw.xcu b/filter/source/config/fragments/filters/Beagle_Works_Draw.xcu
new file mode 100644
index 0000000..57b5879
--- /dev/null
+++ b/filter/source/config/fragments/filters/Beagle_Works_Draw.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+
+<node oor:name="Beagle_Works_Draw" oor:op="replace">
+    <prop oor:name="Flags">
+        <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
+    </prop>
+    <prop oor:name="FilterService">
+        <value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value xml:lang="en-US">BeagleWorks/WordPerfect Works v1 Document</value>
+    </prop>
+    <prop oor:name="FileFormatVersion">
+        <value>0</value>
+    </prop>
+    <prop oor:name="Type">
+        <value>draw_Beagle_Works</value>
+    </prop>
+    <prop oor:name="DocumentService">
+        <value>com.sun.star.drawing.DrawingDocument</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/filters/ClarisWorks_Draw.xcu b/filter/source/config/fragments/filters/ClarisWorks_Draw.xcu
new file mode 100644
index 0000000..f4924b7
--- /dev/null
+++ b/filter/source/config/fragments/filters/ClarisWorks_Draw.xcu
@@ -0,0 +1,30 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+    <node oor:name="ClarisWorks_Draw" oor:op="replace">
+        <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
+        <prop oor:name="UIComponent"/>
+        <prop oor:name="FilterService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
+        <prop oor:name="UserData"><value></value></prop>
+        <prop oor:name="UIName">
+            <value xml:lang="en-US">ClarisWorks/AppleWorks Document</value>
+        </prop>
+        <prop oor:name="FileFormatVersion"><value>0</value></prop>
+        <prop oor:name="Type"><value>draw_ClarisWorks</value></prop>
+        <prop oor:name="TemplateName"/>
+        <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+    </node>
diff --git a/filter/source/config/fragments/filters/Great_Works_Draw.xcu b/filter/source/config/fragments/filters/Great_Works_Draw.xcu
new file mode 100644
index 0000000..4bb0667
--- /dev/null
+++ b/filter/source/config/fragments/filters/Great_Works_Draw.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+
+<node oor:name="Great_Works_Draw" oor:op="replace">
+    <prop oor:name="Flags">
+        <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value>
+    </prop>
+    <prop oor:name="FilterService">
+        <value>com.sun.star.comp.Draaw.MWAWDrawImportFilter</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value xml:lang="en-US">GreatWorks Document</value>
+    </prop>
+    <prop oor:name="FileFormatVersion">
+        <value>0</value>
+    </prop>
+    <prop oor:name="Type">
+        <value>draw_Great_Works</value>
+    </prop>
+    <prop oor:name="DocumentService">
+        <value>com.sun.star.drawing.DrawingDocument</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/filters/MacPaint_Draw.xcu b/filter/source/config/fragments/filters/MacPaint_Draw.xcu
new file mode 100644
index 0000000..80f8021
--- /dev/null
+++ b/filter/source/config/fragments/filters/MacPaint_Draw.xcu
@@ -0,0 +1,30 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+    <node oor:name="MacPaint_Draw" oor:op="replace">
+        <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
+        <prop oor:name="UIComponent"/>
+        <prop oor:name="FilterService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
+        <prop oor:name="UserData"><value></value></prop>
+        <prop oor:name="UIName">
+            <value xml:lang="en-US">MacPaint (v1)</value>
+        </prop>
+        <prop oor:name="FileFormatVersion"><value>0</value></prop>
+        <prop oor:name="Type"><value>draw_MacPaint</value></prop>
+        <prop oor:name="TemplateName"/>
+        <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+    </node>
diff --git a/filter/source/config/fragments/filters/Mac_Works_Draw.xcu b/filter/source/config/fragments/filters/Mac_Works_Draw.xcu
new file mode 100644
index 0000000..1c02f3f
--- /dev/null
+++ b/filter/source/config/fragments/filters/Mac_Works_Draw.xcu
@@ -0,0 +1,30 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+    <node oor:name="Mac_Works_Draw" oor:op="replace">
+        <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
+        <prop oor:name="UIComponent"/>
+        <prop oor:name="FilterService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
+        <prop oor:name="UserData"><value></value></prop>
+        <prop oor:name="UIName">
+            <value xml:lang="en-US">Microsoft Works for Mac Document (v1 - v4)</value>
+        </prop>
+        <prop oor:name="FileFormatVersion"><value>0</value></prop>
+        <prop oor:name="Type"><value>draw_Mac_Works</value></prop>
+        <prop oor:name="TemplateName"/>
+        <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+    </node>
diff --git a/filter/source/config/fragments/filters/SuperPaint_Draw.xcu b/filter/source/config/fragments/filters/SuperPaint_Draw.xcu
new file mode 100644
index 0000000..ccac863
--- /dev/null
+++ b/filter/source/config/fragments/filters/SuperPaint_Draw.xcu
@@ -0,0 +1,30 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+    <node oor:name="SuperPaint_Draw" oor:op="replace">
+        <prop oor:name="Flags"><value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value></prop>
+        <prop oor:name="UIComponent"/>
+        <prop oor:name="FilterService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
+        <prop oor:name="UserData"><value></value></prop>
+        <prop oor:name="UIName">
+            <value xml:lang="en-US">SuperPaint (v1)</value>
+        </prop>
+        <prop oor:name="FileFormatVersion"><value>0</value></prop>
+        <prop oor:name="Type"><value>draw_SuperPaint</value></prop>
+        <prop oor:name="TemplateName"/>
+        <prop oor:name="DocumentService"><value>com.sun.star.drawing.DrawingDocument</value></prop>
+    </node>
diff --git a/filter/source/config/fragments/types/draw_Beagle_Works.xcu b/filter/source/config/fragments/types/draw_Beagle_Works.xcu
new file mode 100644
index 0000000..177ad97
--- /dev/null
+++ b/filter/source/config/fragments/types/draw_Beagle_Works.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+
+<node oor:name="draw_Beagle_Works" oor:op="replace">
+    <prop oor:name="DetectService">
+        <value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value>
+    </prop>
+    <prop oor:name="Extensions">
+        <value>dummy</value>
+    </prop>
+    <prop oor:name="MediaType">
+        <value></value>
+    </prop>
+    <prop oor:name="Preferred">
+        <value>true</value>
+    </prop>
+    <prop oor:name="PreferredFilter">
+        <value>Beagle_Works_Draw</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value>BeagleWorks/WordPerfect Works Document</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/draw_ClarisWorks.xcu b/filter/source/config/fragments/types/draw_ClarisWorks.xcu
new file mode 100644
index 0000000..74672eb
--- /dev/null
+++ b/filter/source/config/fragments/types/draw_ClarisWorks.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+    <node oor:name="draw_ClarisWorks" oor:op="replace" >
+        <prop oor:name="DetectService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
+        <prop oor:name="URLPattern"/>
+        <prop oor:name="Extensions"><value>cwk</value></prop>
+        <prop oor:name="MediaType"><value>application/clarisworks</value></prop>
+        <prop oor:name="Preferred"><value>true</value></prop>
+        <prop oor:name="PreferredFilter"><value>Claris_Works_Draw</value></prop>
+        <prop oor:name="UIName">
+            <value>ClarisWorks/AppleWorks Document</value>
+        </prop>
+        <prop oor:name="ClipboardFormat"/>
+    </node>
diff --git a/filter/source/config/fragments/types/draw_Great_Works.xcu b/filter/source/config/fragments/types/draw_Great_Works.xcu
new file mode 100644
index 0000000..f9aeb07
--- /dev/null
+++ b/filter/source/config/fragments/types/draw_Great_Works.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+-->
+
+<node oor:name="draw_Great_Works" oor:op="replace">
+    <prop oor:name="DetectService">
+        <value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value>
+    </prop>
+    <prop oor:name="Extensions">
+        <value>dummy</value>
+    </prop>
+    <prop oor:name="MediaType">
+        <value></value>
+    </prop>
+    <prop oor:name="Preferred">
+        <value>true</value>
+    </prop>
+    <prop oor:name="PreferredFilter">
+        <value>Great_Works_Draw</value>
+    </prop>
+    <prop oor:name="UIName">
+        <value>GreatWorks Document</value>
+    </prop>
+</node>
diff --git a/filter/source/config/fragments/types/draw_MacPaint.xcu b/filter/source/config/fragments/types/draw_MacPaint.xcu
new file mode 100644
index 0000000..5811ea5
--- /dev/null
+++ b/filter/source/config/fragments/types/draw_MacPaint.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+    <node oor:name="draw_MacPaint" oor:op="replace" >
+        <prop oor:name="DetectService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
+        <prop oor:name="URLPattern"/>
+        <prop oor:name="Extensions"><value>wps</value></prop>
+        <prop oor:name="MediaType"><value>application/vnd.ms-works</value></prop>
+        <prop oor:name="Preferred"><value>true</value></prop>
+        <prop oor:name="PreferredFilter"><value>MacPaint_Draw</value></prop>
+        <prop oor:name="UIName">
+            <value>MacPaint (v1)</value>
+        </prop>
+        <prop oor:name="ClipboardFormat"/>
+    </node>
diff --git a/filter/source/config/fragments/types/draw_Mac_Works.xcu b/filter/source/config/fragments/types/draw_Mac_Works.xcu
new file mode 100644
index 0000000..79ef12c
--- /dev/null
+++ b/filter/source/config/fragments/types/draw_Mac_Works.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+    <node oor:name="draw_Mac_Works" oor:op="replace" >
+        <prop oor:name="DetectService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
+        <prop oor:name="URLPattern"/>
+        <prop oor:name="Extensions"><value>wps</value></prop>
+        <prop oor:name="MediaType"><value>application/vnd.ms-works</value></prop>
+        <prop oor:name="Preferred"><value>true</value></prop>
+        <prop oor:name="PreferredFilter"><value>Mac_Works_Draw</value></prop>
+        <prop oor:name="UIName">
+            <value>Microsoft Works for Mac Document (v1 - v4)</value>
+        </prop>
+        <prop oor:name="ClipboardFormat"/>
+    </node>
diff --git a/filter/source/config/fragments/types/draw_SuperPaint.xcu b/filter/source/config/fragments/types/draw_SuperPaint.xcu
new file mode 100644
index 0000000..6dbd4a9
--- /dev/null
+++ b/filter/source/config/fragments/types/draw_SuperPaint.xcu
@@ -0,0 +1,29 @@
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+    <node oor:name="draw_SuperPaint" oor:op="replace" >
+        <prop oor:name="DetectService"><value>com.sun.star.comp.Draw.MWAWDrawImportFilter</value></prop>
+        <prop oor:name="URLPattern"/>
+        <prop oor:name="Extensions"><value>wps</value></prop>
+        <prop oor:name="MediaType"><value>application/vnd.ms-works</value></prop>
+        <prop oor:name="Preferred"><value>true</value></prop>
+        <prop oor:name="PreferredFilter"><value>SuperPaint_Draw</value></prop>
+        <prop oor:name="UIName">
+            <value>SuperPaint (v1)</value>
+        </prop>
+        <prop oor:name="ClipboardFormat"/>
+    </node>
diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.cxx b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
new file mode 100644
index 0000000..feddcdb
--- /dev/null
+++ b/writerperfect/source/draw/MWAWDrawImportFilter.cxx
@@ -0,0 +1,191 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* MWAWDrawImportFilter: Sets up the filter, and calls DocumentCollector
+ * to do the actual filtering
+ *
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <com/sun/star/uno/Reference.h>
+#include <cppuhelper/supportsservice.hxx>
+
+#include <libmwaw/libmwaw.hxx>
+#include <libodfgen/libodfgen.hxx>
+
+#include "MWAWDrawImportFilter.hxx"
+
+using com::sun::star::uno::Sequence;
+using com::sun::star::uno::Reference;
+using com::sun::star::uno::Any;
+using com::sun::star::uno::XInterface;
+using com::sun::star::uno::Exception;
+using com::sun::star::uno::RuntimeException;
+using com::sun::star::uno::XComponentContext;
+
+static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler,  const OdfStreamType streamType)
+{
+    OdgGenerator exporter;
+    exporter.addDocumentHandler(pHandler, streamType);
+    return MWAWDocument::decodeGraphic(data, &exporter);
+}
+
+static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler,  const OdfStreamType streamType)
+{
+    OdsGenerator exporter;
+    exporter.addDocumentHandler(pHandler, streamType);
+    return MWAWDocument::decodeSpreadsheet(data, &exporter);
+}
+
+bool MWAWDrawImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator )
+{
+    return MWAWDocument::MWAW_R_OK == MWAWDocument::parse(&rInput, &rGenerator);
+}
+
+bool MWAWDrawImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName )
+{
+    rTypeName = "";
+
+    MWAWDocument::Type docType = MWAWDocument::MWAW_T_UNKNOWN;
+    MWAWDocument::Kind docKind = MWAWDocument::MWAW_K_UNKNOWN;
+    const MWAWDocument::Confidence confidence = MWAWDocument::isFileFormatSupported(&rInput, docType, docKind);
+
+    if (confidence == MWAWDocument::MWAW_C_EXCELLENT)
+    {
+        if ( docKind == MWAWDocument::MWAW_K_DRAW || docKind == MWAWDocument::MWAW_K_PAINT )
+        {
+            switch (docType)
+            {
+            case MWAWDocument::MWAW_T_BEAGLEWORKS:
+                rTypeName = "draw_Beagle_Works";
+                break;
+            case MWAWDocument::MWAW_T_CLARISWORKS:
+                rTypeName = "draw_ClarisWorks";
+                break;
+            case MWAWDocument::MWAW_T_GREATWORKS:
+                rTypeName = "draw_Great_Works";
+                break;
+            case MWAWDocument::MWAW_T_MACPAINT:
+                rTypeName = "draw_MacPaint";
+                break;
+            case MWAWDocument::MWAW_T_MICROSOFTWORKS:
+                rTypeName = "draw_Mac_Works";
+                break;
+            case MWAWDocument::MWAW_T_SUPERPAINT:
+                rTypeName = "draw_SuperPaint";
+                break;
+
+            case MWAWDocument::MWAW_T_ACTA:
+            case MWAWDocument::MWAW_T_ADOBEILLUSTRATOR:
+            case MWAWDocument::MWAW_T_CLARISRESOLVE:
+            case MWAWDocument::MWAW_T_DBASE:
+            case MWAWDocument::MWAW_T_DOCMAKER:
+            case MWAWDocument::MWAW_T_EDOC:
+            case MWAWDocument::MWAW_T_FAMILYTREEMAKER:
+            case MWAWDocument::MWAW_T_FILEMAKER:
+            case MWAWDocument::MWAW_T_FOXBASE:
+            case MWAWDocument::MWAW_T_FRAMEMAKER:
+            case MWAWDocument::MWAW_T_FULLIMPACT:
+            case MWAWDocument::MWAW_T_FULLPAINT:
+            case MWAWDocument::MWAW_T_FULLWRITE:
+            case MWAWDocument::MWAW_T_INFOGENIE:
+            case MWAWDocument::MWAW_T_KALEIDAGRAPH:
+            case MWAWDocument::MWAW_T_HANMACWORDJ:
+            case MWAWDocument::MWAW_T_HANMACWORDK:
+            case MWAWDocument::MWAW_T_LIGHTWAYTEXT:
+            case MWAWDocument::MWAW_T_MACDOC:
+            case MWAWDocument::MWAW_T_MACDRAFT:
+            case MWAWDocument::MWAW_T_MACDRAW:
+            case MWAWDocument::MWAW_T_MACDRAWPRO:
+            case MWAWDocument::MWAW_T_MACWRITE:
+            case MWAWDocument::MWAW_T_MACWRITEPRO:
+            case MWAWDocument::MWAW_T_MARINERWRITE:
+            case MWAWDocument::MWAW_T_MINDWRITE:
+            case MWAWDocument::MWAW_T_MICROSOFTFILE:
+            case MWAWDocument::MWAW_T_MICROSOFTMULTIPLAN:
+            case MWAWDocument::MWAW_T_MICROSOFTWORD:
+            case MWAWDocument::MWAW_T_MORE:
+            case MWAWDocument::MWAW_T_NISUSWRITER:
+            case MWAWDocument::MWAW_T_OVERVUE:
+            case MWAWDocument::MWAW_T_PAGEMAKER:
+            case MWAWDocument::MWAW_T_PIXELPAINT:
+            case MWAWDocument::MWAW_T_RAGTIME:
+            case MWAWDocument::MWAW_T_READYSETGO:
+            case MWAWDocument::MWAW_T_SYMPOSIUM:
+            case MWAWDocument::MWAW_T_TEACHTEXT:
+            case MWAWDocument::MWAW_T_TEXEDIT:
+            case MWAWDocument::MWAW_T_TRAPEZE:
+            case MWAWDocument::MWAW_T_WINGZ:
+            case MWAWDocument::MWAW_T_WRITENOW:
+            case MWAWDocument::MWAW_T_WRITERPLUS:
+            case MWAWDocument::MWAW_T_XPRESS:
+            case MWAWDocument::MWAW_T_ZWRITE:
+            case MWAWDocument::MWAW_T_4DIMENSION:
+
+            case MWAWDocument::MWAW_T_RESERVED1:
+            case MWAWDocument::MWAW_T_RESERVED2:
+            case MWAWDocument::MWAW_T_RESERVED3:
+            case MWAWDocument::MWAW_T_RESERVED4:
+            case MWAWDocument::MWAW_T_RESERVED5:
+            case MWAWDocument::MWAW_T_RESERVED6:
+            case MWAWDocument::MWAW_T_RESERVED7:
+            case MWAWDocument::MWAW_T_RESERVED8:
+            case MWAWDocument::MWAW_T_RESERVED9:
+            case MWAWDocument::MWAW_T_UNKNOWN:
+            default:
+                break;
+            }
+        }
+    }
+
+    return !rTypeName.isEmpty();
+}
+
+void MWAWDrawImportFilter::doRegisterHandlers( OdgGenerator &rGenerator )
+{
+    rGenerator.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
+    rGenerator.registerEmbeddedObjectHandler("image/mwaw-ods", &handleEmbeddedMWAWSpreadsheetObject);
+}
+
+OUString MWAWDrawImportFilter_getImplementationName ()
+throw (RuntimeException)
+{
+    return OUString (  "com.sun.star.comp.Draw.MWAWDrawImportFilter"  );
+}
+
+Sequence< OUString > SAL_CALL MWAWDrawImportFilter_getSupportedServiceNames(  )
+throw (RuntimeException)
+{
+    Sequence < OUString > aRet(2);
+    OUString *pArray = aRet.getArray();
+    pArray[0] =  "com.sun.star.document.ImportFilter";
+    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
+    return aRet;
+}
+
+Reference< XInterface > SAL_CALL MWAWDrawImportFilter_createInstance( const Reference< XComponentContext > &rContext)
+throw( Exception )
+{
+    return (cppu::OWeakObject *) new MWAWDrawImportFilter( rContext );
+}
+
+// XServiceInfo
+OUString SAL_CALL MWAWDrawImportFilter::getImplementationName(  )
+throw (RuntimeException, std::exception)
+{
+    return MWAWDrawImportFilter_getImplementationName();
+}
+sal_Bool SAL_CALL MWAWDrawImportFilter::supportsService( const OUString &rServiceName )
+throw (RuntimeException, std::exception)
+{
+    return cppu::supportsService( this, rServiceName );
+}
+Sequence< OUString > SAL_CALL MWAWDrawImportFilter::getSupportedServiceNames(  )
+throw (RuntimeException, std::exception)
+{
+    return MWAWDrawImportFilter_getSupportedServiceNames();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/draw/MWAWDrawImportFilter.hxx b/writerperfect/source/draw/MWAWDrawImportFilter.hxx
new file mode 100644
index 0000000..173629e
--- /dev/null
+++ b/writerperfect/source/draw/MWAWDrawImportFilter.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef _MWAWDRAWIMPORTFILTER_HXX
+#define _MWAWDRAWIMPORTFILTER_HXX
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include "ImportFilterBase.hxx"
+
+/* This component will be instantiated for both import or export. Whether it calls
+ * setSourceDocument or setTargetDocument determines which Impl function the filter
+ * member calls */
+class MWAWDrawImportFilter : public writerperfect::draw::ImportFilterBase
+{
+public:
+    MWAWDrawImportFilter( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext )
+        : writerperfect::draw::ImportFilterBase( rxContext ) {}
+
+    // XServiceInfo
+    virtual OUString SAL_CALL getImplementationName(  )
+    throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual sal_Bool SAL_CALL supportsService( const OUString &ServiceName )
+    throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+    virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  )
+    throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+
+private:
+    virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
+    virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, librevenge::RVNGDrawingInterface &rGenerator ) SAL_OVERRIDE;
+    virtual void doRegisterHandlers( OdgGenerator &rGenerator ) SAL_OVERRIDE;
+};
+
+OUString MWAWDrawImportFilter_getImplementationName()
+throw ( ::com::sun::star::uno::RuntimeException );
+
+::com::sun::star::uno::Sequence< OUString > SAL_CALL MWAWDrawImportFilter_getSupportedServiceNames(  )
+throw ( ::com::sun::star::uno::RuntimeException );
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+SAL_CALL MWAWDrawImportFilter_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rContext)
+throw ( ::com::sun::star::uno::Exception );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 0f4e1570308e793a11ca54a30088e3048e6be32b
Author: alonso <laurent.alonso at inria.fr>
Date:   Wed May 28 15:55:39 2014 +0200

    enable new handlers
    
    Change-Id: I1c07a44e7d318478bcb2561d29ea53a9475e4b1f
    (cherry picked from commit 6cae6d682cfdec0104f68552def2d1b5719c8fbe)

diff --git a/writerperfect/source/writer/MSWorksImportFilter.cxx b/writerperfect/source/writer/MSWorksImportFilter.cxx
index 7567294..2d253fb 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.cxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.cxx
@@ -24,6 +24,13 @@ using com::sun::star::uno::Exception;
 using com::sun::star::uno::RuntimeException;
 using com::sun::star::uno::XComponentContext;
 
+static bool handleEmbeddedWKSObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler,  const OdfStreamType streamType)
+{
+    OdsGenerator exporter;
+    exporter.addDocumentHandler(pHandler, streamType);
+    return libwps::WPSDocument::parse(const_cast<librevenge::RVNGInputStream *>(data.getDataStream()), &exporter)==libwps::WPS_OK;
+}
+
 bool MSWorksImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator )
 {
     return libwps::WPS_OK == libwps::WPSDocument::parse(&rInput, &rGenerator);
@@ -43,6 +50,11 @@ bool MSWorksImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, O
     return false;
 }
 
+void MSWorksImportFilter::doRegisterHandlers( OdtGenerator &rGenerator )
+{
+    rGenerator.registerEmbeddedObjectHandler("image/wks-ods", &handleEmbeddedWKSObject);
+}
+
 OUString MSWorksImportFilter_getImplementationName ()
 throw (RuntimeException)
 {
diff --git a/writerperfect/source/writer/MSWorksImportFilter.hxx b/writerperfect/source/writer/MSWorksImportFilter.hxx
index b5ddfe4..9bddf08 100644
--- a/writerperfect/source/writer/MSWorksImportFilter.hxx
+++ b/writerperfect/source/writer/MSWorksImportFilter.hxx
@@ -35,6 +35,7 @@ public:
 private:
     virtual bool doDetectFormat( librevenge::RVNGInputStream &rInput, OUString &rTypeName ) SAL_OVERRIDE;
     virtual bool doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &rFilterName, librevenge::RVNGTextInterface &rGenerator ) SAL_OVERRIDE;
+    virtual void doRegisterHandlers( OdtGenerator &rGenerator ) SAL_OVERRIDE;
 };
 
 OUString MSWorksImportFilter_getImplementationName()
diff --git a/writerperfect/source/writer/MWAWImportFilter.cxx b/writerperfect/source/writer/MWAWImportFilter.cxx
index ad656c9..d55a645 100644
--- a/writerperfect/source/writer/MWAWImportFilter.cxx
+++ b/writerperfect/source/writer/MWAWImportFilter.cxx
@@ -24,13 +24,20 @@ using com::sun::star::uno::Exception;
 using com::sun::star::uno::RuntimeException;
 using com::sun::star::uno::XComponentContext;
 
-static bool handleEmbeddedMWAWObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler,  const OdfStreamType streamType)
+static bool handleEmbeddedMWAWGraphicObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler,  const OdfStreamType streamType)
 {
     OdgGenerator exporter;
     exporter.addDocumentHandler(pHandler, streamType);
     return MWAWDocument::decodeGraphic(data, &exporter);
 }
 
+static bool handleEmbeddedMWAWSpreadsheetObject(const librevenge::RVNGBinaryData &data, OdfDocumentHandler *pHandler,  const OdfStreamType streamType)
+{
+    OdsGenerator exporter;
+    exporter.addDocumentHandler(pHandler, streamType);
+    return MWAWDocument::decodeSpreadsheet(data, &exporter);
+}
+
 bool MWAWImportFilter::doImportDocument( librevenge::RVNGInputStream &rInput, const rtl::OUString &, librevenge::RVNGTextInterface &rGenerator )
 {
     return MWAWDocument::MWAW_R_OK == MWAWDocument::parse(&rInput, &rGenerator);
@@ -65,12 +72,12 @@ bool MWAWImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUSt
             case MWAWDocument::MWAW_T_EDOC:
                 rTypeName = "writer_eDoc_Document";
                 break;
-            case MWAWDocument::MWAW_T_GREATWORKS:
-                rTypeName = "writer_Great_Works";
-                break;
             case MWAWDocument::MWAW_T_FULLWRITE:
                 rTypeName = "writer_FullWrite_Professional";
                 break;
+            case MWAWDocument::MWAW_T_GREATWORKS:
+                rTypeName = "writer_Great_Works";
+                break;
             case MWAWDocument::MWAW_T_HANMACWORDJ:
                 rTypeName = "writer_HanMac_Word_J";
                 break;
@@ -83,24 +90,24 @@ bool MWAWImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUSt
             case MWAWDocument::MWAW_T_MACDOC:
                 rTypeName = "writer_MacDoc";
                 break;
-            case MWAWDocument::MWAW_T_MARINERWRITE:
-                rTypeName = "writer_Mariner_Write";
-                break;
-            case MWAWDocument::MWAW_T_MINDWRITE:
-                rTypeName = "writer_MindWrite";
-                break;
             case MWAWDocument::MWAW_T_MACWRITE:
                 rTypeName = "writer_MacWrite";
                 break;
             case MWAWDocument::MWAW_T_MACWRITEPRO:
                 rTypeName = "writer_MacWritePro";
                 break;
+            case MWAWDocument::MWAW_T_MARINERWRITE:
+                rTypeName = "writer_Mariner_Write";
+                break;
             case MWAWDocument::MWAW_T_MICROSOFTWORD:
                 rTypeName = "writer_Mac_Word";
                 break;
             case MWAWDocument::MWAW_T_MICROSOFTWORKS:
                 rTypeName = "writer_Mac_Works";
                 break;
+            case MWAWDocument::MWAW_T_MINDWRITE:
+                rTypeName = "writer_MindWrite";
+                break;
             case MWAWDocument::MWAW_T_MORE:
                 rTypeName = "writer_Mac_More";
                 break;
@@ -123,13 +130,35 @@ bool MWAWImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUSt
                 rTypeName = "writer_ZWrite";
                 break;
 
+            case MWAWDocument::MWAW_T_ADOBEILLUSTRATOR:
+            case MWAWDocument::MWAW_T_CLARISRESOLVE:
+            case MWAWDocument::MWAW_T_DBASE:
+            case MWAWDocument::MWAW_T_FAMILYTREEMAKER:
+            case MWAWDocument::MWAW_T_FILEMAKER:
+            case MWAWDocument::MWAW_T_FOXBASE:
+            case MWAWDocument::MWAW_T_FULLIMPACT:
+            case MWAWDocument::MWAW_T_FULLPAINT:
             case MWAWDocument::MWAW_T_FRAMEMAKER:
+            case MWAWDocument::MWAW_T_INFOGENIE:
+            case MWAWDocument::MWAW_T_KALEIDAGRAPH:
+            case MWAWDocument::MWAW_T_MACDRAFT:
             case MWAWDocument::MWAW_T_MACDRAW:
+            case MWAWDocument::MWAW_T_MACDRAWPRO:
             case MWAWDocument::MWAW_T_MACPAINT:
+            case MWAWDocument::MWAW_T_MICROSOFTFILE:
+            case MWAWDocument::MWAW_T_MICROSOFTMULTIPLAN:
+            case MWAWDocument::MWAW_T_OVERVUE:
             case MWAWDocument::MWAW_T_PAGEMAKER:
+            case MWAWDocument::MWAW_T_PIXELPAINT:
             case MWAWDocument::MWAW_T_READYSETGO:
             case MWAWDocument::MWAW_T_RAGTIME:
+            case MWAWDocument::MWAW_T_SUPERPAINT:
+            case MWAWDocument::MWAW_T_SYMPOSIUM:
+            case MWAWDocument::MWAW_T_TRAPEZE:
+            case MWAWDocument::MWAW_T_WINGZ:
             case MWAWDocument::MWAW_T_XPRESS:
+            case MWAWDocument::MWAW_T_4DIMENSION:
+
             case MWAWDocument::MWAW_T_RESERVED1:
             case MWAWDocument::MWAW_T_RESERVED2:
             case MWAWDocument::MWAW_T_RESERVED3:
@@ -151,7 +180,8 @@ bool MWAWImportFilter::doDetectFormat( librevenge::RVNGInputStream &rInput, OUSt
 
 void MWAWImportFilter::doRegisterHandlers( OdtGenerator &rGenerator )
 {
-    rGenerator.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWObject);
+    rGenerator.registerEmbeddedObjectHandler("image/mwaw-odg", &handleEmbeddedMWAWGraphicObject);
+    rGenerator.registerEmbeddedObjectHandler("image/mwaw-ods", &handleEmbeddedMWAWSpreadsheetObject);
 }
 
 OUString MWAWImportFilter_getImplementationName ()
commit fef4f7b3070392178a7f58f5d65cb303c5874610
Author: David Tardon <dtardon at redhat.com>
Date:   Wed May 28 10:22:41 2014 +0200

    improve WPXSvInputStream test
    
    Change-Id: I95817ea44b6793d4a80b74b32f3b5477c6169b26
    (cherry picked from commit c14a6e0570c33c8a1258d5b562ca082de2cf05ce)

diff --git a/writerperfect/CppunitTest_writerperfect_stream.mk b/writerperfect/CppunitTest_writerperfect_stream.mk
index 8416008..ad943e0 100644
--- a/writerperfect/CppunitTest_writerperfect_stream.mk
+++ b/writerperfect/CppunitTest_writerperfect_stream.mk
@@ -47,6 +47,7 @@ $(eval $(call gb_CppunitTest_use_components,writerperfect_stream,\
 	package/util/package2 \
 	ucb/source/core/ucb1 \
     ucb/source/ucp/file/ucpfile1 \
+    unotools/util/utl \
 ))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,writerperfect_stream,\
diff --git a/writerperfect/qa/unit/WPXSvStreamTest.cxx b/writerperfect/qa/unit/WPXSvStreamTest.cxx
index d75f201..c2b4f20 100644
--- a/writerperfect/qa/unit/WPXSvStreamTest.cxx
+++ b/writerperfect/qa/unit/WPXSvStreamTest.cxx
@@ -9,6 +9,7 @@
 
 #include <algorithm>
 #include <cassert>
+#include <sstream>
 
 #include <boost/shared_ptr.hpp>
 
@@ -98,6 +99,24 @@ const shared_ptr<RVNGInputStream> lcl_createStreamForURL(const rtl::OUString &rU
     return pInput;
 }
 
+void lcl_testSubStreams(const shared_ptr<RVNGInputStream> &pInput)
+{
+    shared_ptr<RVNGInputStream> pSubStream;
+
+    // all valid substreams can be read
+    for (std::size_t i = 0; i != pInput->subStreamCount(); ++i)
+    {
+        std::ostringstream msg("opening substream ");
+        msg << i;
+        pSubStream.reset(pInput->getSubStreamById(i));
+        CPPUNIT_ASSERT_MESSAGE(msg.str(), bool(pSubStream));
+    }
+
+    // invalid substreams cannot be read
+    pSubStream.reset(pInput->getSubStreamById(pInput->subStreamCount()));
+    CPPUNIT_ASSERT(!pSubStream);
+}
+
 void WPXSvStreamTest::testRead()
 {
     const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
@@ -281,8 +300,17 @@ void WPXSvStreamTest::testStructured()
         assert(bool(pInput));
 
         CPPUNIT_ASSERT(pInput->isStructured());
+        CPPUNIT_ASSERT(2 == pInput->subStreamCount());
+        lcl_testSubStreams(pInput);
+
+        // check for existing substream
+        CPPUNIT_ASSERT(pInput->existsSubStream("WordDocument"));
         shared_ptr<RVNGInputStream> pSubStream(pInput->getSubStreamByName("WordDocument"));
         CPPUNIT_ASSERT(bool(pSubStream));
+        CPPUNIT_ASSERT(!pSubStream->isEnd());
+
+        // check for not existing substream
+        CPPUNIT_ASSERT(!pInput->existsSubStream("foo"));
         pSubStream.reset(pInput->getSubStreamByName("foo"));
         CPPUNIT_ASSERT(!pSubStream);
     }
@@ -293,8 +321,18 @@ void WPXSvStreamTest::testStructured()
         assert(bool(pInput));
 
         CPPUNIT_ASSERT(pInput->isStructured());
+        CPPUNIT_ASSERT(9 == pInput->subStreamCount());
+        lcl_testSubStreams(pInput);
+
+        // check for existing substream
+        CPPUNIT_ASSERT(pInput->existsSubStream("content.xml"));
         shared_ptr<RVNGInputStream> pSubStream(pInput->getSubStreamByName("content.xml"));
         CPPUNIT_ASSERT(bool(pSubStream));
+        CPPUNIT_ASSERT(!pSubStream->isEnd());
+
+        // check for not existing substream
+        CPPUNIT_ASSERT(pInput->existsSubStream("content.xml"));
+        CPPUNIT_ASSERT(!pInput->existsSubStream("foo"));
         pSubStream.reset(pInput->getSubStreamByName("foo"));
         CPPUNIT_ASSERT(!pSubStream);
     }
@@ -304,7 +342,11 @@ void WPXSvStreamTest::testStructured()
         const shared_ptr<RVNGInputStream> pInput(lcl_createStream());
 
         CPPUNIT_ASSERT(!pInput->isStructured());
+        CPPUNIT_ASSERT(0 == pInput->subStreamCount());
+        CPPUNIT_ASSERT(!pInput->existsSubStream("foo"));
         CPPUNIT_ASSERT(0 == pInput->getSubStreamByName("foo"));
+        CPPUNIT_ASSERT(0 == pInput->getSubStreamById(42));
+        CPPUNIT_ASSERT(0 == pInput->subStreamName(42));
     }
 }
 


More information about the Libreoffice-commits mailing list