1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
10 #include <unotest/filters-test.hxx>
11 #include <test/bootstrapfixture.hxx>
12 #include <com/sun/star/document/XFilter.hpp>
14 #include <osl/file.hxx>
15 #include <osl/process.h>
17 using namespace ::com::sun::star
;
21 class LotusWordProTest
22 : public test::FiltersTest
23 , public test::BootstrapFixture
26 LotusWordProTest() : BootstrapFixture(true, false) {}
28 virtual void setUp() override
;
30 virtual bool load(const OUString
&,
31 const OUString
&rURL
, const OUString
&,
32 SfxFilterFlags
, SotClipboardFormatId
, unsigned int) override
;
36 CPPUNIT_TEST_SUITE(LotusWordProTest
);
38 CPPUNIT_TEST_SUITE_END();
40 uno::Reference
<document::XFilter
> m_xFilter
;
43 void LotusWordProTest::setUp()
45 test::BootstrapFixture::setUp();
47 m_xFilter
.set(m_xSFactory
->createInstance(
48 "com.sun.star.comp.Writer.LotusWordProImportFilter"),
49 uno::UNO_QUERY_THROW
);
52 bool LotusWordProTest::load(const OUString
&,
53 const OUString
&rURL
, const OUString
&,
54 SfxFilterFlags
, SotClipboardFormatId
, unsigned int)
56 uno::Sequence
< beans::PropertyValue
> aDescriptor(1);
57 aDescriptor
[0].Name
= "URL";
58 aDescriptor
[0].Value
<<= rURL
;
59 return m_xFilter
->filter(aDescriptor
);
62 void LotusWordProTest::test()
65 m_directories
.getURLFromSrc("/lotuswordpro/qa/cppunit/data/"));
68 CPPUNIT_TEST_SUITE_REGISTRATION(LotusWordProTest
);
71 CPPUNIT_PLUGIN_IMPLEMENT();
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */