Fix currency symbol selection in Calc on mobile
commit3810f28d784ff71d4c6d68557e70bd80c1d1d99c
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Mon, 24 Feb 2020 07:07:12 +0000 (24 08:07 +0100)
committerAndras Timar <andras.timar@collabora.com>
Tue, 25 Feb 2020 08:25:33 +0000 (25 09:25 +0100)
tree6693669512264f402e9169107141150c2347bd7c
parent58fab0b920303e58d3ac3be28b22763970085f02
Fix currency symbol selection in Calc on mobile

In LOK we use one language identifier for both - UI language and
the locale used. This is a problem when we determine that we a
language for UI is not available and fall-back to the default
"en-US" langauge, which also changes the locale. This introduces
a separate variable that stores the language tag for the locale
independently to the language.

Another problem is that in some cases we don't reset the staticly
initialized data, when the new document is loaded, which is on
the other hand used to define which currency symbol is used as
SYSTEM locale. That can in some cases select the wrong currency
symbol even when we changed the locale to something else. This fix
introduces a reset function, which is triggered on every document
load.

Change-Id: I55c7f467600a832895f94346f8bf11a6ef6a1e49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89320
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89343
Tested-by: Jenkins
12 files changed:
comphelper/source/misc/lok.cxx
desktop/CppunitTest_desktop_lib.mk
desktop/qa/desktop_lib/test_desktop_lib.cxx
desktop/source/lib/init.cxx
include/comphelper/lok.hxx
include/sfx2/lokhelper.hxx
include/sfx2/viewsh.hxx
include/svl/zforlist.hxx
sfx2/source/view/lokhelper.cxx
sfx2/source/view/viewsh.cxx
svl/source/numbers/zforlist.cxx
unotools/source/misc/syslocale.cxx