diff options
author | Mark Hung <marklh9@gmail.com> | 2020-01-03 23:50:01 +0800 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-01-04 07:07:04 +0100 |
commit | 8e500c458af5f5ec7c680cd4ad083d8798c459a2 (patch) | |
tree | c2ef288abc68ba0807b97d1b43375bceee8bdea2 /sc | |
parent | c97f9af5e47ea234ad709a1f66c1e8ed20640066 (diff) |
sc/qa: revert locale change in the scope guard.
ScExportTest::testTdf112567() and ScExportTest::testTdf112567b()
change the locale config to "hu-HU" and revert to "" at the end,
the resulted locale is the system one instead of English, and
breaks testTdf128976 under a zh-TW build environment because
testTdf128976 relies on some font/loclae dependent metric data.
Change-Id: Iec8a0771a726133dfd30d5e5e254d9b678d44d72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86191
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc')
-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(); }); |