summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-07-26 15:26:40 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-08-28 18:04:47 +0200
commit52d7c6be46663d4a28745a0cfa2ced5493637230 (patch)
treeb2edfc49121f4cbe95d00e02032c1945441b13a7 /sd/source/ui
parentb82489382e18494694530874480774e2bb29830e (diff)
sd lok: extend language status with BCP 47 language tag info in here as well
This brings Impress in sync with Calc, which does this since commit 47025060e4474d23e3bd97053a77b3943eeae724 (Send Bcp47 codes with region, 2019-08-28). Change-Id: I04b92c85b6627e145b5271a6f84780257e8f0d55 Reviewed-on: https://gerrit.libreoffice.org/78231 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/docshell/docshell.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 5b5ddfdce17e..ad0ce701bdfe 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -60,6 +60,7 @@
#include <OutlineView.hxx>
#include <ViewShellBase.hxx>
#include <sfx2/notebookbar/SfxNotebookBar.hxx>
+#include <comphelper/lok.hxx>
using namespace sd;
#define ShellClass_DrawDocShell
@@ -284,7 +285,19 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
eLanguage = mpDoc->GetLanguage( EE_CHAR_LANGUAGE );
}
- rSet.Put(SfxStringItem(nWhich, SvtLanguageTable::GetLanguageString(eLanguage)));
+ OUString aLanguage = SvtLanguageTable::GetLanguageString(eLanguage);
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ if (eLanguage == LANGUAGE_DONTKNOW)
+ {
+ aLanguage += ";-";
+ }
+ else
+ {
+ aLanguage += ";" + LanguageTag(eLanguage).getBcp47(false);
+ }
+ }
+ rSet.Put(SfxStringItem(nWhich, aLanguage));
}
break;