summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfexport/odfexport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/odfexport/odfexport.cxx')
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index a5b18472d055..4b713cd04525 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -56,24 +56,24 @@ public:
return std::find(aBlacklist.begin(), aBlacklist.end(), filename) == aBlacklist.end();
}
- virtual void preTest(const char* pFilename) override
+ virtual std::unique_ptr<Resetter> preTest(const char* pFilename) 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();
- }
- }
+ std::unique_ptr<Resetter> pResetter(new Resetter(
+ [] () {
+ std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::set(true, pBatch);
+ return pBatch->commit();
+ }));
- virtual void postTest(const char* pFilename) 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);
+ officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::set(false, pBatch);
pBatch->commit();
+ return pResetter;
}
+ return nullptr;
}
};