]>
Commit | Line | Data |
---|---|---|
9f2b5548 | 1 | Index: xmlhelp/source/treeview/tvread.cxx |
2 | =================================================================== | |
3 | RCS file: /cvs/util/xmlhelp/source/treeview/tvread.cxx,v | |
4 | retrieving revision 1.13 | |
5 | diff -u -p -u -r1.13 tvread.cxx | |
6 | --- xmlhelp/source/treeview/tvread.cxx 8 Nov 2001 16:42:46 -0000 1.13 | |
7 | +++ xmlhelp/source/treeview/tvread.cxx 14 Oct 2003 16:50:52 -0000 | |
8 | @@ -2,6 +2,12 @@ | |
9 | #ifndef _RTL_USTRBUF_HXX_ | |
10 | #include <rtl/ustrbuf.hxx> | |
11 | #endif | |
12 | +#ifndef _OSL_PROCESS_H | |
13 | +#include <osl/process.h> | |
14 | +#endif | |
15 | +#ifndef _RTL_LOCALE_HXX | |
16 | +#include <rtl/locale.hxx> | |
17 | +#endif | |
18 | #ifndef _VOS_DIAGNOSE_HXX_ | |
19 | #include <vos/diagnose.hxx> | |
20 | #endif | |
21 | @@ -684,7 +690,11 @@ ConfigData TVChildTarget::init( const Re | |
22 | rtl::OUString productVersion( setupversion + | |
23 | rtl::OUString::createFromAscii( " " ) + | |
24 | setupextension ); | |
25 | +#ifdef UNX | |
26 | + rtl::OUString locale = rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName(); | |
27 | +#else | |
28 | rtl::OUString locale( getKey( xHierAccess,"L10N/ooLocale" ) ); | |
29 | +#endif | |
30 | ||
31 | ||
32 | // Determine fileurl from url and locale | |
33 | Index: desktop/source/app/ssoinit.cxx | |
34 | =================================================================== | |
35 | RCS file: /cvs/framework/desktop/source/app/ssoinit.cxx,v | |
36 | retrieving revision 1.17 | |
37 | diff -u -p -u -r1.17 ssoinit.cxx | |
38 | --- desktop/source/app/ssoinit.cxx 17 Apr 2003 13:33:29 -0000 1.17 | |
39 | +++ desktop/source/app/ssoinit.cxx 14 Oct 2003 16:55:04 -0000 | |
40 | @@ -25,6 +25,9 @@ | |
41 | #ifndef _COMPHELPER_PROCESSFACTORY_HXX_ | |
42 | #include <comphelper/processfactory.hxx> | |
43 | #endif | |
44 | +#ifndef _RTL_LOCALE_HXX_ | |
45 | +#include <rtl/locale.hxx> | |
46 | +#endif | |
47 | #ifndef _OSL_PROCESS_H_ | |
48 | #include <osl/process.h> | |
49 | #endif | |
50 | @@ -220,6 +223,11 @@ void WriteUserNameToINI( const OUString | |
51 | ||
52 | LanguageType GetLanguageType( void ) | |
53 | { | |
54 | +#ifdef UNX | |
55 | + return ConvertIsoStringToLanguage( | |
56 | + rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName() ); | |
57 | +#endif | |
58 | + | |
59 | LanguageType theLanguageType = LANGUAGE_DONTKNOW; | |
60 | try | |
61 | { | |
62 | Index: unotools/source/config/configmgr.cxx | |
63 | =================================================================== | |
64 | RCS file: /cvs/util/unotools/source/config/configmgr.cxx,v | |
65 | retrieving revision 1.36 | |
66 | diff -u -p -u -r1.36 configmgr.cxx | |
67 | --- unotools/source/config/configmgr.cxx 10 Jun 2003 11:29:10 -0000 1.36 | |
68 | +++ unotools/source/config/configmgr.cxx 14 Oct 2003 16:55:32 -0000 | |
69 | @@ -89,6 +89,12 @@ | |
70 | #ifndef _OSL_DIAGNOSE_H_ | |
71 | #include <osl/diagnose.h> | |
72 | #endif | |
73 | +#ifndef _OSL_PROCESS_H_ | |
74 | +#include <osl/process.h> | |
75 | +#endif | |
76 | +#ifndef _RTL_LOCALE_HXX_ | |
77 | +#include <rtl/locale.hxx> | |
78 | +#endif | |
79 | ||
80 | #include <list> | |
81 | ||
82 | @@ -438,6 +444,19 @@ Any ConfigManager::GetDirectConfigProper | |
83 | aRet <<= aXMLFileFormatVersion; | |
84 | return aRet; | |
85 | } | |
86 | + | |
87 | +#ifdef UNX | |
88 | + if ( eProp == LOCALE ) | |
89 | + { | |
90 | + aRet <<= OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName(); | |
91 | + return aRet; | |
92 | + } | |
93 | + if ( eProp == DEFAULTCURRENCY ) | |
94 | + { | |
95 | + aRet <<= OLocale( osl_getSystemLocale( rtl_LocaleSystemCType ) ).getRawName(); | |
96 | + return aRet; | |
97 | + } | |
98 | +#endif | |
99 | ||
100 | OUString sPath = C2U(cConfigBaseURL); | |
101 | switch(eProp) | |
102 | Index: stoc/source/javavm/javavm.cxx | |
103 | =================================================================== | |
104 | RCS file: /cvs/udk/stoc/source/javavm/javavm.cxx,v | |
105 | retrieving revision 1.59 | |
106 | diff -u -p -u -r1.59 javavm.cxx | |
107 | --- stoc/source/javavm/javavm.cxx 12 Jun 2003 11:08:36 -0000 1.59 | |
108 | +++ stoc/source/javavm/javavm.cxx 14 Oct 2003 16:57:24 -0000 | |
109 | @@ -137,6 +137,8 @@ int main( int argc, char * argv[]) | |
110 | #include "jvmaccess/virtualmachine.hxx" | |
111 | #include "osl/file.hxx" | |
112 | #include "osl/thread.h" | |
113 | +#include "osl/process.h" | |
114 | +#include "rtl/locale.hxx" | |
115 | #include "rtl/bootstrap.hxx" | |
116 | #include "rtl/process.h" | |
117 | #include "rtl/string.h" | |
118 | @@ -437,6 +439,9 @@ void getDefaultLocaleFromConfig(stoc_jav | |
119 | const css::uno::Reference<css::lang::XMultiComponentFactory> & xSMgr, | |
120 | const css::uno::Reference<css::uno::XComponentContext> &xCtx ) throw(css::uno::Exception) | |
121 | { | |
122 | +#ifdef UNX | |
123 | + rtl::OUString aLocale = rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName(); | |
124 | +#else | |
125 | css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext( | |
126 | rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationRegistry")), | |
127 | xCtx ); | |
128 | @@ -450,15 +455,22 @@ void getDefaultLocaleFromConfig(stoc_jav | |
129 | ||
130 | // read locale | |
131 | css::uno::Reference<css::registry::XRegistryKey> locale = xRegistryRootKey->openKey(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("L10N/ooLocale"))); | |
132 | - if(locale.is() && locale->getStringValue().getLength()) { | |
133 | + rtl::OUString aLocale; | |
134 | + | |
135 | + if(locale.is() && locale->getStringValue().getLength()) | |
136 | + aLocale = locale->getStringValue(); | |
137 | + | |
138 | + xConfRegistry_simple->close(); | |
139 | +#endif | |
140 | + if (aLocale.getLength()) { | |
141 | rtl::OUString language; | |
142 | rtl::OUString country; | |
143 | ||
144 | - sal_Int32 index = locale->getStringValue().indexOf((sal_Unicode) '-'); | |
145 | + sal_Int32 index = aLocale.indexOf((sal_Unicode) '-'); | |
146 | ||
147 | if(index >= 0) { | |
148 | - language = locale->getStringValue().copy(0, index); | |
149 | - country = locale->getStringValue().copy(index + 1); | |
150 | + language = aLocale.copy(0, index); | |
151 | + country = aLocale.copy(index + 1); | |
152 | ||
153 | if(language.getLength()) { | |
154 | rtl::OUString prop(RTL_CONSTASCII_USTRINGPARAM("user.language=")); | |
155 | @@ -475,8 +487,6 @@ void getDefaultLocaleFromConfig(stoc_jav | |
156 | } | |
157 | } | |
158 | } | |
159 | - | |
160 | - xConfRegistry_simple->close(); | |
161 | } | |
162 | ||
163 | void getJavaPropsFromConfig(stoc_javavm::JVM * pjvm, | |
164 | Index: svtools/source/config/helpopt.cxx | |
165 | =================================================================== | |
166 | RCS file: /cvs/util/svtools/source/config/helpopt.cxx,v | |
167 | retrieving revision 1.12 | |
168 | diff -u -p -u -r1.12 helpopt.cxx | |
169 | --- svtools/source/config/helpopt.cxx 27 May 2002 08:44:47 -0000 1.12 | |
170 | +++ svtools/source/config/helpopt.cxx 14 Oct 2003 17:00:10 -0000 | |
171 | @@ -85,6 +85,12 @@ | |
172 | #ifndef _COMPHELPER_STLTYPES_HXX_ | |
173 | #include <comphelper/stl_types.hxx> | |
174 | #endif | |
175 | +#ifndef _OSL_PROCESS_H_ | |
176 | +#include <osl/process.h> | |
177 | +#endif | |
178 | +#ifndef _RTL_LOCALE_HXX_ | |
179 | +#include <rtl/locale.hxx> | |
180 | +#endif | |
181 | ||
182 | using namespace utl; | |
183 | using namespace rtl; | |
184 | @@ -249,7 +255,11 @@ SvtHelpOptions_Impl::SvtHelpOptions_Impl | |
185 | switch ( nProp ) | |
186 | { | |
187 | case LOCALE: | |
188 | +#ifdef UNX | |
189 | + aLocale = rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName(); | |
190 | +#else | |
191 | aLocale = aTmpStr; | |
192 | +#endif | |
193 | break; | |
194 | ||
195 | case SYSTEM: | |
196 | Index: configmgr/source/api2/providerimpl.cxx | |
197 | =================================================================== | |
198 | RCS file: /cvs/util/configmgr/source/api2/providerimpl.cxx,v | |
199 | retrieving revision 1.56 | |
200 | diff -u -p -u -r1.56 providerimpl.cxx | |
201 | --- configmgr/source/api2/providerimpl.cxx 19 Mar 2003 16:18:36 -0000 1.56 | |
202 | +++ configmgr/source/api2/providerimpl.cxx 14 Oct 2003 17:01:40 -0000 | |
203 | @@ -116,6 +116,12 @@ | |
204 | #ifndef _OSL_INTERLOCK_H_ | |
205 | #include <osl/interlck.h> | |
206 | #endif | |
207 | +#ifndef _OSL_PROCESS_H_ | |
208 | +#include <osl/process.h> | |
209 | +#endif | |
210 | +#ifndef _RTL_LOCALE_HXX_ | |
211 | +#include <rtl/locale.hxx> | |
212 | +#endif | |
213 | ||
214 | #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ | |
215 | #include <com/sun/star/beans/PropertyValue.hpp> | |
216 | @@ -345,6 +351,10 @@ namespace configmgr | |
217 | // read the default locale for the user | |
218 | if (!m_aDefaultOptions.hasLocale()) | |
219 | { | |
220 | +#ifdef UNX | |
221 | + m_aDefaultOptions.setLocale( | |
222 | + rtl::OLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ).getRawName() ); | |
223 | +#else | |
224 | using configuration::Name; | |
225 | using configuration::makeNodeName; | |
226 | static Name ssSubGroup = makeNodeName(OUString(RTL_CONSTASCII_USTRINGPARAM("L10N")), Name::NoValidate()); | |
227 | @@ -366,6 +376,7 @@ namespace configmgr | |
228 | OSL_ENSURE(false, "Could not extract locale parameter into string"); | |
229 | } | |
230 | } | |
231 | +#endif | |
232 | } | |
233 | ||
234 | // call the template method | |
235 | Index: linguistic/source/lngopt.cxx | |
236 | =================================================================== | |
237 | RCS file: /cvs/sw/linguistic/source/lngopt.cxx,v | |
238 | retrieving revision 1.11 | |
239 | diff -u -p -u -r1.11 lngopt.cxx | |
240 | --- linguistic/source/lngopt.cxx 25 Jul 2001 10:09:06 -0000 1.11 | |
241 | +++ linguistic/source/lngopt.cxx 14 Oct 2003 17:04:02 -0000 | |
242 | @@ -82,6 +82,12 @@ | |
243 | #ifndef _SV_SYSTEM_HXX | |
244 | #include <vcl/system.hxx> | |
245 | #endif | |
246 | +#ifndef _OSL_PROCESS_H_ | |
247 | +#include <osl/process.h> | |
248 | +#endif | |
249 | +#ifndef _RTL_LOCALE_HXX_ | |
250 | +#include <rtl/locale.hxx> | |
251 | +#endif | |
252 | ||
253 | #include <uno/lbnames.h> // CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type | |
254 | #include <cppuhelper/implbase1.hxx> // helper for implementations | |
255 | @@ -199,7 +199,13 @@ BOOL LinguOptions::SetValue( Any &rOld, | |
256 | case WID_HYPH_MIN_WORD_LENGTH : pnVal = &pData->nHyphMinWordLength; break; | |
257 | case WID_DEFAULT_LOCALE : | |
258 | { | |
259 | - bRes = SetLocale_Impl( pData->nDefaultLanguage, rOld, rVal ); | |
260 | + Any newVal = rVal; | |
261 | +#if UNX | |
262 | + rtl::OLocale aOLocale( osl_getSystemLocale( rtl_LocaleSystemMessages ) ); | |
263 | + Locale aLocale( aOLocale.getLanguage(), aOLocale.getCountry(), OUString() ); | |
264 | + newVal.setValue( &aLocale, ::getCppuType((Locale*)0 )); | |
265 | +#endif | |
266 | + bRes = SetLocale_Impl( pData->nDefaultLanguage, rOld, newVal ); | |
267 | break; | |
268 | } | |
269 | case WID_DEFAULT_LOCALE_CJK : |