[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sfx2/source

Franklin Weng franklin at goodhorse.idv.tw
Thu Mar 1 07:32:52 UTC 2018


 sfx2/source/appl/appserv.cxx |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit c008e38e1069f33a20af63eedc4bc7e6ebf5278d
Author: Franklin Weng <franklin at goodhorse.idv.tw>
Date:   Wed Feb 28 18:12:07 2018 +0800

    tdf#115795 Solve wrong redirect behavior of "Get Online Help"
    
    When under locale zh-TW, Help > Get Online Help would use only "zh"
    as the parameter of LOLang and sent it to hub.libreoffice.org, which
    would redirect to Simplified Chinese forum instead of zh_TW
    ask.libreoffice.org forum.  After discussing with Guilhem he
    refactored the behavior of the Hub, use LOlocale instead of LOLang,
    and keep LOLang for backward compatibility.  The LibreOffice sent
    LOlocale instead to avoid this problem happening again.
    
    Change-Id: Ia9348cff88723210f693e65260bb987826a3f3ea
    Reviewed-on: https://gerrit.libreoffice.org/50503
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    Reviewed-on: https://gerrit.libreoffice.org/50519
    Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index d6424c2d06ef..e5f91e7983e6 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -508,14 +508,8 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
         {
             // Askbot has URL's normalized to languages, not locales
             // Get language from locale: ll or lll or ll-CC or lll-CC
-            sal_Int32 ix = utl::ConfigManager::getLocale().indexOf("-",0);
-            OUString aLang;
-            if (ix == -1)
-                aLang = utl::ConfigManager::getLocale();
-            else
-                aLang = utl::ConfigManager::getLocale().copy(0,ix);
 
-            OUString sURL("http://hub.libreoffice.org/forum/?LOlang=" + aLang);
+            OUString sURL("https://hub.libreoffice.org/forum/?LOlocale=" + utl::ConfigManager::getLocale());
             sfx2::openUriExternally(sURL, false);
             break;
         }


More information about the Libreoffice-commits mailing list