Update git submodules
[LibreOffice.git] / oox / qa / unit / mathml.cxx
blob3e1b8c55b8ce8c4ac297b1fbd3cd8b3babdfa941
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 <test/unoapi_test.hxx>
12 #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
14 using namespace ::com::sun::star;
16 /// oox mathml tests.
17 class OoxMathmlTest : public UnoApiTest
19 public:
20 OoxMathmlTest()
21 : UnoApiTest("/oox/qa/unit/data/")
26 CPPUNIT_TEST_FIXTURE(OoxMathmlTest, testImportCharacters)
28 // Without the accompanying fix in place, this failed with an assertion failure on import.
29 loadFromFile(u"import-characters.pptx");
32 CPPUNIT_TEST_FIXTURE(OoxMathmlTest, testImportMce)
34 loadFromFile(u"import-mce.pptx");
35 uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
36 uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
37 uno::UNO_QUERY);
39 // Without the accompanying fix in place, this failed with:
40 // - Expected: 1
41 // - Actual : 2
42 // i.e. both the math object and its replacement image was imported, as two separate objects.
43 CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xDrawPage->getCount());
46 CPPUNIT_PLUGIN_IMPLEMENT();
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */