[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sfx2/source
Andras Timar (via logerrit)
logerrit at kemper.freedesktop.org
Sun Feb 21 20:03:50 UTC 2021
sfx2/source/view/viewsh.cxx | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
New commits:
commit c17748472edb005a30a71cfafd24f705591113fd
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Sun Feb 21 20:59:52 2021 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Sun Feb 21 21:03:17 2021 +0100
[cp-6.2 only] Fix SfxViewShell::SetLOKLanguageTag, as in cp-6.4 and higher
Change-Id: I93dcd4d540350262c687164edb4e32ea43165102
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index cae5f15fe4b7..144be3acfbca 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1541,22 +1541,17 @@ vcl::Window* SfxViewShell::GetEditWindowForActiveOLEObj() const
void SfxViewShell::SetLOKLanguageTag(const OUString& rBcp47LanguageTag)
{
-#ifdef IOS
- LanguageTag aTag = LanguageTag(rBcp47LanguageTag, true);
+ LanguageTag aTag(rBcp47LanguageTag, true);
css::uno::Sequence<OUString> inst(officecfg::Setup::Office::InstalledLocales::get()->getElementNames());
LanguageTag aFallbackTag = LanguageTag(getInstalledLocaleForSystemUILanguage(inst, /* bRequestInstallIfMissing */ false, rBcp47LanguageTag), true).makeFallback();
// If we want de-CH, and the de localisation is available, we don't want to use de-DE as then
// the magic in Translate::get() won't turn ess-zet into double s. Possibly other similar cases?
- if (aTag.getLanguage() == aFallbackTag.getLanguage())
+ if (comphelper::LibreOfficeKit::isActive() && aTag.getLanguage() == aFallbackTag.getLanguage())
maLOKLanguageTag = aTag;
else
maLOKLanguageTag = aFallbackTag;
-#else
- css::uno::Sequence<OUString> inst(officecfg::Setup::Office::InstalledLocales::get()->getElementNames());
- maLOKLanguageTag = LanguageTag(getInstalledLocaleForSystemUILanguage(inst, /* bRequestInstallIfMissing */ false, rBcp47LanguageTag), true).makeFallback();
-#endif
}
void SfxViewShell::SetLOKLocale(const OUString& rBcp47LanguageTag)
More information about the Libreoffice-commits
mailing list