[Libreoffice-commits] core.git: desktop/source scp2/source

Stephan Bergmann sbergman at redhat.com
Sun Aug 25 23:35:13 PDT 2013


 desktop/source/app/langselect.cxx |   70 --------------------------------------
 scp2/source/ooo/common_brand.scp  |   14 -------
 2 files changed, 84 deletions(-)

New commits:
commit 3162d9d430a32c0d51f3d1f0cac3e22f66ae43f2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sat Aug 24 17:28:55 2013 +0200

    Remove unused STARTLANG feature
    
    Change-Id: Ib33f2ba2541faad24779cfdfbff7cf7f8a960af2

diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index d701ee4..5fc4bc2 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -24,10 +24,6 @@
 #include <stdio.h>
 
 #include <rtl/string.hxx>
-#include <rtl/bootstrap.hxx>
-#include <unotools/pathoptions.hxx>
-#include <tools/resid.hxx>
-#include <tools/config.hxx>
 #include <i18nlangtag/mslangid.hxx>
 #include <i18nlangtag/languagetag.hxx>
 #include <comphelper/processfactory.hxx>
@@ -41,8 +37,6 @@
 #include <com/sun/star/lang/Locale.hpp>
 #include "com/sun/star/util/XFlushable.hpp"
 #include <rtl/instance.hxx>
-#include <osl/process.h>
-#include <osl/file.hxx>
 
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
@@ -53,48 +47,10 @@ using namespace com::sun::star::util;
 
 namespace desktop {
 
-static char const SOFFICE_BOOTSTRAP[] = "Bootstrap";
-static char const SOFFICE_STARTLANG[] = "STARTLANG";
-
 sal_Bool LanguageSelection::bFoundLanguage = sal_False;
 OUString LanguageSelection::aFoundLanguage;
 LanguageSelection::LanguageSelectionStatus LanguageSelection::m_eStatus = LS_STATUS_OK;
 
-static sal_Bool existsURL( OUString const& sURL )
-{
-    using namespace osl;
-    DirectoryItem aDirItem;
-
-    if (!sURL.isEmpty())
-        return ( DirectoryItem::get( sURL, aDirItem ) == DirectoryItem::E_None );
-
-    return sal_False;
-}
-
-// locate soffice.ini/.rc file
-static OUString locateSofficeIniFile()
-{
-    OUString aUserDataPath;
-    OUString aSofficeIniFileURL;
-
-    // Retrieve the default file URL for the soffice.ini/rc
-    rtl::Bootstrap().getIniName( aSofficeIniFileURL );
-
-    if ( utl::Bootstrap::locateUserData( aUserDataPath ) == utl::Bootstrap::PATH_EXISTS )
-    {
-        sal_Int32 nIndex = aSofficeIniFileURL.lastIndexOf( '/');
-        if ( nIndex > 0 )
-        {
-            OUString aUserSofficeIniFileURL = aUserDataPath + "/config" + aSofficeIniFileURL.copy( nIndex );
-
-            if ( existsURL( aUserSofficeIniFileURL ))
-                return aUserSofficeIniFileURL;
-        }
-    }
-    // Fallback try to use the soffice.ini/rc from program folder
-    return aSofficeIniFileURL;
-}
-
 bool LanguageSelection::prepareLanguage()
 {
     m_eStatus = LS_STATUS_OK;
@@ -136,7 +92,6 @@ bool LanguageSelection::prepareLanguage()
 
     // get the selected UI language as string
     bool     bCmdLanguage( false );
-    bool     bIniLanguage( false );
     OUString aLocaleString = getUserUILanguage();
 
     if ( aLocaleString.isEmpty() )
@@ -153,23 +108,6 @@ bool LanguageSelection::prepareLanguage()
         }
         else
             aLocaleString = aEmpty;
-
-        if ( !bCmdLanguage )
-        {
-            OUString aSOfficeIniURL = locateSofficeIniFile();
-            Config aConfig(aSOfficeIniURL);
-            aConfig.SetGroup( SOFFICE_BOOTSTRAP );
-            OString sLang = aConfig.ReadKey( SOFFICE_STARTLANG );
-            aLocaleString = OUString( sLang.getStr(), sLang.getLength(), RTL_TEXTENCODING_ASCII_US );
-            if (isInstalledLanguage(aLocaleString, sal_False))
-            {
-                bIniLanguage   = true;
-                bFoundLanguage = true;
-                aFoundLanguage = aLocaleString;
-            }
-            else
-                aLocaleString = aEmpty;
-        }
     }
 
     // user further fallbacks for the UI language
@@ -194,14 +132,6 @@ bool LanguageSelection::prepareLanguage()
                 Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
             }
 
-            if ( bIniLanguage )
-            {
-                // Store language only
-                Reference< XPropertySet > xProp2(getConfigAccess("org.openoffice.Office.Linguistic/General/", sal_True), UNO_QUERY_THROW);
-                xProp2->setPropertyValue("UILocale", makeAny(aLocaleString));
-                Reference< XChangesBatch >(xProp2, UNO_QUERY_THROW)->commitChanges();
-            }
-
             MsLangId::setConfiguredSystemUILanguage( aUILanguageTag.getLanguageType( false) );
 
             OUString sLocale;
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 665b8bf..3dedd0b 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -939,20 +939,6 @@ ProfileItem gid_Brand_Profileitem_Soffice_Hideeula
     Value = "1";
 End
 
-#ifdef WNT
-ProfileItem gid_Brand_Profileitem_Soffice_Startlang
-    ProfileID = gid_Brand_Profile_Soffice_Ini;
-    ModuleID = gid_Module_Root_Brand;
-    Section = "Bootstrap";
-    Order = 8;
-    Key = "STARTLANG";
-    Value = "[STARTLANG]";
-    Inifiletablekey = "STARTLANG";
-    Inifiletableaction = "1";
-    Styles = (INIFILETABLE);
-End
-#endif
-
 ProfileItem gid_Brand_Profileitem_Version_Buildid
     ProfileID = gid_Brand_Profile_Version_Ini;
     ModuleID = gid_Module_Root_Brand;


More information about the Libreoffice-commits mailing list