Index: xmlhelp/source/treeview/tvread.cxx =================================================================== RCS file: /cvs/util/xmlhelp/source/treeview/tvread.cxx,v retrieving revision 1.13 diff -u -p -u -r1.13 tvread.cxx --- xmlhelp/source/treeview/tvread.cxx 8 Nov 2001 16:42:46 -0000 1.13 +++ xmlhelp/source/treeview/tvread.cxx 14 Oct 2003 16:50:52 -0000 @@ -2,6 +2,12 @@ #ifndef _RTL_USTRBUF_HXX_ #include #endif +#ifndef _OSL_PROCESS_H +#include +#endif +#ifndef _RTL_LOCALE_HXX +#include +#endif #ifndef _VOS_DIAGNOSE_HXX_ #include #endif @@ -684,7 +690,11 @@ ConfigData TVChildTarget::init( const Re rtl::OUString productVersion( setupversion + rtl::OUString::createFromAscii( " " ) + setupextension ); +#ifdef UNX + rtl::OUString locale = rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName(); +#else rtl::OUString locale( getKey( xHierAccess,"L10N/ooLocale" ) ); +#endif // Determine fileurl from url and locale Index: desktop/source/app/ssoinit.cxx =================================================================== RCS file: /cvs/framework/desktop/source/app/ssoinit.cxx,v retrieving revision 1.17 diff -u -p -u -r1.17 ssoinit.cxx --- desktop/source/app/ssoinit.cxx 17 Apr 2003 13:33:29 -0000 1.17 +++ desktop/source/app/ssoinit.cxx 14 Oct 2003 16:55:04 -0000 @@ -25,6 +25,9 @@ #ifndef _COMPHELPER_PROCESSFACTORY_HXX_ #include #endif +#ifndef _RTL_LOCALE_HXX_ +#include +#endif #ifndef _OSL_PROCESS_H_ #include #endif @@ -220,6 +223,11 @@ void WriteUserNameToINI( const OUString LanguageType GetLanguageType( void ) { +#ifdef UNX + return ConvertIsoStringToLanguage( + rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName() ); +#endif + LanguageType theLanguageType = LANGUAGE_DONTKNOW; try { Index: unotools/source/config/configmgr.cxx =================================================================== RCS file: /cvs/util/unotools/source/config/configmgr.cxx,v retrieving revision 1.36 diff -u -p -u -r1.36 configmgr.cxx --- unotools/source/config/configmgr.cxx 10 Jun 2003 11:29:10 -0000 1.36 +++ unotools/source/config/configmgr.cxx 14 Oct 2003 16:55:32 -0000 @@ -89,6 +89,12 @@ #ifndef _OSL_DIAGNOSE_H_ #include #endif +#ifndef _OSL_PROCESS_H_ +#include +#endif +#ifndef _RTL_LOCALE_HXX_ +#include +#endif #include @@ -438,6 +444,19 @@ Any ConfigManager::GetDirectConfigProper aRet <<= aXMLFileFormatVersion; return aRet; } + +#ifdef UNX + if ( eProp == LOCALE ) + { + aRet <<= OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName(); + return aRet; + } + if ( eProp == DEFAULTCURRENCY ) + { + aRet <<= OLocale( osl_getSystemLocale( rtl_LocaleSystemCType ) ).getRawName(); + return aRet; + } +#endif OUString sPath = C2U(cConfigBaseURL); switch(eProp) Index: stoc/source/javavm/javavm.cxx =================================================================== RCS file: /cvs/udk/stoc/source/javavm/javavm.cxx,v retrieving revision 1.59 diff -u -p -u -r1.59 javavm.cxx --- stoc/source/javavm/javavm.cxx 12 Jun 2003 11:08:36 -0000 1.59 +++ stoc/source/javavm/javavm.cxx 14 Oct 2003 16:57:24 -0000 @@ -137,6 +137,8 @@ int main( int argc, char * argv[]) #include "jvmaccess/virtualmachine.hxx" #include "osl/file.hxx" #include "osl/thread.h" +#include "osl/process.h" +#include "rtl/locale.hxx" #include "rtl/bootstrap.hxx" #include "rtl/process.h" #include "rtl/string.h" @@ -437,6 +439,9 @@ void getDefaultLocaleFromConfig(stoc_jav const css::uno::Reference & xSMgr, const css::uno::Reference &xCtx ) throw(css::uno::Exception) { +#ifdef UNX + rtl::OUString aLocale = rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName(); +#else css::uno::Reference xConfRegistry = xSMgr->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationRegistry")), xCtx ); @@ -450,15 +455,22 @@ void getDefaultLocaleFromConfig(stoc_jav // read locale css::uno::Reference locale = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("L10N/ooLocale"))); - if(locale.is() && locale->getStringValue().getLength()) { + rtl::OUString aLocale; + + if(locale.is() && locale->getStringValue().getLength()) + aLocale = locale->getStringValue(); + + xConfRegistry_simple->close(); +#endif + if (aLocale.getLength()) { rtl::OUString language; rtl::OUString country; - sal_Int32 index = locale->getStringValue().indexOf((sal_Unicode) '-'); + sal_Int32 index = aLocale.indexOf((sal_Unicode) '-'); if(index >= 0) { - language = locale->getStringValue().copy(0, index); - country = locale->getStringValue().copy(index + 1); + language = aLocale.copy(0, index); + country = aLocale.copy(index + 1); if(language.getLength()) { rtl::OUString prop(RTL_CONSTASCII_USTRINGPARAM("user.language=")); @@ -475,8 +487,6 @@ void getDefaultLocaleFromConfig(stoc_jav } } } - - xConfRegistry_simple->close(); } void getJavaPropsFromConfig(stoc_javavm::JVM * pjvm, Index: svtools/source/config/helpopt.cxx =================================================================== RCS file: /cvs/util/svtools/source/config/helpopt.cxx,v retrieving revision 1.12 diff -u -p -u -r1.12 helpopt.cxx --- svtools/source/config/helpopt.cxx 27 May 2002 08:44:47 -0000 1.12 +++ svtools/source/config/helpopt.cxx 14 Oct 2003 17:00:10 -0000 @@ -85,6 +85,12 @@ #ifndef _COMPHELPER_STLTYPES_HXX_ #include #endif +#ifndef _OSL_PROCESS_H_ +#include +#endif +#ifndef _RTL_LOCALE_HXX_ +#include +#endif using namespace utl; using namespace rtl; @@ -249,7 +255,11 @@ SvtHelpOptions_Impl::SvtHelpOptions_Impl switch ( nProp ) { case LOCALE: +#ifdef UNX + aLocale = rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName(); +#else aLocale = aTmpStr; +#endif break; case SYSTEM: Index: configmgr/source/api2/providerimpl.cxx =================================================================== RCS file: /cvs/util/configmgr/source/api2/providerimpl.cxx,v retrieving revision 1.56 diff -u -p -u -r1.56 providerimpl.cxx --- configmgr/source/api2/providerimpl.cxx 19 Mar 2003 16:18:36 -0000 1.56 +++ configmgr/source/api2/providerimpl.cxx 14 Oct 2003 17:01:40 -0000 @@ -116,6 +116,12 @@ #ifndef _OSL_INTERLOCK_H_ #include #endif +#ifndef _OSL_PROCESS_H_ +#include +#endif +#ifndef _RTL_LOCALE_HXX_ +#include +#endif #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ #include @@ -345,6 +351,10 @@ namespace configmgr // read the default locale for the user if (!m_aDefaultOptions.hasLocale()) { +#ifdef UNX + m_aDefaultOptions.setLocale( + rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName() ); +#else using configuration::Name; using configuration::makeNodeName; static Name ssSubGroup = makeNodeName(OUString(RTL_CONSTASCII_USTRINGPARAM("L10N")), Name::NoValidate()); @@ -366,6 +376,7 @@ namespace configmgr OSL_ENSURE(false, "Could not extract locale parameter into string"); } } +#endif } // call the template method Index: linguistic/source/lngopt.cxx =================================================================== RCS file: /cvs/sw/linguistic/source/lngopt.cxx,v retrieving revision 1.11 diff -u -p -u -r1.11 lngopt.cxx --- linguistic/source/lngopt.cxx 25 Jul 2001 10:09:06 -0000 1.11 +++ linguistic/source/lngopt.cxx 14 Oct 2003 17:04:02 -0000 @@ -82,6 +82,12 @@ #ifndef _SV_SYSTEM_HXX #include #endif +#ifndef _OSL_PROCESS_H_ +#include +#endif +#ifndef _RTL_LOCALE_HXX_ +#include +#endif #include // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type #include // helper for implementations @@ -199,7 +199,13 @@ BOOL LinguOptions::SetValue( Any &rOld, case WID_HYPH_MIN_WORD_LENGTH : pnVal = &pData->nHyphMinWordLength; break; case WID_DEFAULT_LOCALE : { - bRes = SetLocale_Impl( pData->nDefaultLanguage, rOld, rVal ); + Any newVal = rVal; +#if UNX + rtl::OLocale aOLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ); + Locale aLocale( aOLocale.getLanguage(), aOLocale.getCountry(), OUString() ); + newVal.setValue( &aLocale, ::getCppuType((Locale*)0 )); +#endif + bRes = SetLocale_Impl( pData->nDefaultLanguage, rOld, newVal ); break; } case WID_DEFAULT_LOCALE_CJK :