summaryrefslogtreecommitdiff
path: root/desktop/source/app/userinstall.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-11-26 22:15:09 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-11-26 22:15:09 +0000
commite8af981d5a68eb7adaa61c19a0d72cd4881e7c17 (patch)
treeef96d13081962e876e904da77bcbb8a203c73fde /desktop/source/app/userinstall.cxx
parent9ca650e75c09b9c786708a75a33bdf5b840ba89f (diff)
INTEGRATION: CWS os43 (1.13.60); FILE MERGED
2004/11/18 10:46:17 tl 1.13.60.1: #i33027# now setting DefaultLocale and DefaultLocale_CJK only if they are not already set
Diffstat (limited to 'desktop/source/app/userinstall.cxx')
-rw-r--r--desktop/source/app/userinstall.cxx23
1 files changed, 18 insertions, 5 deletions
diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx
index 89029b011dd9..0d8a1f891603 100644
--- a/desktop/source/app/userinstall.cxx
+++ b/desktop/source/app/userinstall.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: userinstall.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: obo $ $Date: 2004-11-15 15:46:40 $
+ * last change: $Author: hr $ $Date: 2004-11-26 23:15:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -327,14 +327,27 @@ namespace desktop {
theArgs[0] <<= v;
Reference< XPropertySet > pset = Reference< XPropertySet >(
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs), UNO_QUERY_THROW);
+ OUString aDefaultLocale( OUString::createFromAscii("DefaultLocale") );
+ OUString aDefaultLocale_CJK( OUString::createFromAscii("DefaultLocale_CJK") );
+ OUString aTmp;
if (aUserLanguage.equalsAscii("ja") || aUserLanguage.equalsAscii("ko")
|| aUserLanguage.equalsAscii("zh-CN") || aUserLanguage.equalsAscii("zh-TW"))
{
- pset->setPropertyValue(OUString::createFromAscii("DefaultLocale"), makeAny(OUString::createFromAscii("en-US")));
- pset->setPropertyValue(OUString::createFromAscii("DefaultLocale_CJK"), makeAny(aUserLanguage));
+ // only set the locales if there is not already a value set
+ // (inititially there is no value set in the configuration)
+ pset->getPropertyValue(aDefaultLocale) >>= aTmp;
+ if (!aTmp.getLength())
+ pset->setPropertyValue(aDefaultLocale, makeAny(OUString::createFromAscii("en-US")));
+ pset->getPropertyValue(aDefaultLocale_CJK) >>= aTmp;
+ if (!aTmp.getLength())
+ pset->setPropertyValue(aDefaultLocale_CJK, makeAny(aUserLanguage));
} else
{
- pset->setPropertyValue(OUString::createFromAscii("DefaultLocale"), makeAny(aUserLanguage));
+ // only set the locales if there is not already a value set
+ // (inititially there is no value set in the configuration)
+ pset->getPropertyValue(aDefaultLocale) >>= aTmp;
+ if (!aTmp.getLength())
+ pset->setPropertyValue(aDefaultLocale, makeAny(aUserLanguage));
}
Reference< XChangesBatch >(pset, UNO_QUERY_THROW)->commitChanges();