View | Details | Raw Unified | Return to issue 21191
Collapse All | Expand All

(-)xmlhelp/source/treeview/tvread.cxx (+10 lines)
Lines 2-7 Link Here
2
#ifndef _RTL_USTRBUF_HXX_
2
#ifndef _RTL_USTRBUF_HXX_
3
#include <rtl/ustrbuf.hxx>
3
#include <rtl/ustrbuf.hxx>
4
#endif
4
#endif
5
#ifndef _OSL_PROCESS_H
6
#include <osl/process.h>
7
#endif
8
#ifndef _RTL_LOCALE_HXX
9
#include <rtl/locale.hxx>
10
#endif
5
#ifndef _VOS_DIAGNOSE_HXX_
11
#ifndef _VOS_DIAGNOSE_HXX_
6
#include <vos/diagnose.hxx>
12
#include <vos/diagnose.hxx>
7
#endif
13
#endif
Lines 684-690 ConfigData TVChildTarget::init( const Re Link Here
684
	rtl::OUString productVersion( setupversion + 
690
	rtl::OUString productVersion( setupversion + 
685
								  rtl::OUString::createFromAscii( " " ) +
691
								  rtl::OUString::createFromAscii( " " ) +
686
								  setupextension );
692
								  setupextension );
693
#ifdef UNX
694
	rtl::OUString locale = rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName();
695
#else
687
	rtl::OUString locale( getKey( xHierAccess,"L10N/ooLocale" ) );
696
	rtl::OUString locale( getKey( xHierAccess,"L10N/ooLocale" ) );
697
#endif
688
698
689
	
699
	
690
	// Determine fileurl from url and locale
700
	// Determine fileurl from url and locale
(-)desktop/source/app/ssoinit.cxx (+8 lines)
Lines 25-30 Link Here
25
#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
25
#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
26
#include <comphelper/processfactory.hxx>
26
#include <comphelper/processfactory.hxx>
27
#endif
27
#endif
28
#ifndef _RTL_LOCALE_HXX_
29
#include <rtl/locale.hxx>
30
#endif
28
#ifndef _OSL_PROCESS_H_
31
#ifndef _OSL_PROCESS_H_
29
#include <osl/process.h>
32
#include <osl/process.h>
30
#endif
33
#endif
Lines 220-225 void WriteUserNameToINI( const OUString Link Here
220
223
221
LanguageType GetLanguageType( void )
224
LanguageType GetLanguageType( void )
222
{
225
{
226
#ifdef UNX
227
	return ConvertIsoStringToLanguage( 
228
			rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName() );
229
#endif
230
223
	LanguageType						theLanguageType		= LANGUAGE_DONTKNOW;
231
	LanguageType						theLanguageType		= LANGUAGE_DONTKNOW;
224
	try
232
	try
225
	{
233
	{
(-)unotools/source/config/configmgr.cxx (+19 lines)
Lines 89-94 Link Here
89
#ifndef _OSL_DIAGNOSE_H_
89
#ifndef _OSL_DIAGNOSE_H_
90
#include <osl/diagnose.h>
90
#include <osl/diagnose.h>
91
#endif
91
#endif
92
#ifndef _OSL_PROCESS_H_
93
#include <osl/process.h>
94
#endif
95
#ifndef _RTL_LOCALE_HXX_
96
#include <rtl/locale.hxx>
97
#endif
92
98
93
#include <list>
99
#include <list>
94
100
Lines 438-443 Any ConfigManager::GetDirectConfigProper Link Here
438
        aRet <<= aXMLFileFormatVersion;
444
        aRet <<= aXMLFileFormatVersion;
439
        return aRet;
445
        return aRet;
440
    }
446
    }
447
448
#ifdef UNX
449
    if ( eProp == LOCALE )
450
    {
451
			aRet <<= OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName();
452
			return aRet;
453
    }
454
	if ( eProp == DEFAULTCURRENCY )
455
	{
456
			aRet <<= OLocale( osl_getSystemLocale( rtl_LocaleSystemCType ) ).getRawName();
457
			return aRet;
458
	}
459
#endif
441
460
442
	OUString sPath = C2U(cConfigBaseURL);
461
	OUString sPath = C2U(cConfigBaseURL);
443
	switch(eProp)
462
	switch(eProp)
(-)stoc/source/javavm/javavm.cxx (-6 / +16 lines)
Lines 137-142 int main( int argc, char * argv[]) Link Here
137
#include "jvmaccess/virtualmachine.hxx"
137
#include "jvmaccess/virtualmachine.hxx"
138
#include "osl/file.hxx"
138
#include "osl/file.hxx"
139
#include "osl/thread.h"
139
#include "osl/thread.h"
140
#include "osl/process.h"
141
#include "rtl/locale.hxx"
140
#include "rtl/bootstrap.hxx"
142
#include "rtl/bootstrap.hxx"
141
#include "rtl/process.h"
143
#include "rtl/process.h"
142
#include "rtl/string.h"
144
#include "rtl/string.h"
Lines 437-442 void getDefaultLocaleFromConfig(stoc_jav Link Here
437
                                const css::uno::Reference<css::lang::XMultiComponentFactory> & xSMgr,
439
                                const css::uno::Reference<css::lang::XMultiComponentFactory> & xSMgr,
438
                                const css::uno::Reference<css::uno::XComponentContext> &xCtx ) throw(css::uno::Exception)
440
                                const css::uno::Reference<css::uno::XComponentContext> &xCtx ) throw(css::uno::Exception)
439
{
441
{
442
#ifdef UNX
443
	rtl::OUString aLocale = rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName();
444
#else
440
	css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext(
445
	css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext(
441
		rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationRegistry")),
446
		rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationRegistry")),
442
		xCtx );
447
		xCtx );
Lines 450-464 void getDefaultLocaleFromConfig(stoc_jav Link Here
450
455
451
	// read locale
456
	// read locale
452
	css::uno::Reference<css::registry::XRegistryKey> locale = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("L10N/ooLocale")));
457
	css::uno::Reference<css::registry::XRegistryKey> locale = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("L10N/ooLocale")));
453
	if(locale.is() && locale->getStringValue().getLength()) {
458
	rtl::OUString aLocale;
459
460
	if(locale.is() && locale->getStringValue().getLength())
461
		 aLocale = locale->getStringValue();
462
463
	xConfRegistry_simple->close();
464
#endif
465
	if (aLocale.getLength()) {
454
		rtl::OUString language;
466
		rtl::OUString language;
455
		rtl::OUString country;
467
		rtl::OUString country;
456
468
457
		sal_Int32 index = locale->getStringValue().indexOf((sal_Unicode) '-');
469
		sal_Int32 index = aLocale.indexOf((sal_Unicode) '-');
458
470
459
		if(index >= 0) {
471
		if(index >= 0) {
460
			language = locale->getStringValue().copy(0, index);
472
			language = aLocale.copy(0, index);
461
			country = locale->getStringValue().copy(index + 1);
473
			country = aLocale.copy(index + 1);
462
474
463
			if(language.getLength()) {
475
			if(language.getLength()) {
464
				rtl::OUString prop(RTL_CONSTASCII_USTRINGPARAM("user.language="));
476
				rtl::OUString prop(RTL_CONSTASCII_USTRINGPARAM("user.language="));
Lines 475-482 void getDefaultLocaleFromConfig(stoc_jav Link Here
475
			}
487
			}
476
		}
488
		}
477
	}
489
	}
478
479
	xConfRegistry_simple->close();
480
}
490
}
481
491
482
void getJavaPropsFromConfig(stoc_javavm::JVM * pjvm,
492
void getJavaPropsFromConfig(stoc_javavm::JVM * pjvm,
(-)svtools/source/config/helpopt.cxx (+10 lines)
Lines 85-90 Link Here
85
#ifndef _COMPHELPER_STLTYPES_HXX_
85
#ifndef _COMPHELPER_STLTYPES_HXX_
86
#include <comphelper/stl_types.hxx>
86
#include <comphelper/stl_types.hxx>
87
#endif
87
#endif
88
#ifndef _OSL_PROCESS_H_
89
#include <osl/process.h>
90
#endif
91
#ifndef _RTL_LOCALE_HXX_
92
#include <rtl/locale.hxx>
93
#endif
88
94
89
using namespace utl;
95
using namespace utl;
90
using namespace rtl;
96
using namespace rtl;
Lines 249-255 SvtHelpOptions_Impl::SvtHelpOptions_Impl Link Here
249
					switch ( nProp )
255
					switch ( nProp )
250
					{
256
					{
251
						case LOCALE:
257
						case LOCALE:
258
#ifdef UNX
259
							aLocale = rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName();
260
#else
252
							aLocale = aTmpStr;
261
							aLocale = aTmpStr;
262
#endif
253
							break;
263
							break;
254
264
255
						case SYSTEM:
265
						case SYSTEM:
(-)configmgr/source/api2/providerimpl.cxx (+11 lines)
Lines 116-121 Link Here
116
#ifndef _OSL_INTERLOCK_H_
116
#ifndef _OSL_INTERLOCK_H_
117
#include <osl/interlck.h>
117
#include <osl/interlck.h>
118
#endif
118
#endif
119
#ifndef _OSL_PROCESS_H_
120
#include <osl/process.h>
121
#endif
122
#ifndef _RTL_LOCALE_HXX_
123
#include <rtl/locale.hxx>
124
#endif
119
125
120
#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
126
#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
121
#include <com/sun/star/beans/PropertyValue.hpp>
127
#include <com/sun/star/beans/PropertyValue.hpp>
Lines 345-350 namespace configmgr Link Here
345
		// read the default locale for the user		
351
		// read the default locale for the user		
346
        if (!m_aDefaultOptions.hasLocale())
352
        if (!m_aDefaultOptions.hasLocale())
347
        {
353
        {
354
#ifdef UNX
355
			m_aDefaultOptions.setLocale(
356
					rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName() );
357
#else
348
            using configuration::Name;
358
            using configuration::Name;
349
            using configuration::makeNodeName;
359
            using configuration::makeNodeName;
350
            static Name ssSubGroup = makeNodeName(OUString(RTL_CONSTASCII_USTRINGPARAM("L10N")), Name::NoValidate());	
360
            static Name ssSubGroup = makeNodeName(OUString(RTL_CONSTASCII_USTRINGPARAM("L10N")), Name::NoValidate());	
Lines 366-371 namespace configmgr Link Here
366
					    OSL_ENSURE(false, "Could not extract locale parameter into string");
376
					    OSL_ENSURE(false, "Could not extract locale parameter into string");
367
			    }
377
			    }
368
		    }			
378
		    }			
379
#endif
369
        }
380
        }
370
381
371
	// call the template method
382
	// call the template method
(-)linguistic/source/lngopt.cxx (-1 / +6 lines)
Lines 199-205 BOOL LinguOptions::SetValue( Any &rOld, Link Here
199
		case WID_HYPH_MIN_WORD_LENGTH :		pnVal = &pData->nHyphMinWordLength;	break;
199
		case WID_HYPH_MIN_WORD_LENGTH :		pnVal = &pData->nHyphMinWordLength;	break;
200
		case WID_DEFAULT_LOCALE :
200
		case WID_DEFAULT_LOCALE :
201
		{
201
		{
202
			bRes = SetLocale_Impl( pData->nDefaultLanguage, rOld, rVal );
202
			Any newVal = rVal;
203
#if UNX
204
			Locale aLocale = osl_getSystemLocale( rtl_LocaleSystemMessages );
205
			newVal.setValue( &aLocale, ::getCppuType((Locale*)0 ));
206
#endif
207
			bRes = SetLocale_Impl( pData->nDefaultLanguage, rOld, newVal );
203
			break;
208
			break;
204
		}
209
		}
205
		case WID_DEFAULT_LOCALE_CJK :
210
		case WID_DEFAULT_LOCALE_CJK :

Return to issue 21191