Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / lotuswordpro / qa / cppunit / test_lotuswordpro.cxx
blob961faa668a36e11c1b6b43f2fd65275f0b6bfaa2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
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;
19 namespace
21 class LotusWordProTest
22 : public test::FiltersTest
23 , public test::BootstrapFixture
25 public:
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;
34 void test();
36 CPPUNIT_TEST_SUITE(LotusWordProTest);
37 CPPUNIT_TEST(test);
38 CPPUNIT_TEST_SUITE_END();
39 private:
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()
64 testDir(OUString(),
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: */