summaryrefslogtreecommitdiff
path: root/i18nlangtag
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-03 13:04:59 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-03 11:39:56 +0000
commit5adde1bf69828da955f5f8ae8d36a4bd52eee055 (patch)
tree19b20375684dd8bb328ceb59a7b035ad7d352bd9 /i18nlangtag
parent83dccbadc2c6caa804039199915d4a8c1f3f2d5a (diff)
loplugin:unuseddefaultparams various
Change-Id: Ibf8489c957b307156689de4c7cb8440ddd4e4546 Reviewed-on: https://gerrit.libreoffice.org/22852 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'i18nlangtag')
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx26
1 files changed, 6 insertions, 20 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 782a7e247dbb..dc8708b3cd24 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -1012,20 +1012,13 @@ void LanguageTag::resetVars()
}
-LanguageTag & LanguageTag::reset( const OUString & rBcp47LanguageTag, bool bCanonicalize )
+LanguageTag & LanguageTag::reset( const OUString & rBcp47LanguageTag )
{
resetVars();
maBcp47 = rBcp47LanguageTag;
mbSystemLocale = rBcp47LanguageTag.isEmpty();
mbInitializedBcp47 = !mbSystemLocale;
- if (bCanonicalize)
- {
- getImpl()->canonicalize();
- // Registration itself may already have canonicalized, so do an
- // unconditional sync.
- syncFromImpl();
- }
return *this;
}
@@ -2639,17 +2632,13 @@ OUString LanguageTag::convertToBcp47( const css::lang::Locale& rLocale, bool bRe
// static
-OUString LanguageTag::convertToBcp47( LanguageType nLangID, bool bResolveSystem )
+OUString LanguageTag::convertToBcp47( LanguageType nLangID )
{
- // Catch this first so we don't need the rest.
- if (!bResolveSystem && lcl_isSystem( nLangID))
- return OUString();
-
- lang::Locale aLocale( LanguageTag::convertToLocale( nLangID, bResolveSystem));
+ lang::Locale aLocale( LanguageTag::convertToLocale( nLangID ));
// If system for some reason (should not happen.. haha) could not be
// resolved DO NOT CALL LanguageTag::convertToBcp47(Locale) because that
// would recurse into this method here!
- if (aLocale.Language.isEmpty() && bResolveSystem)
+ if (aLocale.Language.isEmpty())
return OUString(); // bad luck, bail out
return LanguageTagImpl::convertToBcp47( aLocale);
}
@@ -2666,12 +2655,9 @@ css::lang::Locale LanguageTag::convertToLocale( const OUString& rBcp47, bool bRe
// static
-LanguageType LanguageTag::convertToLanguageType( const OUString& rBcp47, bool bResolveSystem )
+LanguageType LanguageTag::convertToLanguageType( const OUString& rBcp47 )
{
- if (rBcp47.isEmpty() && !bResolveSystem)
- return LANGUAGE_SYSTEM;
-
- return LanguageTag( rBcp47).getLanguageType( bResolveSystem);
+ return LanguageTag( rBcp47).getLanguageType();
}