nss: upgrade to release 3.73
[LibreOffice.git] / filter / qa / cppunit / filters-dxf-test.cxx
blobdcadeae17d1912642b8dc0027551721f5dfdfab2
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 <vcl/FilterConfigItem.hxx>
13 #include <tools/stream.hxx>
14 #include <vcl/graph.hxx>
16 extern "C"
18 SAL_DLLPUBLIC_EXPORT bool SAL_CALL
19 idxGraphicImport(SvStream & rStream, Graphic & rGraphic,
20 FilterConfigItem*);
23 using namespace ::com::sun::star;
25 /* Implementation of Filters test */
27 class DxfFilterTest
28 : public test::FiltersTest
29 , public test::BootstrapFixture
31 public:
32 DxfFilterTest() : BootstrapFixture(true, false) {}
34 virtual bool load(const OUString &,
35 const OUString &rURL, const OUString &,
36 SfxFilterFlags, SotClipboardFormatId, unsigned int) override;
38 /**
39 * Ensure CVEs remain unbroken
41 void testCVEs();
43 CPPUNIT_TEST_SUITE(DxfFilterTest);
44 CPPUNIT_TEST(testCVEs);
45 CPPUNIT_TEST_SUITE_END();
48 bool DxfFilterTest::load(const OUString &,
49 const OUString &rURL, const OUString &,
50 SfxFilterFlags, SotClipboardFormatId, unsigned int)
52 SvFileStream aFileStream(rURL, StreamMode::READ);
53 Graphic aGraphic;
54 return idxGraphicImport(aFileStream, aGraphic, nullptr);
57 void DxfFilterTest::testCVEs()
59 testDir(OUString(),
60 m_directories.getURLFromSrc("/filter/qa/cppunit/data/dxf/"));
63 CPPUNIT_TEST_SUITE_REGISTRATION(DxfFilterTest);
65 CPPUNIT_PLUGIN_IMPLEMENT();
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */