Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : */
9 :
10 : #ifndef INCLUDED_WRITERPERFECT_QA_UNIT_WPFTIMPORTTESTBASE_HXX
11 : #define INCLUDED_WRITERPERFECT_QA_UNIT_WPFTIMPORTTESTBASE_HXX
12 :
13 : #include <com/sun/star/uno/Reference.hxx>
14 : #include <com/sun/star/uno/Sequence.hxx>
15 :
16 : #include <rtl/ustring.hxx>
17 :
18 : #include <test/bootstrapfixture.hxx>
19 :
20 : #include <unotest/filters-test.hxx>
21 :
22 : namespace com
23 : {
24 : namespace sun
25 : {
26 : namespace star
27 : {
28 : namespace beans
29 : {
30 : struct PropertyValue;
31 : }
32 : namespace container
33 : {
34 : class XNameAccess;
35 : }
36 : namespace document
37 : {
38 : class XFilter;
39 : }
40 : namespace frame
41 : {
42 : class XDesktop2;
43 : }
44 : namespace ucb
45 : {
46 : class XSimpleFileAccess;
47 : }
48 : }
49 : }
50 : }
51 :
52 : namespace writerperfect
53 : {
54 : namespace test
55 : {
56 :
57 4 : class WpftImportTestBase
58 : : public ::test::FiltersTest
59 : , public ::test::BootstrapFixture
60 : {
61 : public:
62 : explicit WpftImportTestBase(const rtl::OUString &rFactoryURL);
63 :
64 : virtual void setUp() SAL_OVERRIDE;
65 : virtual void tearDown() SAL_OVERRIDE;
66 :
67 : protected:
68 : void doTest(const rtl::OUString &rFilter, const rtl::OUString &rPath);
69 :
70 : private:
71 : virtual bool load(const OUString &, const OUString &rURL, const OUString &,
72 : SfxFilterFlags, SotClipboardFormatId, unsigned int) SAL_OVERRIDE;
73 :
74 : void impl_detectFilterName(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &rDescriptor, const rtl::OUString &rTypeName);
75 :
76 : private:
77 : const rtl::OUString m_aFactoryURL;
78 : com::sun::star::uno::Reference<com::sun::star::frame::XDesktop2> m_xDesktop;
79 : com::sun::star::uno::Reference<com::sun::star::ucb::XSimpleFileAccess> m_xFileAccess;
80 : com::sun::star::uno::Reference<com::sun::star::document::XFilter> m_xFilter;
81 : com::sun::star::uno::Reference<com::sun::star::container::XNameAccess> m_xTypeMap;
82 : };
83 :
84 : }
85 : }
86 :
87 : #endif // INCLUDED_WRITERPERFECT_QA_UNIT_WPFTIMPORTTESTBASE_HXX
88 :
89 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|