summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2011-05-06 18:19:22 +0200
committerThorsten Behrens <tbehrens@novell.com>2011-05-09 16:13:23 +0200
commit018c43bc46a55b9ecee3d7376372b4d8c272706c (patch)
tree1d36722cae32916e2014a4ea29d690f23cdccea6 /unotools
parentc313d45a2e75e994b6a35d4d18b308c498967299 (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 );
-*/
}
}