postprocess/Rdb_services.mk                        |    4 
 writerperfect/CppunitTest_writerperfect_impress.mk |   38 ++++++
 writerperfect/Library_wpftdraw.mk                  |    2 
 writerperfect/Library_wpftwriter.mk                |    2 
 writerperfect/Module_writerperfect.mk              |   12 -
 writerperfect/qa/unit/data/libetonyek/fail/v6.zip  |binary
 writerperfect/qa/unit/data/libetonyek/pass/v2.zip  |binary
 writerperfect/qa/unit/data/libetonyek/pass/v3.zip  |binary
 writerperfect/qa/unit/data/libetonyek/pass/v4.zip  |binary
 writerperfect/qa/unit/data/libetonyek/pass/v5.key  |binary
 writerperfect/qa/unit/wpftimpress.cxx              |  129 +++++++++++++++++++++
 writerperfect/source/draw/wpftdraw.component       |   36 +++++
 writerperfect/source/writer/wpftwriter.component   |   41 ++++++
 writerperfect/util/wpftdraw.component              |   36 -----
 writerperfect/util/wpftwriter.component            |   41 ------
 15 files changed, 250 insertions(+), 91 deletions(-)

New commits:
commit cc7c33b23a33036395dd6f608587a4303ad9b121
Author: David Tardon <dtar...@redhat.com>
Date:   Sun Mar 23 22:02:33 2014 +0100

    add a smoketest for wpftimpress import lib
    
    Change-Id: Ifcbc1fd941c8984ef02ef437f6369c0b2df3b28b

diff --git a/writerperfect/CppunitTest_writerperfect_impress.mk 
b/writerperfect/CppunitTest_writerperfect_impress.mk
new file mode 100644
index 0000000..b2fdffb
--- /dev/null
+++ b/writerperfect/CppunitTest_writerperfect_impress.mk
@@ -0,0 +1,38 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,writerperfect_impress))
+
+$(eval $(call gb_CppunitTest_use_api,writerperfect_impress,\
+    offapi \
+    udkapi \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,writerperfect_impress, \
+    comphelper \
+    cppu \
+    cppuhelper \
+    sal \
+    test \
+    ucbhelper \
+    unotest \
+       $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,writerperfect_impress))
+
+$(eval $(call gb_CppunitTest_use_rdb,writerperfect_impress,services))
+
+$(eval $(call gb_CppunitTest_use_configuration,writerperfect_impress))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,writerperfect_impress, \
+    writerperfect/qa/unit/wpftimpress \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/writerperfect/Module_writerperfect.mk 
b/writerperfect/Module_writerperfect.mk
index aec064b..1bf4428 100644
--- a/writerperfect/Module_writerperfect.mk
+++ b/writerperfect/Module_writerperfect.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_Module_add_targets,writerperfect,\
 ))
 
 $(eval $(call gb_Module_add_check_targets,writerperfect,\
+       CppunitTest_writerperfect_impress \
        CppunitTest_writerperfect_stream \
 ))
 
diff --git a/writerperfect/qa/unit/data/libetonyek/fail/v6.zip 
b/writerperfect/qa/unit/data/libetonyek/fail/v6.zip
new file mode 100644
index 0000000..b0401b3
Binary files /dev/null and b/writerperfect/qa/unit/data/libetonyek/fail/v6.zip 
differ
diff --git a/writerperfect/qa/unit/data/libetonyek/indeterminate/.gitignore 
b/writerperfect/qa/unit/data/libetonyek/indeterminate/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/writerperfect/qa/unit/data/libetonyek/pass/v2.zip 
b/writerperfect/qa/unit/data/libetonyek/pass/v2.zip
new file mode 100644
index 0000000..8d7cd4b
Binary files /dev/null and b/writerperfect/qa/unit/data/libetonyek/pass/v2.zip 
differ
diff --git a/writerperfect/qa/unit/data/libetonyek/pass/v3.zip 
b/writerperfect/qa/unit/data/libetonyek/pass/v3.zip
new file mode 100644
index 0000000..5d715e6
Binary files /dev/null and b/writerperfect/qa/unit/data/libetonyek/pass/v3.zip 
differ
diff --git a/writerperfect/qa/unit/data/libetonyek/pass/v4.zip 
b/writerperfect/qa/unit/data/libetonyek/pass/v4.zip
new file mode 100644
index 0000000..bf3c9f0
Binary files /dev/null and b/writerperfect/qa/unit/data/libetonyek/pass/v4.zip 
differ
diff --git a/writerperfect/qa/unit/data/libetonyek/pass/v5.key 
b/writerperfect/qa/unit/data/libetonyek/pass/v5.key
new file mode 100644
index 0000000..fe2f9ad
Binary files /dev/null and b/writerperfect/qa/unit/data/libetonyek/pass/v5.key 
differ
diff --git a/writerperfect/qa/unit/wpftimpress.cxx 
b/writerperfect/qa/unit/wpftimpress.cxx
new file mode 100644
index 0000000..dcb3f9c
--- /dev/null
+++ b/writerperfect/qa/unit/wpftimpress.cxx
@@ -0,0 +1,129 @@
+/* -*- 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/.
+ */
+
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/document/XFilter.hpp>
+#include <com/sun/star/document/XImporter.hpp>
+#include <com/sun/star/frame/theDesktop.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/ucb/SimpleFileAccess.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <test/bootstrapfixture.hxx>
+
+#include <unotest/filters-test.hxx>
+
+namespace beans = com::sun::star::beans;
+namespace document = com::sun::star::document;
+namespace frame = com::sun::star::frame;
+namespace io = com::sun::star::io;
+namespace lang = com::sun::star::lang;
+namespace ucb = com::sun::star::ucb;
+namespace uno = com::sun::star::uno;
+
+namespace
+{
+
+class WpftImpressFilterTest
+    : public test::FiltersTest
+    , public test::BootstrapFixture
+{
+public:
+    virtual void setUp();
+    virtual void tearDown();
+
+    void test();
+
+    CPPUNIT_TEST_SUITE(WpftImpressFilterTest);
+    CPPUNIT_TEST(test);
+    CPPUNIT_TEST_SUITE_END();
+
+private:
+    virtual bool load(const OUString &, const OUString &rURL, const OUString &,
+        unsigned int, unsigned int, unsigned int);
+
+    void doTest(const rtl::OUString &rFilter, const rtl::OUString &rPath);
+
+private:
+    uno::Reference<frame::XDesktop2> m_xDesktop;
+    uno::Reference<ucb::XSimpleFileAccess> m_xFileAccess;
+    uno::Reference<document::XFilter> m_xFilter;
+};
+
+void WpftImpressFilterTest::setUp()
+{
+    test::BootstrapFixture::setUp();
+
+    m_xDesktop = frame::theDesktop::get(m_xContext);
+    m_xFileAccess = ucb::SimpleFileAccess::create(m_xContext);
+}
+
+void WpftImpressFilterTest::tearDown()
+{
+    test::BootstrapFixture::tearDown();
+
+    m_xDesktop->terminate();
+}
+
+void WpftImpressFilterTest::test()
+{
+    doTest("org.libreoffice.comp.Impress.KeynoteImportFilter", 
"/writerperfect/qa/unit/data/libetonyek/");
+}
+
+bool WpftImpressFilterTest::load(const OUString &, const OUString &rURL, const 
OUString &,
+    unsigned int, unsigned int, unsigned int)
+{
+    const uno::Reference<lang::XComponent> xDoc(
+            m_xDesktop->loadComponentFromURL("private:factory/simpress", 
"_blank", 0, uno::Sequence<beans::PropertyValue>()),
+            uno::UNO_QUERY_THROW);
+
+    bool result = false;
+
+    try
+    {
+        const uno::Reference<document::XImporter> xImporter(m_xFilter, 
uno::UNO_QUERY_THROW);
+
+        xImporter->setTargetDocument(xDoc);
+
+        uno::Sequence<beans::PropertyValue> aDescriptor(2);
+        aDescriptor[0].Name = "URL";
+        aDescriptor[0].Value <<= rURL;
+
+        const uno::Reference<io::XInputStream> 
xInputStream(m_xFileAccess->openFileRead(rURL), uno::UNO_QUERY_THROW);
+        aDescriptor[1].Name = "InputStream";
+        aDescriptor[1].Value <<= xInputStream;
+
+        result = m_xFilter->filter(aDescriptor);
+    }
+    catch (const uno::Exception &)
+    {
+        xDoc->dispose();
+        throw;
+    }
+
+    xDoc->dispose();
+
+    return result;
+}
+
+void WpftImpressFilterTest::doTest(const rtl::OUString &rFilter, const 
rtl::OUString &rPath)
+{
+    m_xFilter.set(m_xFactory->createInstanceWithContext(rFilter, m_xContext), 
uno::UNO_QUERY_THROW);
+    testDir(OUString(), getURLFromSrc(rPath), OUString());
+}
+
+CPPUNIT_TEST_SUITE_REGISTRATION(WpftImpressFilterTest);
+
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit b1d00137f2ae0dde7ba0d4a42f184538120a05e5
Author: David Tardon <dtar...@redhat.com>
Date:   Sun Mar 23 10:35:09 2014 +0100

    remove unnecessary util dir
    
    Change-Id: I66e1882d14c59abeb6aa01b662dfc3a89238d3c0

diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 2e5a933..e6cd8b5 100755
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -113,9 +113,9 @@ $(eval $(call gb_Rdb_add_components,services,\
                sccomp/source/solver/solver \
        ) \
        writerfilter/util/writerfilter \
-       writerperfect/util/wpftwriter \
-       writerperfect/util/wpftdraw \
+       writerperfect/source/draw/wpftdraw \
        writerperfect/source/impress/wpftimpress \
+       writerperfect/source/writer/wpftwriter \
        $(if $(filter MACOSX,$(OS)), \
                $(if $(filter-out X86_64,$(CPUNAME)), \
                        $(if $(filter TRUE,$(ENABLE_MACOSX_SANDBOX)),, \
diff --git a/writerperfect/Library_wpftdraw.mk 
b/writerperfect/Library_wpftdraw.mk
index 84bb959..b2cfc36 100644
--- a/writerperfect/Library_wpftdraw.mk
+++ b/writerperfect/Library_wpftdraw.mk
@@ -19,7 +19,7 @@
 
 $(eval $(call gb_Library_Library,wpftdraw))
 
-$(eval $(call 
gb_Library_set_componentfile,wpftdraw,writerperfect/util/wpftdraw))
+$(eval $(call 
gb_Library_set_componentfile,wpftdraw,writerperfect/source/draw/wpftdraw))
 
 $(eval $(call gb_Library_set_include,wpftdraw,\
        $$(INCLUDE) \
diff --git a/writerperfect/Library_wpftwriter.mk 
b/writerperfect/Library_wpftwriter.mk
index cfcdf5d..81008f3 100644
--- a/writerperfect/Library_wpftwriter.mk
+++ b/writerperfect/Library_wpftwriter.mk
@@ -19,7 +19,7 @@
 
 $(eval $(call gb_Library_Library,wpftwriter))
 
-$(eval $(call 
gb_Library_set_componentfile,wpftwriter,writerperfect/util/wpftwriter))
+$(eval $(call 
gb_Library_set_componentfile,wpftwriter,writerperfect/source/writer/wpftwriter))
 
 $(eval $(call gb_Library_set_include,wpftwriter,\
        $$(INCLUDE) \
diff --git a/writerperfect/util/wpftdraw.component 
b/writerperfect/source/draw/wpftdraw.component
similarity index 100%
rename from writerperfect/util/wpftdraw.component
rename to writerperfect/source/draw/wpftdraw.component
diff --git a/writerperfect/util/wpftwriter.component 
b/writerperfect/source/writer/wpftwriter.component
similarity index 100%
rename from writerperfect/util/wpftwriter.component
rename to writerperfect/source/writer/wpftwriter.component
commit c768cc508e1ff3ae0dc7503f4c6566e66bc7fd13
Author: David Tardon <dtar...@redhat.com>
Date:   Sun Mar 23 10:31:03 2014 +0100

    put all targets into one gb_Module_add_targets call
    
    Change-Id: I2bbd9e46c9b7bee68085d7aa7f1fa273f7bc1abf

diff --git a/writerperfect/Module_writerperfect.mk 
b/writerperfect/Module_writerperfect.mk
index 0b4979c..aec064b 100644
--- a/writerperfect/Module_writerperfect.mk
+++ b/writerperfect/Module_writerperfect.mk
@@ -20,18 +20,9 @@
 $(eval $(call gb_Module_Module,writerperfect))
 
 $(eval $(call gb_Module_add_targets,writerperfect,\
-       Library_wpftwriter \
-))
-
-$(eval $(call gb_Module_add_targets,writerperfect,\
        Library_wpftdraw \
-))
-
-$(eval $(call gb_Module_add_targets,writerperfect,\
        Library_wpftimpress \
-))
-
-$(eval $(call gb_Module_add_targets,writerperfect,\
+       Library_wpftwriter \
        StaticLibrary_writerperfect \
 ))
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to