diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-05-04 23:42:17 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-11 20:24:40 +0200 |
commit | c88f76035cd1d088cc06067270677618340fd839 (patch) | |
tree | 2e98a3c2c6bdb6ee909d0b7c45012060e57b9a29 /basic/source/runtime/methods.cxx | |
parent | b5d624c4af1085d4670149e9c1d280da7bc9add0 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/runtime/methods.cxx')
-rw-r--r-- | basic/source/runtime/methods.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
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 ]; } |