summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-01-03 17:49:25 +0100
committerJan Holesovsky <kendy@collabora.com>2018-01-05 09:51:54 +0100
commit7ca3490d91a1fc4e01b34ea1a2f281968b0b1479 (patch)
tree04f48387cc631224db3fa3b7b3a2f6fe4afd6c06 /sfx2
parent028fd03cdf4d3d8072289a5c4d476435c18f90d0 (diff)
lokdialog: Use only one of the installed langpacks when setting locale.
Change-Id: I446775b121b7806a549f4dbbaa1f2dcf019d9bc2 Reviewed-on: https://gerrit.libreoffice.org/47386 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewsh.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 8060a330f132..7ebc86176495 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -26,6 +26,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/toolbox.hxx>
#include <svl/intitem.hxx>
+#include <svtools/langhelp.hxx>
#include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx>
#include <com/sun/star/frame/XLayoutManager.hpp>
@@ -57,6 +58,7 @@
#include <vcl/commandinfoprovider.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <officecfg/Setup.hxx>
#include <sfx2/app.hxx>
#include <sfx2/viewsh.hxx>
#include "viewimp.hxx"
@@ -1488,6 +1490,12 @@ vcl::Window* SfxViewShell::GetEditWindowForActiveOLEObj() const
return pEditWin;
}
+void SfxViewShell::SetLOKLanguageTag(const OUString& rBcp47LanguageTag)
+{
+ css::uno::Sequence<OUString> inst(officecfg::Setup::Office::InstalledLocales::get()->getElementNames());
+ maLOKLanguageTag = LanguageTag(getInstalledLocaleForSystemUILanguage(inst, /* bRequestInstallIfMissing */ false, rBcp47LanguageTag), true).makeFallback();
+}
+
void SfxViewShell::NotifyCursor(SfxViewShell* /*pViewShell*/) const
{
}