summaryrefslogtreecommitdiff
path: root/shell/source/backends/localebe/localebackend.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-11-16 09:15:55 +0000
committerOliver Bolte <obo@openoffice.org>2005-11-16 09:15:55 +0000
commite7d236b7806eebbaba2d2f04b99e90ee011bed0d (patch)
treeccd31c35cac3a01de1e9520f903c334b69cf837e /shell/source/backends/localebe/localebackend.cxx
parentbe95c0cbc326c6ebd162411d96037cc006dccfd4 (diff)
INTEGRATION: CWS thaiissues (1.7.2); FILE MERGED
2005/10/26 12:09:05 ssa 1.7.2.1: #i55555# support query for system default locale, useful on Windows
Diffstat (limited to 'shell/source/backends/localebe/localebackend.cxx')
-rw-r--r--shell/source/backends/localebe/localebackend.cxx24
1 files changed, 20 insertions, 4 deletions
diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx
index 14d62d985005..9314de17be42 100644
--- a/shell/source/backends/localebe/localebackend.cxx
+++ b/shell/source/backends/localebe/localebackend.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: localebackend.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: obo $ $Date: 2005-10-13 09:43:41 $
+ * last change: $Author: obo $ $Date: 2005-11-16 10:15:55 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -283,12 +283,23 @@ rtl::OUString LocaleBackend::getUILocale(void)
#endif
}
+// ---------------------------------------------------------------------------------------
+
+rtl::OUString LocaleBackend::getSystemLocale(void)
+{
+// note: the implementation differs from getLocale() only on Windows
+#if defined WNT
+ return ImplGetLocale( GetSystemDefaultLCID() );
+#else
+ return getLocale();
+#endif
+}
//------------------------------------------------------------------------------
rtl::OUString LocaleBackend::createTimeStamp()
{
// the time stamp is free text, so just returning the values here.
- return getLocale() + getUILocale();
+ return getLocale() + getUILocale() + getSystemLocale();
}
//------------------------------------------------------------------------------
@@ -302,7 +313,7 @@ uno::Reference<backend::XLayer> SAL_CALL LocaleBackend::getLayer(
{
if( ! m_xSystemLayer.is() )
{
- uno::Sequence<backend::PropertyInfo> aPropInfoList(2);
+ uno::Sequence<backend::PropertyInfo> aPropInfoList(3);
aPropInfoList[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.System/L10N/UILocale") );
aPropInfoList[0].Type = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "string" ) );
@@ -314,6 +325,11 @@ uno::Reference<backend::XLayer> SAL_CALL LocaleBackend::getLayer(
aPropInfoList[1].Protected = sal_False;
aPropInfoList[1].Value = uno::makeAny( getLocale() );
+ aPropInfoList[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.System/L10N/SystemLocale") );
+ aPropInfoList[2].Type = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "string" ));
+ aPropInfoList[2].Protected = sal_False;
+ aPropInfoList[2].Value = uno::makeAny( getSystemLocale() );
+
m_xSystemLayer = new LocaleLayer(aPropInfoList, createTimeStamp(), m_xContext);
}