summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-04-15 15:41:11 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-04-15 17:16:56 +0200
commit791d8b4f1f656a8553c25fe9034ca8a350efaaae (patch)
treeb4931b8dfc2258e2ce1f30117e3f81b4f565be07 /sw/qa/extras/ooxmlimport/ooxmlimport.cxx
parentbf33f22ff29b6e4f6ea204e7d438cf28a1079392 (diff)
DOCX import: convert MathType to Math if MathTypeToMath is enabled
With this, math equations created by Word <= 2003 and embedded to docx files can be edited finally. Previously the result was read-only and opened in an unexpected new window. Change-Id: I4f9dd1cca4a149959f6151cf9af9242b53190ef5
Diffstat (limited to 'sw/qa/extras/ooxmlimport/ooxmlimport.cxx')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index bf54c2d56428..107060f443f5 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -2647,6 +2647,15 @@ DECLARE_OOXMLIMPORT_TEST(testFdo87488, "fdo87488.docx")
}
}
+DECLARE_OOXMLIMPORT_TEST(mathtype, "mathtype.docx")
+{
+ uno::Reference<text::XTextEmbeddedObjectsSupplier> xTextEmbeddedObjectsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xEmbeddedObjects(xTextEmbeddedObjectsSupplier->getEmbeddedObjects(), uno::UNO_QUERY);
+ // This failed as the Model property was empty.
+ auto xModel = getProperty< uno::Reference<lang::XServiceInfo> >(xEmbeddedObjects->getByIndex(0), "Model");
+ CPPUNIT_ASSERT(xModel->supportsService("com.sun.star.formula.FormulaProperties"));
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();