fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / hwpfilter / qa / cppunit / test_hwpfilter.cxx
blobd4fe8363fb0aca5086a4f7ff745af0820a8d58ed
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:
27 virtual void setUp() SAL_OVERRIDE;
29 virtual bool load(const OUString &,
30 const OUString &rURL, const OUString &,
31 SfxFilterFlags, SotClipboardFormatId, unsigned int) SAL_OVERRIDE;
33 void test();
35 CPPUNIT_TEST_SUITE(HwpFilterTest);
36 CPPUNIT_TEST(test);
37 CPPUNIT_TEST_SUITE_END();
38 private:
39 uno::Reference<document::XFilter> m_xFilter;
42 void HwpFilterTest::setUp()
44 test::BootstrapFixture::setUp();
46 m_xFilter = uno::Reference< document::XFilter >(m_xSFactory->createInstance(
47 OUString(
48 "com.sun.comp.hwpimport.HwpImportFilter")),
49 uno::UNO_QUERY_THROW);
52 bool HwpFilterTest::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 HwpFilterTest::test()
64 testDir(OUString(),
65 getURLFromSrc("/hwpfilter/qa/cppunit/data/"),
66 OUString());
69 CPPUNIT_TEST_SUITE_REGISTRATION(HwpFilterTest);
72 CPPUNIT_PLUGIN_IMPLEMENT();
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */