summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2011-05-06 18:19:22 +0200
committerKohei Yoshida <kyoshida@novell.com>2011-05-10 01:12:44 -0400
commit45fbdc47e415f7d7e7b196b371d2e22ec5214522 (patch)
treed887207d70890f59da1e554a7abed87b5abb1e86 /unotools
parent5918ea9d3dbdac0608f91bf9f05275b881fc5138 (diff)
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)
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/syslocaleoptions.cxx24
1 files changed, 10 insertions, 14 deletions
diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx
index 2b6f4f2cdc1b..9c071cea2dd1 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 );
-*/
}
}