1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <com/sun/star/uno/Sequence.hxx>
21 #include <rtl/ustrbuf.hxx>
22 #include <rtl/instance.hxx>
23 #include <rtl/logfile.hxx>
24 #include <i18nlangtag/mslangid.hxx>
25 #include <i18nlangtag/languagetag.hxx>
26 #include <tools/string.hxx>
27 #include <tools/debug.hxx>
28 #include <unotools/syslocaleoptions.hxx>
29 #include <unotools/configmgr.hxx>
30 #include <unotools/configitem.hxx>
31 #include <com/sun/star/uno/Any.hxx>
33 #include "itemholder1.hxx"
35 #define CFG_READONLY_DEFAULT sal_False
39 using namespace com::sun::star::uno
;
40 using namespace com::sun::star::lang
;
43 SvtSysLocaleOptions_Impl
* SvtSysLocaleOptions::pOptions
= NULL
;
44 sal_Int32
SvtSysLocaleOptions::nRefCount
= 0;
47 struct CurrencyChangeLink
48 : public rtl::Static
<Link
, CurrencyChangeLink
> {};
51 class SvtSysLocaleOptions_Impl
: public utl::ConfigItem
53 LanguageTag m_aRealLocale
;
54 LanguageTag m_aRealUILocale
;
55 OUString m_aLocaleString
; // en-US or de-DE or empty for SYSTEM
56 OUString m_aUILocaleString
; // en-US or de-DE or empty for SYSTEM
57 OUString m_aCurrencyString
; // USD-en-US or EUR-de-DE
58 OUString m_aDatePatternsString
; // "Y-M-D;M-D"
59 sal_Bool m_bDecimalSeparator
; //use decimal separator same as locale
60 sal_Bool m_bIgnoreLanguageChange
; //OS language change doesn't affect LO document language
63 sal_Bool m_bROUILocale
;
64 sal_Bool m_bROCurrency
;
65 sal_Bool m_bRODatePatterns
;
66 sal_Bool m_bRODecimalSeparator
;
67 sal_Bool m_bROIgnoreLanguageChange
;
69 static const Sequence
< /* const */ OUString
> GetPropertyNames();
70 void MakeRealLocale();
71 void MakeRealUILocale();
74 SvtSysLocaleOptions_Impl();
75 virtual ~SvtSysLocaleOptions_Impl();
77 virtual void Notify( const com::sun::star::uno::Sequence
< OUString
>& aPropertyNames
);
78 virtual void Commit();
80 const OUString
& GetLocaleString() const
81 { return m_aLocaleString
; }
82 void SetLocaleString( const OUString
& rStr
);
84 const OUString
& GetUILocaleString() const
85 { return m_aUILocaleString
; }
86 void SetUILocaleString( const OUString
& rStr
);
88 const OUString
& GetCurrencyString() const
89 { return m_aCurrencyString
; }
90 void SetCurrencyString( const OUString
& rStr
);
92 const OUString
& GetDatePatternsString() const
93 { return m_aDatePatternsString
; }
94 void SetDatePatternsString( const OUString
& rStr
);
96 sal_Bool
IsDecimalSeparatorAsLocale() const { return m_bDecimalSeparator
;}
97 void SetDecimalSeparatorAsLocale( sal_Bool bSet
);
99 sal_Bool
IsIgnoreLanguageChange() const { return m_bIgnoreLanguageChange
;}
100 void SetIgnoreLanguageChange( sal_Bool bSet
);
102 sal_Bool
IsReadOnly( SvtSysLocaleOptions::EOption eOption
) const;
103 const LanguageTag
& GetRealLocale() { return m_aRealLocale
; }
104 const LanguageTag
& GetRealUILocale() { return m_aRealUILocale
; }
108 #define ROOTNODE_SYSLOCALE OUString("Setup/L10N")
110 #define PROPERTYNAME_LOCALE OUString("ooSetupSystemLocale")
111 #define PROPERTYNAME_UILOCALE OUString("ooLocale")
112 #define PROPERTYNAME_CURRENCY OUString("ooSetupCurrency")
113 #define PROPERTYNAME_DECIMALSEPARATOR OUString("DecimalSeparatorAsLocale")
114 #define PROPERTYNAME_DATEPATTERNS OUString("DateAcceptancePatterns")
115 #define PROPERTYNAME_IGNORELANGCHANGE OUString("IgnoreLanguageChange")
117 #define PROPERTYHANDLE_LOCALE 0
118 #define PROPERTYHANDLE_UILOCALE 1
119 #define PROPERTYHANDLE_CURRENCY 2
120 #define PROPERTYHANDLE_DECIMALSEPARATOR 3
121 #define PROPERTYHANDLE_DATEPATTERNS 4
122 #define PROPERTYHANDLE_IGNORELANGCHANGE 5
124 //#define PROPERTYCOUNT 5
125 #define PROPERTYCOUNT 6
127 const Sequence
< OUString
> SvtSysLocaleOptions_Impl::GetPropertyNames()
129 const OUString pProperties
[] =
132 PROPERTYNAME_UILOCALE
,
133 PROPERTYNAME_CURRENCY
,
134 PROPERTYNAME_DECIMALSEPARATOR
,
135 PROPERTYNAME_DATEPATTERNS
,
136 PROPERTYNAME_IGNORELANGCHANGE
138 const Sequence
< OUString
> seqPropertyNames( pProperties
, PROPERTYCOUNT
);
139 return seqPropertyNames
;
142 // -----------------------------------------------------------------------
144 SvtSysLocaleOptions_Impl::SvtSysLocaleOptions_Impl()
145 : ConfigItem( ROOTNODE_SYSLOCALE
)
146 , m_aRealLocale( LANGUAGE_SYSTEM
)
147 , m_aRealUILocale( LANGUAGE_SYSTEM
)
148 , m_bDecimalSeparator( sal_True
)
149 , m_bROLocale(CFG_READONLY_DEFAULT
)
150 , m_bROUILocale(CFG_READONLY_DEFAULT
)
151 , m_bROCurrency(CFG_READONLY_DEFAULT
)
152 , m_bRODatePatterns(CFG_READONLY_DEFAULT
)
153 , m_bRODecimalSeparator(sal_False
)
154 , m_bROIgnoreLanguageChange(sal_False
)
157 if ( IsValidConfigMgr() )
159 const Sequence
< OUString
> aNames
= GetPropertyNames();
160 Sequence
< Any
> aValues
= GetProperties( aNames
);
161 Sequence
< sal_Bool
> aROStates
= GetReadOnlyStates( aNames
);
162 const Any
* pValues
= aValues
.getConstArray();
163 const sal_Bool
* pROStates
= aROStates
.getConstArray();
164 DBG_ASSERT( aValues
.getLength() == aNames
.getLength(), "GetProperties failed" );
165 DBG_ASSERT( aROStates
.getLength() == aNames
.getLength(), "GetReadOnlyStates failed" );
166 if ( aValues
.getLength() == aNames
.getLength() && aROStates
.getLength() == aNames
.getLength() )
168 for ( sal_Int32 nProp
= 0; nProp
< aNames
.getLength(); nProp
++ )
170 if ( pValues
[nProp
].hasValue() )
174 case PROPERTYHANDLE_LOCALE
:
177 if ( pValues
[nProp
] >>= aStr
)
178 m_aLocaleString
= aStr
;
181 SAL_WARN( "unotools.config", "Wrong property type!" );
183 m_bROLocale
= pROStates
[nProp
];
186 case PROPERTYHANDLE_UILOCALE
:
189 if ( pValues
[nProp
] >>= aStr
)
190 m_aUILocaleString
= aStr
;
193 SAL_WARN( "unotools.config", "Wrong property type!" );
195 m_bROUILocale
= pROStates
[nProp
];
198 case PROPERTYHANDLE_CURRENCY
:
201 if ( pValues
[nProp
] >>= aStr
)
202 m_aCurrencyString
= aStr
;
205 SAL_WARN( "unotools.config", "Wrong property type!" );
207 m_bROCurrency
= pROStates
[nProp
];
210 case PROPERTYHANDLE_DECIMALSEPARATOR
:
212 sal_Bool bValue
= sal_Bool();
213 if ( pValues
[nProp
] >>= bValue
)
214 m_bDecimalSeparator
= bValue
;
217 SAL_WARN( "unotools.config", "Wrong property type!" );
219 m_bRODecimalSeparator
= pROStates
[nProp
];
222 case PROPERTYHANDLE_DATEPATTERNS
:
225 if ( pValues
[nProp
] >>= aStr
)
226 m_aDatePatternsString
= aStr
;
229 SAL_WARN( "unotools.config", "Wrong property type!" );
231 m_bRODatePatterns
= pROStates
[nProp
];
234 case PROPERTYHANDLE_IGNORELANGCHANGE
:
236 sal_Bool bValue
= sal_Bool();
237 if ( pValues
[nProp
] >>= bValue
)
238 m_bIgnoreLanguageChange
= bValue
;
241 SAL_WARN( "unotools.config", "Wrong property type!" );
243 m_bROIgnoreLanguageChange
= pROStates
[nProp
];
247 SAL_WARN( "unotools.config", "Wrong property type!" );
252 EnableNotification( aNames
);
260 SvtSysLocaleOptions_Impl::~SvtSysLocaleOptions_Impl()
266 void SvtSysLocaleOptions_Impl::MakeRealLocale()
268 if (m_aLocaleString
.isEmpty())
270 LanguageType nLang
= MsLangId::getSystemLanguage();
271 m_aRealLocale
.reset( nLang
);
275 m_aRealLocale
.reset( m_aLocaleString
);
279 void SvtSysLocaleOptions_Impl::MakeRealUILocale()
281 if (m_aUILocaleString
.isEmpty())
283 LanguageType nLang
= MsLangId::getSystemUILanguage();
284 m_aRealUILocale
.reset( nLang
);
288 m_aRealUILocale
.reset( m_aUILocaleString
);
292 sal_Bool
SvtSysLocaleOptions_Impl::IsReadOnly( SvtSysLocaleOptions::EOption eOption
) const
294 sal_Bool bReadOnly
= CFG_READONLY_DEFAULT
;
297 case SvtSysLocaleOptions::E_LOCALE
:
299 bReadOnly
= m_bROLocale
;
302 case SvtSysLocaleOptions::E_UILOCALE
:
304 bReadOnly
= m_bROUILocale
;
307 case SvtSysLocaleOptions::E_CURRENCY
:
309 bReadOnly
= m_bROCurrency
;
312 case SvtSysLocaleOptions::E_DATEPATTERNS
:
314 bReadOnly
= m_bRODatePatterns
;
322 void SvtSysLocaleOptions_Impl::Commit()
324 const Sequence
< OUString
> aOrgNames
= GetPropertyNames();
325 sal_Int32 nOrgCount
= aOrgNames
.getLength();
327 Sequence
< OUString
> aNames( nOrgCount
);
328 Sequence
< Any
> aValues( nOrgCount
);
330 OUString
* pNames
= aNames
.getArray();
331 Any
* pValues
= aValues
.getArray();
332 sal_Int32 nRealCount
= 0;
334 for ( sal_Int32 nProp
= 0; nProp
< nOrgCount
; nProp
++ )
338 case PROPERTYHANDLE_LOCALE
:
342 pNames
[nRealCount
] = aOrgNames
[nProp
];
343 pValues
[nRealCount
] <<= m_aLocaleString
;
348 case PROPERTYHANDLE_UILOCALE
:
352 pNames
[nRealCount
] = aOrgNames
[nProp
];
353 pValues
[nRealCount
] <<= m_aUILocaleString
;
358 case PROPERTYHANDLE_CURRENCY
:
362 pNames
[nRealCount
] = aOrgNames
[nProp
];
363 pValues
[nRealCount
] <<= m_aCurrencyString
;
368 case PROPERTYHANDLE_DECIMALSEPARATOR
:
369 if( !m_bRODecimalSeparator
)
371 pNames
[nRealCount
] = aOrgNames
[nProp
];
372 pValues
[nRealCount
] <<= m_bDecimalSeparator
;
376 case PROPERTYHANDLE_DATEPATTERNS
:
377 if (!m_bRODatePatterns
)
379 pNames
[nRealCount
] = aOrgNames
[nProp
];
380 pValues
[nRealCount
] <<= m_aDatePatternsString
;
384 case PROPERTYHANDLE_IGNORELANGCHANGE
:
385 if (!m_bROIgnoreLanguageChange
)
387 pNames
[nRealCount
] = aOrgNames
[nProp
];
388 pValues
[nRealCount
] <<= m_bIgnoreLanguageChange
;
393 SAL_WARN( "unotools.config", "invalid index to save a path" );
396 aNames
.realloc(nRealCount
);
397 aValues
.realloc(nRealCount
);
398 PutProperties( aNames
, aValues
);
403 void SvtSysLocaleOptions_Impl::SetLocaleString( const OUString
& rStr
)
405 if (!m_bROLocale
&& rStr
!= m_aLocaleString
)
407 m_aLocaleString
= rStr
;
409 MsLangId::setConfiguredSystemLanguage( m_aRealLocale
.getLanguageType() );
411 sal_uLong nHint
= SYSLOCALEOPTIONS_HINT_LOCALE
;
412 if ( m_aCurrencyString
.isEmpty() )
413 nHint
|= SYSLOCALEOPTIONS_HINT_CURRENCY
;
414 NotifyListeners( nHint
);
418 void SvtSysLocaleOptions_Impl::SetUILocaleString( const OUString
& rStr
)
420 if (!m_bROUILocale
&& rStr
!= m_aUILocaleString
)
422 m_aUILocaleString
= rStr
;
424 // as we can't switch UILocale at runtime, we only store changes in the configuration
426 MsLangId::setConfiguredSystemLanguage( m_aRealUILocale
.getLanguageType() );
428 NotifyListeners( SYSLOCALEOPTIONS_HINT_UILOCALE
);
432 void SvtSysLocaleOptions_Impl::SetCurrencyString( const OUString
& rStr
)
434 if (!m_bROCurrency
&& rStr
!= m_aCurrencyString
)
436 m_aCurrencyString
= rStr
;
438 NotifyListeners( SYSLOCALEOPTIONS_HINT_CURRENCY
);
442 void SvtSysLocaleOptions_Impl::SetDatePatternsString( const OUString
& rStr
)
444 if (!m_bRODatePatterns
&& rStr
!= m_aDatePatternsString
)
446 m_aDatePatternsString
= rStr
;
448 NotifyListeners( SYSLOCALEOPTIONS_HINT_DATEPATTERNS
);
452 void SvtSysLocaleOptions_Impl::SetDecimalSeparatorAsLocale( sal_Bool bSet
)
454 if(bSet
!= m_bDecimalSeparator
)
456 m_bDecimalSeparator
= bSet
;
458 NotifyListeners( SYSLOCALEOPTIONS_HINT_DECSEP
);
462 void SvtSysLocaleOptions_Impl::SetIgnoreLanguageChange( sal_Bool bSet
)
464 if(bSet
!= m_bIgnoreLanguageChange
)
466 m_bIgnoreLanguageChange
= bSet
;
468 NotifyListeners( SYSLOCALEOPTIONS_HINT_IGNORELANG
);
472 void SvtSysLocaleOptions_Impl::Notify( const Sequence
< OUString
>& seqPropertyNames
)
475 Sequence
< Any
> seqValues
= GetProperties( seqPropertyNames
);
476 Sequence
< sal_Bool
> seqROStates
= GetReadOnlyStates( seqPropertyNames
);
477 sal_Int32 nCount
= seqPropertyNames
.getLength();
478 for( sal_Int32 nProp
= 0; nProp
< nCount
; ++nProp
)
480 if( seqPropertyNames
[nProp
] == PROPERTYNAME_LOCALE
)
482 DBG_ASSERT( seqValues
[nProp
].getValueTypeClass() == TypeClass_STRING
, "Locale property type" );
483 seqValues
[nProp
] >>= m_aLocaleString
;
484 m_bROLocale
= seqROStates
[nProp
];
485 nHint
|= SYSLOCALEOPTIONS_HINT_LOCALE
;
486 if ( m_aCurrencyString
.isEmpty() )
487 nHint
|= SYSLOCALEOPTIONS_HINT_CURRENCY
;
490 if( seqPropertyNames
[nProp
] == PROPERTYNAME_UILOCALE
)
492 DBG_ASSERT( seqValues
[nProp
].getValueTypeClass() == TypeClass_STRING
, "Locale property type" );
493 seqValues
[nProp
] >>= m_aUILocaleString
;
494 m_bROUILocale
= seqROStates
[nProp
];
495 nHint
|= SYSLOCALEOPTIONS_HINT_UILOCALE
;
498 else if( seqPropertyNames
[nProp
] == PROPERTYNAME_CURRENCY
)
500 DBG_ASSERT( seqValues
[nProp
].getValueTypeClass() == TypeClass_STRING
, "Currency property type" );
501 seqValues
[nProp
] >>= m_aCurrencyString
;
502 m_bROCurrency
= seqROStates
[nProp
];
503 nHint
|= SYSLOCALEOPTIONS_HINT_CURRENCY
;
505 else if( seqPropertyNames
[nProp
] == PROPERTYNAME_DECIMALSEPARATOR
)
507 seqValues
[nProp
] >>= m_bDecimalSeparator
;
508 m_bRODecimalSeparator
= seqROStates
[nProp
];
510 else if( seqPropertyNames
[nProp
] == PROPERTYNAME_IGNORELANGCHANGE
)
512 seqValues
[nProp
] >>= m_bIgnoreLanguageChange
;
513 m_bROIgnoreLanguageChange
= seqROStates
[nProp
];
515 else if( seqPropertyNames
[nProp
] == PROPERTYNAME_DATEPATTERNS
)
517 DBG_ASSERT( seqValues
[nProp
].getValueTypeClass() == TypeClass_STRING
, "DatePatterns property type" );
518 seqValues
[nProp
] >>= m_aDatePatternsString
;
519 m_bRODatePatterns
= seqROStates
[nProp
];
520 nHint
|= SYSLOCALEOPTIONS_HINT_DATEPATTERNS
;
524 NotifyListeners( nHint
);
527 // ====================================================================
529 SvtSysLocaleOptions::SvtSysLocaleOptions()
531 MutexGuard
aGuard( GetMutex() );
534 RTL_LOGFILE_CONTEXT(aLog
, "svl ( ??? ) ::SvtSysLocaleOptions_Impl::ctor()");
535 pOptions
= new SvtSysLocaleOptions_Impl
;
537 ItemHolder1::holdConfigItem(E_SYSLOCALEOPTIONS
);
540 pOptions
->AddListener(this);
544 SvtSysLocaleOptions::~SvtSysLocaleOptions()
546 MutexGuard
aGuard( GetMutex() );
547 pOptions
->RemoveListener(this);
557 Mutex
& SvtSysLocaleOptions::GetMutex()
559 static Mutex
* pMutex
= NULL
;
562 MutexGuard
aGuard( Mutex::getGlobalMutex() );
565 // #i77768# Due to a static reference in the toolkit lib
566 // we need a mutex that lives longer than the svl library.
567 // Otherwise the dtor would use a destructed mutex!!
575 sal_Bool
SvtSysLocaleOptions::IsModified()
577 MutexGuard
aGuard( GetMutex() );
578 return pOptions
->IsModified();
582 void SvtSysLocaleOptions::Commit()
584 MutexGuard
aGuard( GetMutex() );
589 void SvtSysLocaleOptions::BlockBroadcasts( bool bBlock
)
591 MutexGuard
aGuard( GetMutex() );
592 pOptions
->BlockBroadcasts( bBlock
);
596 const OUString
& SvtSysLocaleOptions::GetLocaleConfigString() const
598 MutexGuard
aGuard( GetMutex() );
599 return pOptions
->GetLocaleString();
602 void SvtSysLocaleOptions::SetLocaleConfigString( const OUString
& rStr
)
604 MutexGuard
aGuard( GetMutex() );
605 pOptions
->SetLocaleString( rStr
);
608 void SvtSysLocaleOptions::SetUILocaleConfigString( const OUString
& rStr
)
610 MutexGuard
aGuard( GetMutex() );
611 pOptions
->SetUILocaleString( rStr
);
614 const OUString
& SvtSysLocaleOptions::GetCurrencyConfigString() const
616 MutexGuard
aGuard( GetMutex() );
617 return pOptions
->GetCurrencyString();
621 void SvtSysLocaleOptions::SetCurrencyConfigString( const OUString
& rStr
)
623 MutexGuard
aGuard( GetMutex() );
624 pOptions
->SetCurrencyString( rStr
);
627 const OUString
& SvtSysLocaleOptions::GetDatePatternsConfigString() const
629 MutexGuard
aGuard( GetMutex() );
630 return pOptions
->GetDatePatternsString();
633 void SvtSysLocaleOptions::SetDatePatternsConfigString( const OUString
& rStr
)
635 MutexGuard
aGuard( GetMutex() );
636 pOptions
->SetDatePatternsString( rStr
);
639 sal_Bool
SvtSysLocaleOptions::IsDecimalSeparatorAsLocale() const
641 MutexGuard
aGuard( GetMutex() );
642 return pOptions
->IsDecimalSeparatorAsLocale();
645 void SvtSysLocaleOptions::SetDecimalSeparatorAsLocale( sal_Bool bSet
)
647 MutexGuard
aGuard( GetMutex() );
648 pOptions
->SetDecimalSeparatorAsLocale(bSet
);
651 sal_Bool
SvtSysLocaleOptions::IsIgnoreLanguageChange() const
653 MutexGuard
aGuard( GetMutex() );
654 return pOptions
->IsIgnoreLanguageChange();
657 void SvtSysLocaleOptions::SetIgnoreLanguageChange( sal_Bool bSet
)
659 MutexGuard
aGuard( GetMutex() );
660 pOptions
->SetIgnoreLanguageChange(bSet
);
663 sal_Bool
SvtSysLocaleOptions::IsReadOnly( EOption eOption
) const
665 MutexGuard
aGuard( GetMutex() );
666 return pOptions
->IsReadOnly( eOption
);
670 void SvtSysLocaleOptions::GetCurrencyAbbrevAndLanguage( String
& rAbbrev
,
671 LanguageType
& eLang
, const OUString
& rConfigString
)
673 sal_Int32 nDelim
= rConfigString
.indexOf( '-' );
676 rAbbrev
= rConfigString
.copy( 0, nDelim
);
677 String
aIsoStr( rConfigString
.copy( nDelim
+1 ) );
678 eLang
= LanguageTag( aIsoStr
).getLanguageType();
682 rAbbrev
= rConfigString
;
683 eLang
= (rAbbrev
.Len() ? LANGUAGE_NONE
: LANGUAGE_SYSTEM
);
689 OUString
SvtSysLocaleOptions::CreateCurrencyConfigString(
690 const String
& rAbbrev
, LanguageType eLang
)
692 String
aIsoStr( LanguageTag( eLang
).getBcp47() );
695 OUStringBuffer
aStr( rAbbrev
.Len() + 1 + aIsoStr
.Len() );
696 aStr
.append( rAbbrev
);
697 aStr
.append( sal_Unicode('-') );
698 aStr
.append( aIsoStr
);
699 return aStr
.makeStringAndClear();
707 void SvtSysLocaleOptions::SetCurrencyChangeLink( const Link
& rLink
)
709 MutexGuard
aGuard( GetMutex() );
710 DBG_ASSERT( !CurrencyChangeLink::get().IsSet(), "SvtSysLocaleOptions::SetCurrencyChangeLink: already set" );
711 CurrencyChangeLink::get() = rLink
;
716 const Link
& SvtSysLocaleOptions::GetCurrencyChangeLink()
718 MutexGuard
aGuard( GetMutex() );
719 return CurrencyChangeLink::get();
723 void SvtSysLocaleOptions::ConfigurationChanged( utl::ConfigurationBroadcaster
* p
, sal_uInt32 nHint
)
725 if ( nHint
& SYSLOCALEOPTIONS_HINT_CURRENCY
)
727 const Link
& rLink
= GetCurrencyChangeLink();
732 ::utl::detail::Options::ConfigurationChanged( p
, nHint
);
735 LanguageTag
SvtSysLocaleOptions::GetLanguageTag() const
737 return LanguageTag( GetLocaleConfigString() );
740 const LanguageTag
& SvtSysLocaleOptions::GetRealLanguageTag() const
742 return pOptions
->GetRealLocale();
745 const LanguageTag
& SvtSysLocaleOptions::GetRealUILanguageTag() const
747 return pOptions
->GetRealUILocale();
751 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */