From 751f4d4428339b508abb5ee3c1804e63f0cfd593 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 20 Jul 2020 18:37:18 +0200 Subject: loplugin:constantparam Change-Id: Id5144e95ac0120b3125258cdde46e4f7f6e1690b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99109 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../source/defaultnumberingprovider/defaultnumberingprovider.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'i18npool') diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 648e55be3b07..936f1620ad73 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -578,15 +578,13 @@ static OUString lcl_formatArabicZero(sal_Int32 nNumber, sal_Int32 nLimit) static Any getPropertyByName( const Sequence& aProperties, - const char* name, bool bRequired ) + const char* name ) { auto pProp = std::find_if(aProperties.begin(), aProperties.end(), [&name](const beans::PropertyValue& rProp) { return rProp.Name.equalsAscii(name); }); if (pProp != aProperties.end()) return pProp->Value; - if(bRequired) - throw IllegalArgumentException(); - return Any(); + throw IllegalArgumentException(); } //XNumberingFormatter @@ -700,7 +698,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence>= transliteration; + getPropertyByName(aProperties, "Transliteration") >>= transliteration; if ( !translit ) translit = new TransliterationImpl(m_xContext); translit->loadModuleByImplName(transliteration, aLocale); -- cgit v1.2.3