summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-09-05 15:54:14 +0200
committerEike Rathke <erack@redhat.com>2013-09-05 16:51:28 +0200
commite13fd395939ff037a38172a87366a84293df7e30 (patch)
treefe13b157c41b7e4bf14c83bfd84a644951f83984 /desktop
parentc2b18aa7743ffb0b3e229deafb2740322d7560b3 (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 'desktop')
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx7
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx4
2 files changed, 4 insertions, 7 deletions
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 08e78fbc988a..53d7e7f45c3f 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -728,12 +728,9 @@ DescriptionInfoset::getLocalizedChild( const OUString & sParent) const
//office: en-DE, en, en-DE-altmark
if (! nodeMatch.is())
{
- const ::std::vector< OUString > aFallbacks = getOfficeLanguageTag().getFallbackStrings();
// Already tried full tag, continue with first fallback.
- ::std::vector< OUString >::const_iterator it( aFallbacks.begin());
- if (it != aFallbacks.end())
- ++it;
- for ( ; it != aFallbacks.end(); ++it)
+ const ::std::vector< OUString > aFallbacks( getOfficeLanguageTag().getFallbackStrings( false));
+ for (::std::vector< OUString >::const_iterator it( aFallbacks.begin()); it != aFallbacks.end(); ++it)
{
nodeMatch = matchLanguageTag(xParent, *it);
if (nodeMatch.is())
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 51689a6b40a6..b116378d481f 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1420,7 +1420,7 @@ void BackendImpl::PackageImpl::scanBundle(
const LanguageTag& officeLocale = getOfficeLanguageTag();
- const ::std::vector< OUString > officeFallbacks( officeLocale.getFallbackStrings());
+ const ::std::vector< OUString > officeFallbacks( officeLocale.getFallbackStrings( true));
const size_t nPenaltyMax = ::std::numeric_limits<size_t>::max();
size_t descrPenalty = nPenaltyMax;
OUString descrFile;
@@ -1475,7 +1475,7 @@ void BackendImpl::PackageImpl::scanBundle(
if (officeLocale.getLanguage() == descrTag.getLanguage())
{
size_t nPenalty = nPenaltyMax;
- const ::std::vector< OUString > descrFallbacks( descrTag.getFallbackStrings());
+ const ::std::vector< OUString > descrFallbacks( descrTag.getFallbackStrings( true));
for (size_t o=0; o < officeFallbacks.size() && nPenalty == nPenaltyMax; ++o)
{
for (size_t d=0; d < descrFallbacks.size() && nPenalty == nPenaltyMax; ++d)