diff options
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 38f024ae22a4..c9e15f8514c7 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -4429,10 +4429,11 @@ void ScExportTest::testTdf112567() { // Set the system locale to Hungarian (a language with different range separator) SvtSysLocaleOptions aOptions; + OUString sLocaleConfigString = aOptions.GetLanguageTag().getBcp47(); aOptions.SetLocaleConfigString("hu-HU"); aOptions.Commit(); - comphelper::ScopeGuard g([&aOptions] { - aOptions.SetLocaleConfigString(OUString()); + comphelper::ScopeGuard g([&aOptions, &sLocaleConfigString] { + aOptions.SetLocaleConfigString(sLocaleConfigString); aOptions.Commit(); }); @@ -4455,10 +4456,11 @@ void ScExportTest::testTdf112567b() { // Set the system locale to Hungarian (a language with different range separator) SvtSysLocaleOptions aOptions; + OUString sLocaleConfigString = aOptions.GetLanguageTag().getBcp47(); aOptions.SetLocaleConfigString("hu-HU"); aOptions.Commit(); - comphelper::ScopeGuard g([&aOptions] { - aOptions.SetLocaleConfigString(OUString()); + comphelper::ScopeGuard g([&aOptions, &sLocaleConfigString] { + aOptions.SetLocaleConfigString(sLocaleConfigString); aOptions.Commit(); }); |