bump product version to 7.6.3.2-android
[LibreOffice.git] / lotuswordpro / qa / cppunit / test_lotuswordpro.cxx
blobf4c16903059fe1b9330411c86b2ab2f192cdf234
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 <sal/config.h>
12 #include <comphelper/propertyvalue.hxx>
14 #include <unotest/filters-test.hxx>
15 #include <test/bootstrapfixture.hxx>
16 #include <com/sun/star/document/XFilter.hpp>
18 using namespace ::com::sun::star;
20 namespace
22 class LotusWordProTest
23 : public test::FiltersTest
24 , public test::BootstrapFixture
26 public:
27 LotusWordProTest() : BootstrapFixture(true, false) {}
29 virtual void setUp() override;
31 virtual bool load(const OUString &,
32 const OUString &rURL, const OUString &,
33 SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
35 void test();
37 CPPUNIT_TEST_SUITE(LotusWordProTest);
38 CPPUNIT_TEST(test);
39 CPPUNIT_TEST_SUITE_END();
40 private:
41 uno::Reference<document::XFilter> m_xFilter;
44 void LotusWordProTest::setUp()
46 test::BootstrapFixture::setUp();
48 m_xFilter.set(m_xSFactory->createInstance(
49 "com.sun.star.comp.Writer.LotusWordProImportFilter"),
50 uno::UNO_QUERY_THROW);
53 bool LotusWordProTest::load(const OUString &,
54 const OUString &rURL, const OUString &,
55 SfxFilterFlags, SotClipboardFormatId, unsigned int)
57 uno::Sequence aDescriptor{ comphelper::makePropertyValue("URL", rURL) };
58 return m_xFilter->filter(aDescriptor);
61 void LotusWordProTest::test()
63 testDir(OUString(),
64 m_directories.getURLFromSrc(u"/lotuswordpro/qa/cppunit/data/"));
67 CPPUNIT_TEST_SUITE_REGISTRATION(LotusWordProTest);
70 CPPUNIT_PLUGIN_IMPLEMENT();
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */