summaryrefslogtreecommitdiff
path: root/padmin/source/helper.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-05-28 11:36:09 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-05-28 11:36:09 +0000
commit77541136408446f250c21ea3879d23770a3dcf9c (patch)
treec076b36dddf826c9c391b67d4869c77ab02f33cc /padmin/source/helper.cxx
parentb208ec62eec3dd7cfdb187e14cfcf016c495722b (diff)
INTEGRATION: CWS vcl09 (1.11.4); FILE MERGED
2003/04/29 15:29:35 pl 1.11.4.1: #108994# read locale from configuration
Diffstat (limited to 'padmin/source/helper.cxx')
-rw-r--r--padmin/source/helper.cxx30
1 files changed, 27 insertions, 3 deletions
diff --git a/padmin/source/helper.cxx b/padmin/source/helper.cxx
index 74ddfde8f0ec..bd56be8c9d95 100644
--- a/padmin/source/helper.cxx
+++ b/padmin/source/helper.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: helper.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: vg $ $Date: 2003-04-15 17:21:43 $
+ * last change: $Author: vg $ $Date: 2003-05-28 12:36:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,7 +104,15 @@
#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
#endif
-
+#ifndef _UNOTOOLS_CONFIGNODE_HXX_
+#include <unotools/confignode.hxx>
+#endif
+#ifndef _VCL_UNOHELP_HXX
+#include <vcl/unohelp.hxx>
+#endif
+#ifndef _ISOLANG_HXX
+#include <tools/isolang.hxx>
+#endif
using namespace osl;
@@ -126,6 +134,22 @@ ResId padmin::PaResId( ULONG nId )
if( ! pPaResMgr )
{
LanguageType nLang = LANGUAGE_SYSTEM;
+
+ utl::OConfigurationNode aNode =
+ utl::OConfigurationTreeRoot::tryCreateWithServiceFactory(
+ vcl::unohelper::GetMultiServiceFactory(),
+ OUString::createFromAscii( "org.openoffice.Setup/L10N" ) );
+ if ( aNode.isValid() )
+ {
+ rtl::OUString aLoc;
+ Any aValue = aNode.getNodeValue( OUString::createFromAscii( "ooLocale" ) );
+ if( aValue >>= aLoc )
+ {
+ LanguageType nTmpLang = ConvertIsoStringToLanguage( aLoc );
+ if( nTmpLang != LANGUAGE_DONTKNOW )
+ nLang = nTmpLang;
+ }
+ }
pPaResMgr = ResMgr::SearchCreateResMgr( "spa" MAKE_NUMSTR(SUPD), nLang );
AllSettings aSettings = Application::GetSettings();
aSettings.SetUILanguage( nLang );