summaryrefslogtreecommitdiff
path: root/writerperfect/qa/unit/WpftImportTestBase.hxx
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-03-30 16:16:46 +0200
committerDavid Tardon <dtardon@redhat.com>2014-03-30 19:06:28 +0200
commit4af1bcf0bda75a0b9e8db8a2080e65d8f134b34a (patch)
tree5378ef237ef170624742a22ed265945c7d253463 /writerperfect/qa/unit/WpftImportTestBase.hxx
parent7485d76164589652359f7da840b01c0f64bbe7c6 (diff)
reduce the amount of copypasta
Change-Id: I19b75b29da91ba1057f7da786da18fb246d97598
Diffstat (limited to 'writerperfect/qa/unit/WpftImportTestBase.hxx')
-rw-r--r--writerperfect/qa/unit/WpftImportTestBase.hxx67
1 files changed, 67 insertions, 0 deletions
diff --git a/writerperfect/qa/unit/WpftImportTestBase.hxx b/writerperfect/qa/unit/WpftImportTestBase.hxx
new file mode 100644
index 000000000000..2024e8f483cb
--- /dev/null
+++ b/writerperfect/qa/unit/WpftImportTestBase.hxx
@@ -0,0 +1,67 @@
+/* -*- 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 INCLUDED_WRITERPERFECT_QA_UNIT_WPFTIMPORTTESTBASE_HXX
+#define INCLUDED_WRITERPERFECT_QA_UNIT_WPFTIMPORTTESTBASE_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <rtl/ustring.hxx>
+
+#include <test/bootstrapfixture.hxx>
+
+#include <unotest/filters-test.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace beans { class PropertyValue; }
+ namespace container { class XNameAccess; }
+ namespace document { class XFilter; }
+ namespace frame { class XDesktop2; }
+ namespace ucb { class XSimpleFileAccess; }
+} } }
+
+namespace writerperfect
+{
+namespace test
+{
+
+class WpftImportTestBase
+ : public ::test::FiltersTest
+ , public ::test::BootstrapFixture
+{
+public:
+ explicit WpftImportTestBase(const rtl::OUString &rFactoryURL);
+
+ virtual void setUp() SAL_OVERRIDE;
+ virtual void tearDown() SAL_OVERRIDE;
+
+protected:
+ void doTest(const rtl::OUString &rFilter, const rtl::OUString &rPath);
+
+private:
+ virtual bool load(const OUString &, const OUString &rURL, const OUString &,
+ unsigned int, unsigned int, unsigned int) SAL_OVERRIDE;
+
+ void impl_detectFilterName(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &rDescriptor, const rtl::OUString &rTypeName);
+
+private:
+ const rtl::OUString m_aFactoryURL;
+ com::sun::star::uno::Reference<com::sun::star::frame::XDesktop2> m_xDesktop;
+ com::sun::star::uno::Reference<com::sun::star::ucb::XSimpleFileAccess> m_xFileAccess;
+ com::sun::star::uno::Reference<com::sun::star::document::XFilter> m_xFilter;
+ com::sun::star::uno::Reference<com::sun::star::container::XNameAccess> m_xTypeMap;
+};
+
+}
+}
+
+#endif // INCLUDED_WRITERPERFECT_QA_UNIT_WPFTIMPORTTESTBASE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */