summaryrefslogtreecommitdiffstats
path: root/oox/qa/unit/mathml.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/qa/unit/mathml.cxx')
-rw-r--r--oox/qa/unit/mathml.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/oox/qa/unit/mathml.cxx b/oox/qa/unit/mathml.cxx
index 632fc566ddb7..0352c7a84ec4 100644
--- a/oox/qa/unit/mathml.cxx
+++ b/oox/qa/unit/mathml.cxx
@@ -10,8 +10,9 @@
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
-#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
#include <comphelper/embeddedobjectcontainer.hxx>
#include <comphelper/processfactory.hxx>
@@ -60,6 +61,21 @@ CPPUNIT_TEST_FIXTURE(OoxMathmlTest, testImportCharacters)
CPPUNIT_ASSERT(getComponent().is());
}
+CPPUNIT_TEST_FIXTURE(OoxMathmlTest, testImportMce)
+{
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "import-mce.pptx";
+ getComponent() = loadFromDesktop(aURL);
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+
+ // Without the accompanying fix in place, this failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. both the math object and its replacement image was imported, as two separate objects.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xDrawPage->getCount());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */