summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-12-12 18:13:03 +0100
committerMichael Meeks <michael.meeks@collabora.com>2017-12-19 17:23:01 +0100
commite16852cd1bc5d9e0646ae4183bc13a7bce19df7f (patch)
tree07e7ada37599b825459358b5fa89cc5b11b3bf9d /comphelper
parent193ebf963cf251fd0885b47e59d9db11a97450f2 (diff)
lokdialog: Allow windows / dialogs in different languages.
Change-Id: I9f32161981aed73e6d97696e5f976af276d1625a Reviewed-on: https://gerrit.libreoffice.org/46327 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/46775 Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/lok.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index b8324a4defcd..2e8624d1e8d0 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -27,6 +27,10 @@ static bool g_bTiledAnnotations(true);
static bool g_bRangeHeaders(false);
+static bool g_bLocalRendering(false);
+
+static LanguageTag g_aLanguageTag("en-US", true);
+
void setActive(bool bActive)
{
g_bActive = bActive;
@@ -87,8 +91,6 @@ bool isRangeHeaders()
return g_bRangeHeaders;
}
-static bool g_bLocalRendering(false);
-
void setLocalRendering(bool bLocalRendering)
{
g_bLocalRendering = bLocalRendering;
@@ -99,6 +101,17 @@ bool isLocalRendering()
return g_bLocalRendering;
}
+void setLanguageTag(const LanguageTag& languageTag)
+{
+ if (g_aLanguageTag != languageTag)
+ g_aLanguageTag = languageTag;
+}
+
+const LanguageTag& getLanguageTag()
+{
+ return g_aLanguageTag;
+}
+
static void (*pStatusIndicatorCallback)(void *data, statusIndicatorCallbackType type, int percent)(nullptr);
static void *pStatusIndicatorCallbackData(nullptr);