Bump version to 6.4-15
[LibreOffice.git] / hwpfilter / qa / cppunit / test_hwpfilter.cxx
blob040c98edb1b786ca27d5599461b382f5acf8f2d7
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>
16 #include <osl/thread.h>
18 using namespace ::com::sun::star;
20 namespace
22 class HwpFilterTest
23 : public test::FiltersTest
24 , public test::BootstrapFixture
26 public:
28 virtual bool load(const OUString &,
29 const OUString &rURL, const OUString &,
30 SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
32 void test();
34 CPPUNIT_TEST_SUITE(HwpFilterTest);
35 CPPUNIT_TEST(test);
36 CPPUNIT_TEST_SUITE_END();
39 bool HwpFilterTest::load(const OUString &,
40 const OUString &rURL, const OUString &,
41 SfxFilterFlags, SotClipboardFormatId, unsigned int)
43 uno::Reference<document::XFilter> xFilter(m_xSFactory->createInstance("com.sun.comp.hwpimport.HwpImportFilter"),
44 uno::UNO_QUERY_THROW);
46 uno::Sequence< beans::PropertyValue > aDescriptor(1);
47 aDescriptor[0].Name = "URL";
48 aDescriptor[0].Value <<= rURL;
49 return xFilter->filter(aDescriptor);
52 void HwpFilterTest::test()
54 testDir(OUString(),
55 m_directories.getURLFromSrc("/hwpfilter/qa/cppunit/data/"));
58 CPPUNIT_TEST_SUITE_REGISTRATION(HwpFilterTest);
61 CPPUNIT_PLUGIN_IMPLEMENT();
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */