1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #include <test/bootstrapfixture.hxx>
11 #include <unotest/macros_test.hxx>
13 #include <com/sun/star/frame/Desktop.hpp>
14 #include <com/sun/star/embed/XStorage.hpp>
16 #include <comphelper/embeddedobjectcontainer.hxx>
17 #include <comphelper/processfactory.hxx>
18 #include <comphelper/propertyvalue.hxx>
19 #include <comphelper/scopeguard.hxx>
20 #include <comphelper/storagehelper.hxx>
22 using namespace ::com::sun::star
;
25 class OoxMathmlTest
: public test::BootstrapFixture
, public unotest::MacrosTest
28 uno::Reference
<uno::XComponentContext
> mxComponentContext
;
29 uno::Reference
<lang::XComponent
> mxComponent
;
32 void setUp() override
;
33 void tearDown() override
;
34 uno::Reference
<lang::XComponent
>& getComponent() { return mxComponent
; }
37 void OoxMathmlTest::setUp()
39 test::BootstrapFixture::setUp();
41 mxComponentContext
.set(comphelper::getComponentContext(getMultiServiceFactory()));
42 mxDesktop
.set(frame::Desktop::create(mxComponentContext
));
45 void OoxMathmlTest::tearDown()
48 mxComponent
->dispose();
50 test::BootstrapFixture::tearDown();
53 char const DATA_DIRECTORY
[] = "/oox/qa/unit/data/";
55 CPPUNIT_TEST_FIXTURE(OoxMathmlTest
, testImportCharacters
)
57 OUString aURL
= m_directories
.getURLFromSrc(DATA_DIRECTORY
) + "import-characters.pptx";
58 // Without the accompanying fix in place, this failed with an assertion failure on import.
59 getComponent() = loadFromDesktop(aURL
);
60 CPPUNIT_ASSERT(getComponent().is());
63 CPPUNIT_PLUGIN_IMPLEMENT();
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */