sd/qa/unit/tiledrendering/tiledrendering.cxx |    6 +++++-
 sd/source/ui/docshell/docshell.cxx           |   15 ++++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 52d7c6be46663d4a28745a0cfa2ced5493637230
Author:     Miklos Vajna <[email protected]>
AuthorDate: Fri Jul 26 15:26:40 2019 +0200
Commit:     Miklos Vajna <[email protected]>
CommitDate: Wed Aug 28 18:04:47 2019 +0200

    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 <[email protected]>
    Tested-by: Jenkins

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index af443317b94e..e5783a1731b3 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1891,7 +1891,11 @@ void SdTiledRenderingTest::testLanguageStatus()
         std::unique_ptr<SfxPoolItem> xItem2;
         pView1->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, 
xItem1);
         pView2->GetViewFrame()->GetBindings().QueryState(SID_LANGUAGE_STATUS, 
xItem2);
-        CPPUNIT_ASSERT(dynamic_cast< const SfxStringItem* >(xItem1.get()));
+        auto pStringItem = dynamic_cast<const SfxStringItem*>(xItem1.get());
+        CPPUNIT_ASSERT(pStringItem);
+
+        CPPUNIT_ASSERT_EQUAL(OUString("English (USA);en-US"), 
pStringItem->GetValue());
+
         CPPUNIT_ASSERT(dynamic_cast< const SfxStringItem* >(xItem2.get()));
     }
 }
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;
 
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to