[Libreoffice-commits] .: Branch 'libreoffice-3-4' - unotools/source

Thorsten Behrens thorsten at kemper.freedesktop.org
Mon May 9 07:13:06 PDT 2011


 unotools/source/config/syslocaleoptions.cxx |   24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

New commits:
commit f8aa9663aeba8b9227ae197eb964ad2c64f943f1
Author: Thorsten Behrens <tbehrens at novell.com>
Date:   Fri May 6 18:19:22 2011 +0200

    Fix non-changeability of UI locale
    
    Enabled commented-out code, that actually permits changing the ui
    locale without having to go through configuration.
    
    This permits forcing en-us locale from the unit tests (which don't
    have a working config)

diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx
index 005b325..0697942 100644
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -273,19 +273,16 @@ void SvtSysLocaleOptions_Impl::MakeRealLocale()
 
 void SvtSysLocaleOptions_Impl::MakeRealUILocale()
 {
-    if ( !m_aRealUILocale.Language.getLength() )
+    // as we can't switch UILocale at runtime, we only store changes in the configuration
+    m_aRealUILocale = lcl_str_to_locale( m_aUILocaleString );
+    if ( m_aRealUILocale.Language.getLength() )
     {
-        // as we can't switch UILocale at runtime, we only store changes in the configuration
-        m_aRealUILocale = lcl_str_to_locale( m_aUILocaleString );
-        if ( m_aRealUILocale.Language.getLength() )
-        {
-            m_eRealUILanguage = MsLangId::convertLocaleToLanguage( m_aRealUILocale );
-        }
-        else
-        {
-            m_eRealUILanguage = MsLangId::getSystemUILanguage();
-            MsLangId::convertLanguageToLocale( m_eRealUILanguage, m_aRealUILocale );
-        }
+        m_eRealUILanguage = MsLangId::convertLocaleToLanguage( m_aRealUILocale );
+    }
+    else
+    {
+        m_eRealUILanguage = MsLangId::getSystemUILanguage();
+        MsLangId::convertLanguageToLocale( m_eRealUILanguage, m_aRealUILocale );
     }
 }
 
@@ -399,13 +396,12 @@ void SvtSysLocaleOptions_Impl::SetUILocaleString( const OUString& rStr )
     if (!m_bROUILocale && rStr != m_aUILocaleString )
     {
         m_aUILocaleString = rStr;
-/*
+
         // as we can't switch UILocale at runtime, we only store changes in the configuration
         MakeRealUILocale();
         MsLangId::setConfiguredSystemLanguage( m_eRealUILanguage );
         SetModified();
         NotifyListeners( SYSLOCALEOPTIONS_HINT_UILOCALE );
-*/
     }
 }
 


More information about the Libreoffice-commits mailing list