summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
Diffstat (limited to 'basic')
-rw-r--r--basic/qa/cppunit/basictest.cxx2
-rw-r--r--basic/source/classes/sbunoobj.cxx4
-rw-r--r--basic/source/classes/sbxmod.cxx4
-rw-r--r--basic/source/runtime/methods.cxx7
4 files changed, 8 insertions, 9 deletions
diff --git a/basic/qa/cppunit/basictest.cxx b/basic/qa/cppunit/basictest.cxx
index 21e82ad0d326..07ce6384539f 100644
--- a/basic/qa/cppunit/basictest.cxx
+++ b/basic/qa/cppunit/basictest.cxx
@@ -80,7 +80,7 @@ SbxVariableRef MacroSnippet::Run( const css::uno::Sequence< css::uno::Any >& rAr
SbMethod* pMeth = mpMod.is() ? static_cast<SbMethod*>(mpMod->Find( "doUnitTest", SbxClassType::Method )) : nullptr;
if ( pMeth )
{
- if ( rArgs.getLength() )
+ if ( rArgs.hasElements() )
{
SbxArrayRef aArgs = new SbxArray;
for ( int i=0; i < rArgs.getLength(); ++i )
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 0896c8b39ebb..c4bec7580d48 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -565,7 +565,7 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int
}
else
{
- if ( indices.getLength() < 1 )
+ if ( !indices.hasElements() )
{
// Should never ever get here ( indices.getLength()
// should equal number of dimensions in the array )
@@ -3929,7 +3929,7 @@ Any SAL_CALL InvocationToAllListenerMapper::invoke(const OUString& FunctionName,
Reference< XIdlClass > xReturnType = xMethod->getReturnType();
Sequence< Reference< XIdlClass > > aExceptionSeq = xMethod->getExceptionTypes();
if( ( xReturnType.is() && xReturnType->getTypeClass() != TypeClass_VOID ) ||
- aExceptionSeq.getLength() > 0 )
+ aExceptionSeq.hasElements() )
{
bApproveFiring = true;
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 36b4afbb28f7..0ba3cb5d8b66 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -171,7 +171,7 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar )
Sequence< Type > SAL_CALL DocObjectWrapper::getTypes()
{
- if ( m_Types.getLength() == 0 )
+ if ( !m_Types.hasElements() )
{
Sequence< Type > sTypes;
if ( m_xAggregateTypeProv.is() )
@@ -2392,7 +2392,7 @@ void SbUserFormModule::triggerMethod( const OUString& aMethodToRun, Sequence< An
SbxVariable* pMeth = SbObjModule::Find( aMethodToRun, SbxClassType::Method );
if( pMeth )
{
- if ( aArguments.getLength() > 0 ) // Setup parameters
+ if ( aArguments.hasElements() ) // Setup parameters
{
auto xArray = tools::make_ref<SbxArray>();
xArray->Put( pMeth, 0 ); // Method as parameter 0
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 ];
}