diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 20 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/mathtype.docx | bin | 0 -> 12533 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 9 |
3 files changed, 29 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 3ab9bc752afd..848bec887ed0 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -49,6 +49,26 @@ public: return std::find(aBlacklist.begin(), aBlacklist.end(), filename) == aBlacklist.end(); } + + virtual void preTest(const char* pFilename) SAL_OVERRIDE + { + if (OString(pFilename) == "fdo58949.docx") + { + std::shared_ptr<comphelper::ConfigurationChanges> pBatch(comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::set(false, pBatch); + pBatch->commit(); + } + } + + virtual void postTest(const char* pFilename) SAL_OVERRIDE + { + if (OString(pFilename) == "fdo58949.docx") + { + std::shared_ptr<comphelper::ConfigurationChanges> pBatch(comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::set(true, pBatch); + pBatch->commit(); + } + } }; DECLARE_ODFEXPORT_TEST(testFdo38244, "fdo38244.odt") diff --git a/sw/qa/extras/ooxmlimport/data/mathtype.docx b/sw/qa/extras/ooxmlimport/data/mathtype.docx Binary files differnew file mode 100644 index 000000000000..bf60f43b25b7 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/mathtype.docx 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(); |