From 0e4c542f7a862e681baf25f042bc3a928c14004f Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Fri, 3 May 2019 22:11:02 +0300 Subject: Use hasElements to check Sequence emptiness in [l-r]* Similar to clang-tidy readability-container-size-empty Change-Id: Idd67f332b04857a39df26bad1733aae21236f105 Reviewed-on: https://gerrit.libreoffice.org/71764 Tested-by: Jenkins Reviewed-by: Michael Stahl --- linguistic/source/gciterator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linguistic/source/gciterator.cxx') diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx index 62322ae67032..7aca99026250 100644 --- a/linguistic/source/gciterator.cxx +++ b/linguistic/source/gciterator.cxx @@ -1093,7 +1093,7 @@ void GrammarCheckingIterator::GetConfiguredGCSvcs_Impl() uno::Any aTmp( xNA->getByName( pElementNames[i] ) ); if (aTmp >>= aImplNames) { - if (aImplNames.getLength() > 0) + if (aImplNames.hasElements()) { // only the first entry is used, there should be only one grammar checker per language const OUString aImplName( aImplNames[0] ); @@ -1149,7 +1149,7 @@ void GrammarCheckingIterator::SetServiceList( LanguageType nLanguage = LinguLocaleToLanguage( rLocale ); OUString aImplName; - if (rSvcImplNames.getLength() > 0) + if (rSvcImplNames.hasElements()) aImplName = rSvcImplNames[0]; // there is only one grammar checker per language if (!LinguIsUnspecified(nLanguage) && nLanguage != LANGUAGE_DONTKNOW) -- cgit v1.2.3