summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-10-26 15:10:09 +0100
committerMathias Bauer <mba@openoffice.org>2009-10-26 15:10:09 +0100
commita822b5571761174e94563f53c8e55abf79c9f0b2 (patch)
tree76e0b65eb2ecfa468e39aa486abc3fc9edac315b /desktop
parent17fc5c612cfeae01c9d6cd9b5165cde212f4497e (diff)
#i103496#: shorten timespan when locale settings are inconsistent as they are stored at three different locations
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx6
-rw-r--r--desktop/source/app/langselect.cxx12
2 files changed, 16 insertions, 2 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index cdfca115cd8b..ea39fbbbd2b6 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1324,7 +1324,9 @@ void Desktop::Main()
}
String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, *pLabelResMgr ) ) : String();
delete pLabelResMgr;
-
+/*
+ // locale and UI locale in AppSettings are now retrieved from configuration or system directly via SvtSysLocale
+ // no reason to set while starting
// set UI language and locale
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ set locale settings" );
//LanguageSelection langselect;
@@ -1340,7 +1342,7 @@ void Desktop::Main()
aSettings.SetLanguage( eLanguage );
Application::SetSettings( aSettings );
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} set locale settings" );
-
+*/
// Check for StarOffice/Suite specific extensions runs also with OpenOffice installation sets
OUString aTitleString( aTitle );
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index 114997b5d1f7..e8b50cdd295e 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -143,6 +143,18 @@ bool LanguageSelection::prepareLanguage()
xProp->setPropertyValue(OUString::createFromAscii("ooLocale"), makeAny(aLocaleString));
Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
+ MsLangId::setConfiguredSystemUILanguage( MsLangId::convertLocaleToLanguage(loc) );
+
+ OUString sLocale;
+ xProp->getPropertyValue(OUString::createFromAscii("ooSetupSystemLocale")) >>= sLocale;
+ if ( sLocale.getLength() )
+ {
+ loc = LanguageSelection::IsoStringToLocale(aLocaleString);
+ MsLangId::setConfiguredSystemLanguage( MsLangId::convertLocaleToLanguage(loc) );
+ }
+ else
+ MsLangId::setConfiguredSystemLanguage( MsLangId::getSystemLanguage() );
+
bSuccess = sal_True;
}
catch ( PropertyVetoException& )