summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport/rtfimport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index b5216c98af48..a5264d3c1b53 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -66,27 +66,32 @@ public:
{
}
- virtual void preTest(const char* filename) override
+ virtual std::unique_ptr<Resetter> preTest(const char* filename) override
{
m_aSavedSettings = Application::GetSettings();
if (OString(filename) == "fdo48023.rtf" || OString(filename) == "fdo72031.rtf")
{
+ std::unique_ptr<Resetter> pResetter(new Resetter(
+ [this] () {
+ Application::SetSettings(this->m_aSavedSettings);
+ }));
AllSettings aSettings(m_aSavedSettings);
aSettings.SetLanguageTag(LanguageTag("ru"));
Application::SetSettings(aSettings);
+ return pResetter;
}
else if (OString(filename) == "fdo44211.rtf")
{
+ std::unique_ptr<Resetter> pResetter(new Resetter(
+ [this] () {
+ Application::SetSettings(this->m_aSavedSettings);
+ }));
AllSettings aSettings(m_aSavedSettings);
aSettings.SetLanguageTag(LanguageTag("lt"));
Application::SetSettings(aSettings);
+ return pResetter;
}
- }
-
- virtual void postTest(const char* filename) override
- {
- if (OString(filename) == "fdo48023.rtf" || OString(filename) == "fdo72031.rtf" || OString(filename) == "fdo44211.rtf")
- Application::SetSettings(m_aSavedSettings);
+ return nullptr;
}
protected: