summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/ooxmlimport/ooxmlimport.cxx')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index f21037037d0a..df0f695a8714 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -91,17 +91,20 @@ public:
{
}
- virtual void preTest(const char* filename) override
+ virtual std::unique_ptr<Resetter> preTest(const char* filename) override
{
if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx" || OString(filename) == "fdo87488.docx")
+ {
+ std::unique_ptr<Resetter> pResetter(new Resetter(
+ [] () {
+ SvtFilterOptions::Get().SetSmartArt2Shape(false);
+ }));
SvtFilterOptions::Get().SetSmartArt2Shape(true);
+ return pResetter;
+ }
+ return nullptr;
}
- virtual void postTest(const char* filename) override
- {
- if (OString(filename) == "smartart.docx" || OString(filename) == "strict-smartart.docx" || OString(filename) == "fdo87488.docx")
- SvtFilterOptions::Get().SetSmartArt2Shape(false);
- }
protected:
/// Copy&paste helper.
bool paste(const OUString& rFilename, const uno::Reference<text::XTextRange>& xTextRange)