diff options
author | Eike Rathke <erack@redhat.com> | 2013-07-13 02:54:05 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-07-13 11:55:16 +0200 |
commit | 358d1a99484bcc02900bd200a7606a7bf3298cac (patch) | |
tree | 031f808141dbc712553b8a4a029a354a2699a622 /svl/source | |
parent | 5d1a8e0d47b6d6e9e3e5735d0ee52fa0b4782202 (diff) |
use static LanguageTag::convertTo...() for standalone conversions
If no LanguageTag instance is at hand use the static methods to convert
between BCP 47 string, Locale and MS-LangID instead of creating
temporary instances.
Change-Id: I9597f768078eb81c840e84a5db5617f26bb7dc09
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/config/asiancfg.cxx | 4 | ||||
-rw-r--r-- | svl/source/config/languageoptions.cxx | 2 | ||||
-rw-r--r-- | svl/source/items/srchitem.cxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/numfmuno.cxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/supservs.cxx | 2 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/svl/source/config/asiancfg.cxx b/svl/source/config/asiancfg.cxx index 695f7623eb9e..b644705aef97 100644 --- a/svl/source/config/asiancfg.cxx +++ b/svl/source/config/asiancfg.cxx @@ -50,7 +50,7 @@ OUString toString(css::lang::Locale const & locale) { "Locale language \"" << locale.Language << "\" contains \"-\""); SAL_WARN_IF( locale.Country.indexOf('-') != -1, "svl", "Locale country \"" << locale.Country << "\" contains \"-\""); - return LanguageTag( locale).getBcp47( false); + return LanguageTag::convertToBcp47( locale, false); } } @@ -105,7 +105,7 @@ css::uno::Sequence< css::lang::Locale > SvxAsianConfig::GetStartEndCharLocales() getElementNames()); css::uno::Sequence< css::lang::Locale > ls(ns.getLength()); for (sal_Int32 i = 0; i < ns.getLength(); ++i) { - ls[i] = LanguageTag( ns[i]).getLocale( false); + ls[i] = LanguageTag::convertToLocale( ns[i], false); } return ls; } diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx index a095ac5b731e..687c99a81d3a 100644 --- a/svl/source/config/languageoptions.cxx +++ b/svl/source/config/languageoptions.cxx @@ -204,7 +204,7 @@ LanguageType SvtSystemLanguageOptions::GetWin16SystemLanguage() const { if( m_sWin16SystemLocale.isEmpty() ) return LANGUAGE_NONE; - return LanguageTag( m_sWin16SystemLocale ).getLanguageType(); + return LanguageTag::convertToLanguageType( m_sWin16SystemLocale ); } bool SvtSystemLanguageOptions::isKeyboardLayoutTypeInstalled(sal_Int16 scriptType) const diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx index c3ad82c5c160..a75f83c46f89 100644 --- a/svl/source/items/srchitem.cxx +++ b/svl/source/items/srchitem.cxx @@ -432,7 +432,7 @@ bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMembe { sal_Int16 nLocale; if (!aSearchOpt.Locale.Language.isEmpty() || !aSearchOpt.Locale.Country.isEmpty() ) - nLocale = LanguageTag( aSearchOpt.Locale ).getLanguageType(); + nLocale = LanguageTag::convertToLanguageType( aSearchOpt.Locale ); else nLocale = LANGUAGE_NONE; rVal <<= nLocale; @@ -581,7 +581,7 @@ bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nM } else { - aSearchOpt.Locale = LanguageTag( nInt).getLocale(); + aSearchOpt.Locale = LanguageTag::convertToLocale( nInt); } } break; diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx index 95b012e9404a..317abfa7fa17 100644 --- a/svl/source/numbers/numfmuno.cxx +++ b/svl/source/numbers/numfmuno.cxx @@ -101,7 +101,7 @@ static LanguageType lcl_GetLanguage( const lang::Locale& rLocale ) if ( rLocale.Language.isEmpty() ) return LANGUAGE_SYSTEM; - LanguageType eRet = LanguageTag( rLocale ).getLanguageType( false ); + LanguageType eRet = LanguageTag::convertToLanguageType( rLocale, false); if ( eRet == LANGUAGE_NONE ) eRet = LANGUAGE_SYSTEM; //! or throw an exception? diff --git a/svl/source/numbers/supservs.cxx b/svl/source/numbers/supservs.cxx index 198c5f67c2b4..70cce53830b0 100644 --- a/svl/source/numbers/supservs.cxx +++ b/svl/source/numbers/supservs.cxx @@ -96,7 +96,7 @@ void SAL_CALL SvNumberFormatsSupplierServiceObject::initialize( const Sequence< { Locale aLocale; *pArgs >>= aLocale; - eNewFormatterLanguage = LanguageTag( aLocale).getLanguageType( false); + eNewFormatterLanguage = LanguageTag::convertToLanguageType( aLocale, false); } #ifdef DBG_UTIL else diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index f75748ba6202..00a9a35be182 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -3704,7 +3704,7 @@ void SvNumberFormatter::ImpInitCurrencyTable() sal_uInt16 nLegacyOnlyCurrencyPos = 0; for ( sal_Int32 nLocale = 0; nLocale < nLocaleCount; nLocale++ ) { - LanguageType eLang = LanguageTag( pLocales[nLocale]).getLanguageType( false); + LanguageType eLang = LanguageTag::convertToLanguageType( pLocales[nLocale], false); rInstalledLocales.insert( eLang); pLocaleData->setLanguageTag( LanguageTag( pLocales[nLocale]) ); Sequence< Currency2 > aCurrSeq = pLocaleData->getAllCurrencies(); |