From c88f76035cd1d088cc06067270677618340fd839 Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Sat, 4 May 2019 23:42:17 +0300 Subject: Use hasElements to check Sequence emptiness in accessibility..canvas Similar to clang-tidy readability-container-size-empty Change-Id: I24c3f04b4eed3c1cd973166885660f113a26844f Reviewed-on: https://gerrit.libreoffice.org/71805 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/runtime/methods.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'basic/source/runtime/methods.cxx') diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 6ff4a23a2500..2928107308aa 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -703,8 +703,7 @@ void SbRtl_RmDir(StarBASIC *, SbxArray & rPar, bool) if( bCompatibility ) { Sequence< OUString > aContent = xSFI->getFolderContents( aPath, true ); - sal_Int32 nCount = aContent.getLength(); - if( nCount > 0 ) + if( aContent.hasElements() ) { StarBASIC::Error( ERRCODE_BASIC_ACCESS_ERROR ); return; @@ -2704,7 +2703,7 @@ void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool) } - if (rRTLData.aDirSeq.getLength() > 0) + if (rRTLData.aDirSeq.hasElements()) { bool bFolderFlag = bool(rRTLData.nDirFlags & SbAttributes::DIRECTORY); @@ -3760,7 +3759,7 @@ static OUString getObjectTypeName( SbxVariable* pVar ) { // is this a VBA object ? Sequence< OUString > sServices = xServInfo->getSupportedServiceNames(); - if ( sServices.getLength() ) + if ( sServices.hasElements() ) { sRet = sServices[ 0 ]; } -- cgit istro/cib/libreoffice-6-4'>distro/cib/libreoffice-6-4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2021-03-23tdf#124176 Use pragma once in x*Vincent LE GARREC
2019-12-22loplugin:finalclasses in xmlsecurityNoel Grandin
2019-04-29tdf#42949 Fix IWYU warnings in xmlsecurity/*hxxGabor Kelemen