summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-07-23 11:30:17 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-08-28 13:13:24 +0200
commit616718a05c5625f1752a86d2223241d2dde2bdee (patch)
tree1f7285da5629b45ec8bf84d992af8e2c6c16ffb2 /sc
parent5f3c2204eb7dbe82cc64bf0ade34ecfb4b9ffc05 (diff)
Send ISO language code on state changed
[ Miklos: commit 13c77cc3b34555aefd898a15c6ad898049f8aed6 (Send iso code for languages, 2019-07-19) only changed the behavior in case the LOK client asks for a list of languages explicitly. This one affects the case when the language under the cursor changes and core initiates the core -> client information sending. ] Also contains: Fix language unit test Change-Id: I45b4263026928de898fe89e25c21d97c82e1beeb Change-Id: I2f82cee1fda613636fc421449a2d8a56b0a35b7f Reviewed-on: https://gerrit.libreoffice.org/78222 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx5
2 files changed, 5 insertions, 2 deletions
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index b0f083d1e754..25beaa6f0c51 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1441,7 +1441,7 @@ void ScTiledRenderingTest::testLanguageStatus()
SfxLokHelper::createView();
SfxViewShell* pView2 = SfxViewShell::Current();
CPPUNIT_ASSERT(pView1 != pView2);
- const OUString aLangBolivia("Spanish (Bolivia)");
+ const OUString aLangBolivia("Spanish (Bolivia);es");
{
std::unique_ptr<SfxPoolItem> xItem1;
std::unique_ptr<SfxPoolItem> xItem2;
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index c83a3f154f72..e9b3dde362b6 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2004,7 +2004,10 @@ void ScDocShell::GetState( SfxItemSet &rSet )
LanguageType eLatin, eCjk, eCtl;
GetDocument().GetLanguage( eLatin, eCjk, eCtl );
- rSet.Put(SfxStringItem(nWhich, SvtLanguageTable::GetLanguageString(eLatin)));
+ OUString sLanguage = SvtLanguageTable::GetLanguageString(eLatin);
+ if (comphelper::LibreOfficeKit::isActive())
+ sLanguage += ";" + LanguageTag(eLatin).getLanguage();
+ rSet.Put(SfxStringItem(nWhich, sLanguage));
}
break;