diff options
author | Thorsten Behrens <tbehrens@novell.com> | 2011-05-06 18:19:22 +0200 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-05-10 01:12:44 -0400 |
commit | e7950e7a33d922731b4d3672fed9b1a2875a3a9d (patch) | |
tree | b897e0e8b79ec532a1a36854ab423b937080a613 /unotools | |
parent | 20c2f97b598018e1934707d7a659db9a6cc2af0c (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.cxx | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index 005b3255f1..0697942f3a 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 ); -*/ } } |