diff options
author | Eike Rathke <erack@redhat.com> | 2013-09-05 15:54:14 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-09-05 16:51:28 +0200 |
commit | e13fd395939ff037a38172a87366a84293df7e30 (patch) | |
tree | fe13b157c41b7e4bf14c83bfd84a644951f83984 /sc | |
parent | c2b18aa7743ffb0b3e229deafb2740322d7560b3 (diff) |
getFallbackStrings() with bIncludeFullBcp47 parameter
so the various places that check the full tag first do not have to get
it just to delete it again.
Change-Id: Ib4e3cf1b16988464db875f1b6ac5cf4a0ab60fe5
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/addincol.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx index 80497c1bf8ee..719b9c1fbad9 100644 --- a/sc/source/core/tool/addincol.cxx +++ b/sc/source/core/tool/addincol.cxx @@ -156,7 +156,7 @@ bool ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, OUString& rRetExc // Second, try match of fallback search with fallback locales, // appending also 'en-US' and 'en' to search if not queried. - ::std::vector< OUString > aFallbackSearch( aLanguageTag.getFallbackStrings()); + ::std::vector< OUString > aFallbackSearch( aLanguageTag.getFallbackStrings( true)); if (aSearch != "en-US") { aFallbackSearch.push_back( "en-US"); @@ -165,22 +165,16 @@ bool ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, OUString& rRetExc aFallbackSearch.push_back( "en"); } } - bool bFirst = true; ::std::vector< OUString >::const_iterator itSearch( aFallbackSearch.begin()); for ( ; itSearch != aFallbackSearch.end(); ++itSearch) { itNames = rCompNames.begin(); for ( ; itNames != rCompNames.end(); ++itNames) { - ::std::vector< OUString > aFallbackLocales( LanguageTag( (*itNames).maLocale).getFallbackStrings()); - ::std::vector< OUString >::const_iterator itLocales( aFallbackLocales.begin()); - if (bFirst) - { - // We checked already the full tag, start with second. - if (itLocales != aFallbackLocales.end()) - ++itLocales; - } - for ( ; itLocales != aFallbackLocales.end(); ++itLocales) + // We checked already the full tag, start with second. + ::std::vector< OUString > aFallbackLocales( LanguageTag( (*itNames).maLocale).getFallbackStrings( false)); + for (::std::vector< OUString >::const_iterator itLocales( aFallbackLocales.begin()); + itLocales != aFallbackLocales.end(); ++itLocales) { if (*itLocales == *itSearch) { @@ -189,7 +183,6 @@ bool ScUnoAddInFuncData::GetExcelName( LanguageType eDestLang, OUString& rRetExc } } } - bFirst = false; } // Third, last resort, use first (default) entry. |