Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / hwpfilter / qa / cppunit / test_hwpfilter.cxx
blob2bb942aba5a01df33fde3aa316229185915638d8
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 <comphelper/propertyvalue.hxx>
15 #include <osl/file.hxx>
16 #include <osl/process.h>
17 #include <osl/thread.h>
19 using namespace ::com::sun::star;
21 namespace
23 class HwpFilterTest
24 : public test::FiltersTest
25 , public test::BootstrapFixture
27 public:
29 virtual bool load(const OUString &,
30 const OUString &rURL, const OUString &,
31 SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
33 void test();
35 CPPUNIT_TEST_SUITE(HwpFilterTest);
36 CPPUNIT_TEST(test);
37 CPPUNIT_TEST_SUITE_END();
40 bool HwpFilterTest::load(const OUString &,
41 const OUString &rURL, const OUString &,
42 SfxFilterFlags, SotClipboardFormatId, unsigned int)
44 uno::Reference<document::XFilter> xFilter(m_xSFactory->createInstance("com.sun.comp.hwpimport.HwpImportFilter"),
45 uno::UNO_QUERY_THROW);
47 return xFilter->filter({ comphelper::makePropertyValue("URL", rURL) });
50 void HwpFilterTest::test()
52 testDir(OUString(),
53 m_directories.getURLFromSrc(u"/hwpfilter/qa/cppunit/data/"));
56 CPPUNIT_TEST_SUITE_REGISTRATION(HwpFilterTest);
59 CPPUNIT_PLUGIN_IMPLEMENT();
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */