diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-15 15:41:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-04-15 17:16:56 +0200 |
commit | 791d8b4f1f656a8553c25fe9034ca8a350efaaae (patch) | |
tree | b4931b8dfc2258e2ce1f30117e3f81b4f565be07 /sw/qa/extras/odfexport | |
parent | bf33f22ff29b6e4f6ea204e7d438cf28a1079392 (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/odfexport')
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 20 |
1 files changed, 20 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") |