diff options
author | Eike Rathke <erack@redhat.com> | 2016-08-30 17:34:54 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-08-30 17:38:42 +0200 |
commit | 3e289cf10b36f423ae6626296d739291850aa53b (patch) | |
tree | 7aa9c58254e2c6d55db38cfe764acc6d83671622 | |
parent | 022a58136d47a41cd490e00b2490329b8f7e6725 (diff) |
use static LanguageTag::convertTo...() instead of LanguageTag().get...()
They know best when a temporary LanguageTag instance is needed and when
not.
Change-Id: Ia0dc5b2d165b15362080d60dbb9f58cfa0403014
-rw-r--r-- | linguistic/source/lngsvcmgr.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 3f5dbffed017..10a1eeb2fe35 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -715,7 +715,7 @@ void LngSvcMgr::UpdateAll() const OUString *pNodeName = aNodeNames.getConstArray(); for (i = 0; i < nNodeNames; ++i) { - Locale aLocale( (LanguageTag(pNodeName[i])).getLocale() ); + Locale aLocale( LanguageTag::convertToLocale( pNodeName[i])); Sequence< OUString > aCfgSvcs( getConfiguredServices( aService, aLocale )); Sequence< OUString > aAvailSvcs( getAvailableServices( aService, aLocale )); @@ -734,7 +734,7 @@ void LngSvcMgr::UpdateAll() const Locale *pAvailLocale = aAvailLocales.getConstArray(); for (i = 0; i < nAvailLocales; ++i) { - OUString aCfgLocaleStr( (LanguageTag(pAvailLocale[i])).getBcp47() ); + OUString aCfgLocaleStr( LanguageTag::convertToBcp47( pAvailLocale[i])); Sequence< OUString > aAvailSvcs( getAvailableServices( aService, pAvailLocale[i] )); @@ -1777,7 +1777,7 @@ bool LngSvcMgr::SaveCfgSvcs( const OUString &rServiceName ) aCfgAny <<= aSvcImplNames; DBG_ASSERT( aCfgAny.hasValue(), "missing value for 'Any' type" ); - OUString aCfgLocaleStr( (LanguageTag(pLocale[i])).getBcp47() ); + OUString aCfgLocaleStr( LanguageTag::convertToBcp47( pLocale[i])); pValue->Value = aCfgAny; pValue->Name = aNodeName + "/" + aCfgLocaleStr; pValue++; |