Fix currency symbol selection in Calc on mobile

Desktop / LibreOffice - Tomaž Vajngerl [collabora.co.uk] - 25 February 2020 08:25 EST

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

3810f28d784f Fix currency symbol selection in Calc on mobile
comphelper/source/misc/lok.cxx | 73 +++++++++++++++++++++++++----
desktop/CppunitTest_desktop_lib.mk | 1 +
desktop/qa/desktop_lib/test_desktop_lib.cxx | 2 +-
desktop/source/lib/init.cxx | 39 ++++++++-------
include/comphelper/lok.hxx | 7 ++-
include/sfx2/lokhelper.hxx | 6 +++
include/sfx2/viewsh.hxx | 6 +++
include/svl/zforlist.hxx | 2 +
sfx2/source/view/lokhelper.cxx | 32 ++++++++++++-
sfx2/source/view/viewsh.cxx | 11 ++++-
svl/source/numbers/zforlist.cxx | 10 ++++
unotools/source/misc/syslocale.cxx | 2 +-
12 files changed, 159 insertions(+), 32 deletions(-)

Upstream: cgit.freedesktop.org


  • Share