summaryrefslogtreecommitdiff
path: root/basic/source/classes
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-03-08 12:29:39 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-03-09 13:22:18 +0100
commitfbaf865ffc5db1ed1094fec608e6b2472437e066 (patch)
tree1740d009fae33b628286eda9b24c11f722723780 /basic/source/classes
parent674bbddf720b14d1f7d173e6b5f3e08d65618ab9 (diff)
Drop "32" from names of SbxArray methods taking 32-bit indices
... a leftover from times when there were methods for 16-bit as well as for 32-bit indices. 16-bit indices were removed in commit 62f3f3d92aa204eaaa063b30d7ade44df501b997. Change-Id: Idf8b1160e68e8b303cf75ea79dd7dbb3bd00275d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112187 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic/source/classes')
-rw-r--r--basic/source/classes/eventatt.cxx12
-rw-r--r--basic/source/classes/image.cxx20
-rw-r--r--basic/source/classes/propacc.cxx6
-rw-r--r--basic/source/classes/sb.cxx80
-rw-r--r--basic/source/classes/sbunoobj.cxx156
-rw-r--r--basic/source/classes/sbxmod.cxx92
6 files changed, 183 insertions, 183 deletions
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index 2a4127159b71..6fa48784212e 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -241,7 +241,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
// Be still tolerant and make default search if no search basic exists
if( bSearchLib && xLibSearchBasic.is() )
{
- sal_Int32 nCount = xLibSearchBasic->GetObjects()->Count32();
+ sal_Int32 nCount = xLibSearchBasic->GetObjects()->Count();
for( sal_Int32 nObj = -1; nObj < nCount ; nObj++ )
{
StarBASIC* pBasic;
@@ -251,7 +251,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
}
else
{
- SbxVariable* pVar = xLibSearchBasic->GetObjects()->Get32( nObj );
+ SbxVariable* pVar = xLibSearchBasic->GetObjects()->Get(nObj);
pBasic = dynamic_cast<StarBASIC*>( pVar );
}
if( pBasic )
@@ -291,7 +291,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any
{
SbxVariableRef xVar = new SbxVariable( SbxVARIANT );
unoToSbxValue( xVar.get(), pArgs[i] );
- xArray->Put32( xVar.get(), sal::static_int_cast< sal_uInt32 >(i+1) );
+ xArray->Put(xVar.get(), sal::static_int_cast<sal_uInt32>(i + 1));
}
}
@@ -409,14 +409,14 @@ void RTL_Impl_CreateUnoDialog( SbxArray& rPar )
Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
// We need at least 1 parameter
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
// Get dialog
- SbxBaseRef pObj = rPar.Get32( 1 )->GetObject();
+ SbxBaseRef pObj = rPar.Get(1)->GetObject();
if( !(pObj.is() && dynamic_cast<const SbUnoObject*>( pObj.get() ) != nullptr) )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -540,7 +540,7 @@ void RTL_Impl_CreateUnoDialog( SbxArray& rPar )
// Return dialog
Any aRetVal;
aRetVal <<= xCntrl;
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
unoToSbxValue( refVar.get(), aRetVal );
}
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 0641c1337569..28a85da55b6f 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -330,7 +330,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
sal_Int32 lBound;
sal_Int32 uBound;
r.ReadInt32(lBound).ReadInt32(uBound);
- pArray->unoAddDim32(lBound, uBound);
+ pArray->unoAddDim(lBound, uBound);
}
const SbxFlagBits nSavFlags = pTypeElem->GetFlags();
@@ -342,7 +342,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
}
}
- pTypeMembers->Insert32( pTypeElem, pTypeMembers->Count32() );
+ pTypeMembers->Insert(pTypeElem, pTypeMembers->Count());
}
@@ -478,7 +478,7 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
// User defined types
if ( rTypes.is() )
{
- sal_uInt32 nTypes = rTypes->Count32();
+ sal_uInt32 nTypes = rTypes->Count();
assert(nTypes <= std::numeric_limits<sal_uInt16>::max());
if (nTypes > 0 )
{
@@ -486,13 +486,13 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
for (sal_uInt32 i = 0; i < nTypes; i++)
{
- SbxObject* pType = static_cast< SbxObject* > ( rTypes->Get32(i) );
+ SbxObject* pType = static_cast<SbxObject*>(rTypes->Get(i));
OUString aTypeName = pType->GetClassName();
r.WriteUniOrByteString( aTypeName, eCharSet );
SbxArray *pTypeMembers = pType->GetProperties();
- sal_uInt32 nTypeMembers = pTypeMembers->Count32();
+ sal_uInt32 nTypeMembers = pTypeMembers->Count();
assert(nTypeMembers <= std::numeric_limits<sal_uInt16>::max());
r.WriteInt16(sal::static_int_cast<sal_uInt16>(nTypeMembers));
@@ -500,7 +500,7 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
for (sal_uInt32 j = 0; j < nTypeMembers; j++)
{
- SbxProperty* pTypeElem = static_cast< SbxProperty* > ( pTypeMembers->Get32(j) );
+ SbxProperty* pTypeElem = static_cast<SbxProperty*>(pTypeMembers->Get(j));
const OUString& aElemName = pTypeElem->GetName();
r.WriteUniOrByteString( aElemName, eCharSet );
@@ -535,14 +535,14 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
else
r.WriteInt16(0);
- sal_Int32 nDims = pArray->GetDims32();
+ sal_Int32 nDims = pArray->GetDims();
r.WriteInt32(nDims);
for (sal_Int32 d = 1; d <= nDims; d++)
{
sal_Int32 lBound;
sal_Int32 uBound;
- pArray->GetDim32(d, lBound, uBound);
+ pArray->GetDim(d, lBound, uBound);
r.WriteInt32(lBound).WriteInt32(uBound);
}
}
@@ -633,7 +633,7 @@ void SbiImage::AddType(SbxObject const * pObject)
rTypes = new SbxArray;
}
SbxObject *pCopyObject = new SbxObject(*pObject);
- rTypes->Insert32 (pCopyObject,rTypes->Count32());
+ rTypes->Insert(pCopyObject, rTypes->Count());
}
void SbiImage::AddEnum(SbxObject* pObject) // Register enum type
@@ -642,7 +642,7 @@ void SbiImage::AddEnum(SbxObject* pObject) // Register enum type
{
rEnums = new SbxArray;
}
- rEnums->Insert32( pObject, rEnums->Count32() );
+ rEnums->Insert(pObject, rEnums->Count());
}
// Note: IDs start with 1
diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx
index 287eda3882eb..06bba39073d7 100644
--- a/basic/source/classes/propacc.cxx
+++ b/basic/source/classes/propacc.cxx
@@ -149,7 +149,7 @@ void RTL_Impl_CreatePropertySet( SbxArray& rPar )
{
// We need at least one parameter
// TODO: In this case < 2 is not correct ;-)
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
@@ -159,11 +159,11 @@ void RTL_Impl_CreatePropertySet( SbxArray& rPar )
Reference< XInterface > xInterface = static_cast<OWeakObject*>(new SbPropertyValues());
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
if( xInterface.is() )
{
// Set PropertyValues
- Any aArgAsAny = sbxToUnoValue( rPar.Get32(1),
+ Any aArgAsAny = sbxToUnoValue(rPar.Get(1),
cppu::UnoType<Sequence<PropertyValue>>::get() );
auto pArg = o3tl::doAccess<Sequence<PropertyValue>>(aArgAsAny);
Reference< XPropertyAccess > xPropAcc( xInterface, UNO_QUERY );
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 94d496e87c4f..790cbb993c89 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -521,10 +521,10 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj )
// Copy the properties, not only the reference to them
SbxArray* pProps = pRet->GetProperties();
- sal_uInt32 nCount = pProps->Count32();
+ sal_uInt32 nCount = pProps->Count();
for( sal_uInt32 i = 0 ; i < nCount ; i++ )
{
- SbxVariable* pVar = pProps->Get32( i );
+ SbxVariable* pVar = pProps->Get(i);
SbxProperty* pProp = dynamic_cast<SbxProperty*>( pVar );
if( pProp )
{
@@ -537,19 +537,19 @@ SbxObject* cloneTypeObjectImpl( const SbxObject& rTypeObj )
SbxDimArray* pDest = new SbxDimArray( pVar->GetType() );
pDest->setHasFixedSize( pSource && pSource->hasFixedSize() );
- if ( pSource && pSource->GetDims32() && pSource->hasFixedSize() )
+ if (pSource && pSource->GetDims() && pSource->hasFixedSize())
{
sal_Int32 lb = 0;
sal_Int32 ub = 0;
- for ( sal_Int32 j = 1 ; j <= pSource->GetDims32(); ++j )
+ for (sal_Int32 j = 1; j <= pSource->GetDims(); ++j)
{
- pSource->GetDim32( j, lb, ub );
- pDest->AddDim32( lb, ub );
+ pSource->GetDim(j, lb, ub);
+ pDest->AddDim(lb, ub);
}
}
else
{
- pDest->unoAddDim32( 0, -1 ); // variant array
+ pDest->unoAddDim(0, -1); // variant array
}
SbxFlagBits nSavFlags = pVar->GetFlags();
pNewProp->ResetFlag( SbxFlagBits::Fixed );
@@ -619,11 +619,11 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
// Copy the methods from original class module
SbxArray* pClassMethods = pClassModule->GetMethods().get();
- sal_uInt32 nMethodCount = pClassMethods->Count32();
+ sal_uInt32 nMethodCount = pClassMethods->Count();
sal_uInt32 i;
for( i = 0 ; i < nMethodCount ; i++ )
{
- SbxVariable* pVar = pClassMethods->Get32( i );
+ SbxVariable* pVar = pClassMethods->Get(i);
// Exclude SbIfaceMapperMethod to copy them in a second step
SbIfaceMapperMethod* pIfaceMethod = dynamic_cast<SbIfaceMapperMethod*>( pVar );
@@ -649,7 +649,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
// the corresponding base methods have already been copied
for( i = 0 ; i < nMethodCount ; i++ )
{
- SbxVariable* pVar = pClassMethods->Get32( i );
+ SbxVariable* pVar = pClassMethods->Get(i);
SbIfaceMapperMethod* pIfaceMethod = dynamic_cast<SbIfaceMapperMethod*>( pVar );
if( pIfaceMethod )
@@ -677,10 +677,10 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
// Copy the properties from original class module
SbxArray* pClassProps = pClassModule->GetProperties();
- sal_uInt32 nPropertyCount = pClassProps->Count32();
+ sal_uInt32 nPropertyCount = pClassProps->Count();
for( i = 0 ; i < nPropertyCount ; i++ )
{
- SbxVariable* pVar = pClassProps->Get32( i );
+ SbxVariable* pVar = pClassProps->Get(i);
SbProcedureProperty* pProcedureProp = dynamic_cast<SbProcedureProperty*>( pVar );
if( pProcedureProp )
{
@@ -972,10 +972,10 @@ StarBASIC::~StarBASIC()
// #100326 Set Parent NULL in registered listeners
if( xUnoListeners.is() )
{
- sal_uInt32 uCount = xUnoListeners->Count32();
+ sal_uInt32 uCount = xUnoListeners->Count();
for( sal_uInt32 i = 0 ; i < uCount ; i++ )
{
- SbxVariable* pListenerObj = xUnoListeners->Get32( i );
+ SbxVariable* pListenerObj = xUnoListeners->Get(i);
pListenerObj->SetParent( nullptr );
}
xUnoListeners = nullptr;
@@ -994,9 +994,9 @@ void StarBASIC::implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic )
}
}
- for( sal_uInt32 nObj = 0; nObj < pObjs->Count32(); nObj++ )
+ for (sal_uInt32 nObj = 0; nObj < pObjs->Count(); nObj++)
{
- SbxVariable* pVar = pObjs->Get32( nObj );
+ SbxVariable* pVar = pObjs->Get(nObj);
StarBASIC* pBasic = dynamic_cast<StarBASIC*>( pVar );
if( pBasic && pBasic != pDeletedBasic )
{
@@ -1201,9 +1201,9 @@ void StarBASIC::InitAllModules( StarBASIC const * pBasicNotToInit )
// Check all objects if they are BASIC,
// if yes initialize
- for ( sal_uInt32 nObj = 0; nObj < pObjs->Count32(); nObj++ )
+ for (sal_uInt32 nObj = 0; nObj < pObjs->Count(); nObj++)
{
- SbxVariable* pVar = pObjs->Get32( nObj );
+ SbxVariable* pVar = pObjs->Get(nObj);
StarBASIC* pBasic = dynamic_cast<StarBASIC*>( pVar );
if( pBasic && pBasic != pBasicNotToInit )
{
@@ -1225,9 +1225,9 @@ void StarBASIC::DeInitAllModules()
}
}
- for ( sal_uInt32 nObj = 0; nObj < pObjs->Count32(); nObj++ )
+ for (sal_uInt32 nObj = 0; nObj < pObjs->Count(); nObj++)
{
- SbxVariable* pVar = pObjs->Get32( nObj );
+ SbxVariable* pVar = pObjs->Get(nObj);
StarBASIC* pBasic = dynamic_cast<StarBASIC*>( pVar );
if( pBasic )
{
@@ -1769,13 +1769,13 @@ bool StarBASIC::LoadData( SvStream& r, sal_uInt16 nVer )
}
// #95459 Delete dialogs, otherwise endless recursion
// in SbxVariable::GetType() if dialogs are accessed
- sal_uInt32 nObjCount = pObjs->Count32();
+ sal_uInt32 nObjCount = pObjs->Count();
std::unique_ptr<SbxVariable*[]> ppDeleteTab(new SbxVariable*[ nObjCount ]);
sal_uInt32 nObj;
for( nObj = 0 ; nObj < nObjCount ; nObj++ )
{
- SbxVariable* pVar = pObjs->Get32( nObj );
+ SbxVariable* pVar = pObjs->Get(nObj);
StarBASIC* pBasic = dynamic_cast<StarBASIC*>( pVar );
ppDeleteTab[nObj] = pBasic ? nullptr : pVar;
}
@@ -2000,7 +2000,7 @@ void BasicCollection::Notify( SfxBroadcaster& rCst, const SfxHint& rHint )
if( pVar->GetHashCode() == nCountHash
&& aVarName.equalsIgnoreAsciiCase( pCountStr ) )
{
- pVar->PutLong( xItemArray->Count32() );
+ pVar->PutLong(xItemArray->Count());
}
else if( pVar->GetHashCode() == nAddHash
&& aVarName.equalsIgnoreAsciiCase( pAddStr ) )
@@ -2057,11 +2057,11 @@ sal_Int32 BasicCollection::implGetIndex( SbxVariable const * pIndexVar )
sal_Int32 BasicCollection::implGetIndexForName(std::u16string_view rName)
{
sal_Int32 nIndex = -1;
- sal_Int32 nCount = xItemArray->Count32();
+ sal_Int32 nCount = xItemArray->Count();
sal_Int32 nNameHash = MakeHashCode( rName );
for( sal_Int32 i = 0 ; i < nCount ; i++ )
{
- SbxVariable* pVar = xItemArray->Get32( i );
+ SbxVariable* pVar = xItemArray->Get(i);
if( pVar->GetHashCode() == nNameHash &&
pVar->GetName().equalsIgnoreAsciiCase( rName ) )
{
@@ -2074,24 +2074,24 @@ sal_Int32 BasicCollection::implGetIndexForName(std::u16string_view rName)
void BasicCollection::CollAdd( SbxArray* pPar_ )
{
- sal_uInt32 nCount = pPar_->Count32();
+ sal_uInt32 nCount = pPar_->Count();
if( nCount < 2 || nCount > 5 )
{
SetError( ERRCODE_BASIC_WRONG_ARGS );
return;
}
- SbxVariable* pItem = pPar_->Get32(1);
+ SbxVariable* pItem = pPar_->Get(1);
if( pItem )
{
sal_uInt32 nNextIndex;
if( nCount < 4 )
{
- nNextIndex = xItemArray->Count32();
+ nNextIndex = xItemArray->Count();
}
else
{
- SbxVariable* pBefore = pPar_->Get32(3);
+ SbxVariable* pBefore = pPar_->Get(3);
if( nCount == 5 )
{
if( !( pBefore->IsErr() || ( pBefore->GetType() == SbxEMPTY ) ) )
@@ -2099,7 +2099,7 @@ void BasicCollection::CollAdd( SbxArray* pPar_ )
SetError( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- SbxVariable* pAfter = pPar_->Get32(4);
+ SbxVariable* pAfter = pPar_->Get(4);
sal_Int32 nAfterIndex = implGetIndex( pAfter );
if( nAfterIndex == -1 )
{
@@ -2123,7 +2123,7 @@ void BasicCollection::CollAdd( SbxArray* pPar_ )
auto pNewItem = tools::make_ref<SbxVariable>( *pItem );
if( nCount >= 3 )
{
- SbxVariable* pKey = pPar_->Get32(2);
+ SbxVariable* pKey = pPar_->Get(2);
if( !( pKey->IsErr() || ( pKey->GetType() == SbxEMPTY ) ) )
{
if( pKey->GetType() != SbxSTRING )
@@ -2141,7 +2141,7 @@ void BasicCollection::CollAdd( SbxArray* pPar_ )
}
}
pNewItem->SetFlag( SbxFlagBits::ReadWrite );
- xItemArray->Insert32( pNewItem.get(), nNextIndex );
+ xItemArray->Insert(pNewItem.get(), nNextIndex);
}
else
{
@@ -2152,17 +2152,17 @@ void BasicCollection::CollAdd( SbxArray* pPar_ )
void BasicCollection::CollItem( SbxArray* pPar_ )
{
- if( pPar_->Count32() != 2 )
+ if (pPar_->Count() != 2)
{
SetError( ERRCODE_BASIC_WRONG_ARGS );
return;
}
SbxVariable* pRes = nullptr;
- SbxVariable* p = pPar_->Get32( 1 );
+ SbxVariable* p = pPar_->Get(1);
sal_Int32 nIndex = implGetIndex( p );
- if( nIndex >= 0 && nIndex < static_cast<sal_Int32>(xItemArray->Count32()) )
+ if (nIndex >= 0 && nIndex < static_cast<sal_Int32>(xItemArray->Count()))
{
- pRes = xItemArray->Get32( nIndex );
+ pRes = xItemArray->Get(nIndex);
}
if( !pRes )
{
@@ -2170,21 +2170,21 @@ void BasicCollection::CollItem( SbxArray* pPar_ )
}
else
{
- *(pPar_->Get32(0)) = *pRes;
+ *(pPar_->Get(0)) = *pRes;
}
}
void BasicCollection::CollRemove( SbxArray* pPar_ )
{
- if( pPar_ == nullptr || pPar_->Count32() != 2 )
+ if (pPar_ == nullptr || pPar_->Count() != 2)
{
SetError( ERRCODE_BASIC_WRONG_ARGS );
return;
}
- SbxVariable* p = pPar_->Get32( 1 );
+ SbxVariable* p = pPar_->Get(1);
sal_Int32 nIndex = implGetIndex( p );
- if( nIndex >= 0 && nIndex < static_cast<sal_Int32>(xItemArray->Count32()) )
+ if (nIndex >= 0 && nIndex < static_cast<sal_Int32>(xItemArray->Count()))
{
xItemArray->Remove( nIndex );
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 259cd5ae88f4..9f00a8f231c9 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -592,9 +592,9 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int
for ( sal_Int32 index = 0; index < nIndexLen; ++index )
{
if ( bIsZeroIndex )
- pArray->unoAddDim32( 0, sizes[ index ] - 1);
+ pArray->unoAddDim(0, sizes[index] - 1);
else
- pArray->unoAddDim32( 1, sizes[ index ] );
+ pArray->unoAddDim(1, sizes[index]);
}
}
@@ -605,7 +605,7 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int
unoToSbxValue( xVar.get(), aValue );
sal_Int32* pIndices = indices.getArray();
- pArray->Put32( xVar.get(), pIndices );
+ pArray->Put(xVar.get(), pIndices);
}
}
@@ -768,7 +768,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
xArray = new SbxDimArray( eSbxElementType );
if( nLen > 0 )
{
- xArray->unoAddDim32( 0, nLen - 1 );
+ xArray->unoAddDim(0, nLen - 1);
// register the elements as variables
for( i = 0 ; i < nLen ; i++ )
@@ -779,12 +779,12 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
unoToSbxValue( xVar.get(), aElementAny );
// put into the Array
- xArray->Put32( xVar.get(), &i );
+ xArray->Put(xVar.get(), &i);
}
}
else
{
- xArray->unoAddDim32( 0, -1 );
+ xArray->unoAddDim(0, -1);
}
// return the Array
@@ -873,13 +873,13 @@ static Type getUnoTypeForSbxValue( const SbxValue* pVal )
if( auto pArray = dynamic_cast<SbxDimArray*>( xObj.get() ) )
{
- sal_Int32 nDims = pArray->GetDims32();
+ sal_Int32 nDims = pArray->GetDims();
Type aElementType = getUnoTypeForSbxBaseType( static_cast<SbxDataType>(pArray->GetType() & 0xfff) );
TypeClass eElementTypeClass = aElementType.getTypeClass();
// Normal case: One dimensional array
sal_Int32 nLower, nUpper;
- if( nDims == 1 && pArray->GetDim32( 1, nLower, nUpper ) )
+ if (nDims == 1 && pArray->GetDim(1, nLower, nUpper))
{
if( eElementTypeClass == TypeClass_VOID || eElementTypeClass == TypeClass_ANY )
{
@@ -889,7 +889,7 @@ static Type getUnoTypeForSbxValue( const SbxValue* pVal )
for (sal_Int32 aIdx[1] = { nLower }; aIdx[0] <= nUpper; ++aIdx[0])
{
- SbxVariableRef xVar = pArray->Get32(aIdx);
+ SbxVariableRef xVar = pArray->Get(aIdx);
Type aType = getUnoTypeForSbxValue( xVar.get() );
if( bNeedsInit )
{
@@ -921,12 +921,12 @@ static Type getUnoTypeForSbxValue( const SbxValue* pVal )
if( eElementTypeClass == TypeClass_VOID || eElementTypeClass == TypeClass_ANY )
{
// For this check the array's dim structure does not matter
- sal_uInt32 nFlatArraySize = pArray->Count32();
+ sal_uInt32 nFlatArraySize = pArray->Count();
bool bNeedsInit = true;
for( sal_uInt32 i = 0 ; i < nFlatArraySize ; i++ )
{
- SbxVariableRef xVar = pArray->SbxArray::Get32( i );
+ SbxVariableRef xVar = pArray->SbxArray::Get(i);
Type aType = getUnoTypeForSbxValue( xVar.get() );
if( bNeedsInit )
{
@@ -1118,7 +1118,7 @@ static Any implRekMultiDimArrayToSequence( SbxDimArray* pArray,
}
else
{
- SbxVariable* pSource = pArray->Get32( pActualIndices );
+ SbxVariable* pSource = pArray->Get(pActualIndices);
aElementVal = sbxToUnoValue( pSource, aElemType );
}
@@ -1304,11 +1304,11 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property const * pUn
SbxBaseRef xObj = pVar->GetObject();
if( auto pArray = dynamic_cast<SbxDimArray*>( xObj.get() ) )
{
- sal_Int32 nDims = pArray->GetDims32();
+ sal_Int32 nDims = pArray->GetDims();
// Normal case: One dimensional array
sal_Int32 nLower, nUpper;
- if( nDims == 1 && pArray->GetDim32( 1, nLower, nUpper ) )
+ if (nDims == 1 && pArray->GetDim(1, nLower, nUpper))
{
sal_Int32 nSeqSize = nUpper - nLower + 1;
@@ -1330,7 +1330,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property const * pUn
aIdx[0] = nLower;
for (sal_Int32 i = 0 ; i < nSeqSize; ++i, ++aIdx[0])
{
- SbxVariableRef xVar = pArray->Get32(aIdx);
+ SbxVariableRef xVar = pArray->Get(aIdx);
// Convert the value of Sbx to Uno
Any aAnyValue = sbxToUnoValue( xVar.get(), aElemType );
@@ -1385,7 +1385,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property const * pUn
for(sal_Int32 i = 1 ; i <= nDims ; i++ )
{
sal_Int32 lBound, uBound;
- pArray->GetDim32( i, lBound, uBound );
+ pArray->GetDim(i, lBound, uBound);
sal_Int32 j = i - 1;
pActualIndices[j] = pLowerBounds[j] = lBound;
@@ -1472,7 +1472,7 @@ static void processAutomationParams( SbxArray* pParams, Sequence< Any >& args, s
{
sal_uInt32 iSbx = i + 1;
- aValAny = sbxToUnoValueImpl( pParams->Get32( iSbx ),
+ aValAny = sbxToUnoValueImpl(pParams->Get(iSbx),
bBlockConversionToSmallestType );
OUString aParamName = pNames[iSbx];
@@ -1493,7 +1493,7 @@ static void processAutomationParams( SbxArray* pParams, Sequence< Any >& args, s
{
for( i = 0 ; i < nParamCount ; i++ )
{
- pAnyArgs[i] = sbxToUnoValueImpl(pParams->Get32(i + 1),
+ pAnyArgs[i] = sbxToUnoValueImpl(pParams->Get(i + 1),
bBlockConversionToSmallestType );
}
}
@@ -1541,7 +1541,7 @@ static Any invokeAutomationMethod( const OUString& Name, Sequence< Any > const &
sal_Int16 iTarget = pIndices[ j ];
if( iTarget >= static_cast<sal_Int16>(nParamCount) )
break;
- unoToSbxValue( pParams->Get32(j + 1), pNewValues[ j ] );
+ unoToSbxValue(pParams->Get(j + 1), pNewValues[j]);
}
}
return aRetAny;
@@ -1857,11 +1857,11 @@ static OUString Impl_DumpProperties(SbUnoObject& rUnoObj)
const Property* pUnoProps = props.getConstArray();
SbxArray* pProps = rUnoObj.GetProperties();
- sal_uInt32 nPropCount = pProps->Count32();
+ sal_uInt32 nPropCount = pProps->Count();
sal_uInt32 nPropsPerLine = 1 + nPropCount / 30;
for( sal_uInt32 i = 0; i < nPropCount; i++ )
{
- SbxVariable* pVar = pProps->Get32( i );
+ SbxVariable* pVar = pProps->Get(i);
if( pVar )
{
OUStringBuffer aPropStr;
@@ -1933,7 +1933,7 @@ static OUString Impl_DumpMethods(SbUnoObject& rUnoObj)
const Reference< XIdlMethod >* pUnoMethods = methods.getConstArray();
SbxArray* pMethods = rUnoObj.GetMethods();
- sal_uInt32 nMethodCount = pMethods->Count32();
+ sal_uInt32 nMethodCount = pMethods->Count();
if( !nMethodCount )
{
aRet.append( "\nNo methods found\n" );
@@ -1942,7 +1942,7 @@ static OUString Impl_DumpMethods(SbUnoObject& rUnoObj)
sal_uInt32 nPropsPerLine = 1 + nMethodCount / 30;
for( sal_uInt32 i = 0; i < nMethodCount; i++ )
{
- SbxVariable* pVar = pMethods->Get32( i );
+ SbxVariable* pVar = pMethods->Get(i);
if( pVar )
{
if( (i % nPropsPerLine) == 0 )
@@ -2089,7 +2089,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
try
{
- sal_uInt32 nParamCount = pParams ? (pParams->Count32() - 1) : 0;
+ sal_uInt32 nParamCount = pParams ? (pParams->Count() - 1) : 0;
bool bCanBeConsideredAMethod = mxInvocation->hasMethod( pProp->GetName() );
Any aRetAny;
if ( bCanBeConsideredAMethod && nParamCount )
@@ -2175,7 +2175,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pHint->GetId() == SfxHintId::BasicDataWanted )
{
// number of Parameter -1 because of Param0 == this
- sal_uInt32 nParamCount = pParams ? (pParams->Count32() - 1) : 0;
+ sal_uInt32 nParamCount = pParams ? (pParams->Count() - 1) : 0;
Sequence<Any> args;
bool bOutParams = false;
@@ -2227,7 +2227,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
css::uno::Type aType( rxClass->getTypeClass(), rxClass->getName() );
// ATTENTION: Don't forget for Sbx-Parameter the offset!
- pAnyArgs[i] = sbxToUnoValue( pParams->Get32(i + 1), aType );
+ pAnyArgs[i] = sbxToUnoValue(pParams->Get(i + 1), aType);
// If it is not certain check whether the out-parameter are available.
if( !bOutParams )
@@ -2270,7 +2270,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
const ParamInfo& rInfo = pParamInfos[j];
ParamMode aParamMode = rInfo.aMode;
if( aParamMode != ParamMode_IN )
- unoToSbxValue( pParams->Get32(j + 1), pAnyArgs[ j ] );
+ unoToSbxValue(pParams->Get(j + 1), pAnyArgs[j]);
}
}
}
@@ -2924,14 +2924,14 @@ void createAllObjectProperties( SbxObject* pObj )
void RTL_Impl_CreateUnoStruct( SbxArray& rPar )
{
// We need 1 parameter minimum
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
// get the name of the class of the struct
- OUString aClassName = rPar.Get32(1)->GetOUString();
+ OUString aClassName = rPar.Get(1)->GetOUString();
// try to create Struct with the same name
SbUnoObjectRef xUnoObj = Impl_CreateUnoStruct( aClassName );
@@ -2940,21 +2940,21 @@ void RTL_Impl_CreateUnoStruct( SbxArray& rPar )
return;
}
// return the object
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
refVar->PutObject( xUnoObj.get() );
}
void RTL_Impl_CreateUnoService( SbxArray& rPar )
{
// We need 1 Parameter minimum
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
// get the name of the class of the struct
- OUString aServiceName = rPar.Get32(1)->GetOUString();
+ OUString aServiceName = rPar.Get(1)->GetOUString();
// search for the service and instantiate it
Reference< XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory() );
@@ -2968,7 +2968,7 @@ void RTL_Impl_CreateUnoService( SbxArray& rPar )
implHandleAnyException( ::cppu::getCaughtException() );
}
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
if( xInterface.is() )
{
// Create a SbUnoObject out of it and return it
@@ -2992,15 +2992,15 @@ void RTL_Impl_CreateUnoService( SbxArray& rPar )
void RTL_Impl_CreateUnoServiceWithArguments( SbxArray& rPar )
{
// We need 2 parameter minimum
- if ( rPar.Count32() < 3 )
+ if (rPar.Count() < 3)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
// get the name of the class of the struct
- OUString aServiceName = rPar.Get32(1)->GetOUString();
- Any aArgAsAny = sbxToUnoValue( rPar.Get32(2),
+ OUString aServiceName = rPar.Get(1)->GetOUString();
+ Any aArgAsAny = sbxToUnoValue(rPar.Get(2),
cppu::UnoType<Sequence<Any>>::get() );
Sequence< Any > aArgs;
aArgAsAny >>= aArgs;
@@ -3017,7 +3017,7 @@ void RTL_Impl_CreateUnoServiceWithArguments( SbxArray& rPar )
implHandleAnyException( ::cppu::getCaughtException() );
}
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
if( xInterface.is() )
{
// Create a SbUnoObject out of it and return it
@@ -3040,7 +3040,7 @@ void RTL_Impl_CreateUnoServiceWithArguments( SbxArray& rPar )
void RTL_Impl_GetProcessServiceManager( SbxArray& rPar )
{
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
// get the global service manager
Reference< XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory() );
@@ -3053,7 +3053,7 @@ void RTL_Impl_GetProcessServiceManager( SbxArray& rPar )
void RTL_Impl_HasInterfaces( SbxArray& rPar )
{
// We need 2 parameter minimum
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if( nParCount < 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -3061,11 +3061,11 @@ void RTL_Impl_HasInterfaces( SbxArray& rPar )
}
// variable for the return value
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
refVar->PutBool( false );
// get the Uno-Object
- SbxBaseRef pObj = rPar.Get32( 1 )->GetObject();
+ SbxBaseRef pObj = rPar.Get(1)->GetObject();
auto obj = dynamic_cast<SbUnoObject*>( pObj.get() );
if( obj == nullptr )
{
@@ -3087,7 +3087,7 @@ void RTL_Impl_HasInterfaces( SbxArray& rPar )
for( sal_uInt32 i = 2 ; i < nParCount ; i++ )
{
// get the name of the interface of the struct
- OUString aIfaceName = rPar.Get32( i )->GetOUString();
+ OUString aIfaceName = rPar.Get(i)->GetOUString();
// search for the class
Reference< XIdlClass > xClass = xCoreReflection->forName( aIfaceName );
@@ -3111,18 +3111,18 @@ void RTL_Impl_HasInterfaces( SbxArray& rPar )
void RTL_Impl_IsUnoStruct( SbxArray& rPar )
{
// We need 1 parameter minimum
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
// variable for the return value
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
refVar->PutBool( false );
// get the Uno-Object
- SbxVariableRef xParam = rPar.Get32( 1 );
+ SbxVariableRef xParam = rPar.Get(1);
if( !xParam->IsObject() )
{
return;
@@ -3144,18 +3144,18 @@ void RTL_Impl_IsUnoStruct( SbxArray& rPar )
void RTL_Impl_EqualUnoObjects( SbxArray& rPar )
{
- if ( rPar.Count32() < 3 )
+ if (rPar.Count() < 3)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
// variable for the return value
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
refVar->PutBool( false );
// get the Uno-Objects
- SbxVariableRef xParam1 = rPar.Get32( 1 );
+ SbxVariableRef xParam1 = rPar.Get(1);
if( !xParam1->IsObject() )
{
return;
@@ -3175,7 +3175,7 @@ void RTL_Impl_EqualUnoObjects( SbxArray& rPar )
Reference< XInterface > x1;
aAny1 >>= x1;
- SbxVariableRef xParam2 = rPar.Get32( 2 );
+ SbxVariableRef xParam2 = rPar.Get(2);
if( !xParam2->IsObject() )
{
return;
@@ -3541,7 +3541,7 @@ void SbUnoService::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pUnoCtor && pHint->GetId() == SfxHintId::BasicDataWanted )
{
// Parameter count -1 because of Param0 == this
- sal_uInt32 nParamCount = pParams ? (pParams->Count32() - 1) : 0;
+ sal_uInt32 nParamCount = pParams ? (pParams->Count() - 1) : 0;
Sequence<Any> args;
Reference< XServiceConstructorDescription > xCtor = pUnoCtor->getServiceCtorDesc();
@@ -3572,7 +3572,7 @@ void SbUnoService::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
// Check if first parameter is a context and use it
// then in createInstanceWithArgumentsAndContext
- Any aArg0 = sbxToUnoValue( pParams->Get32( nSbxParameterOffset ) );
+ Any aArg0 = sbxToUnoValue(pParams->Get(nSbxParameterOffset));
if( (aArg0 >>= xFirstParamContext) && xFirstParamContext.is() )
nParameterOffsetByContext = 1;
}
@@ -3624,7 +3624,7 @@ void SbUnoService::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
css::uno::Type aType( xParamTypeDesc->getTypeClass(), xParamTypeDesc->getName() );
// sbx parameter needs offset 1
- pAnyArgs[i] = sbxToUnoValue( pParams->Get32( iSbx ), aType );
+ pAnyArgs[i] = sbxToUnoValue(pParams->Get(iSbx), aType);
// Check for out parameter if not already done
if( !bOutParams && xParam->isOut() )
@@ -3632,7 +3632,7 @@ void SbUnoService::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
}
else
{
- pAnyArgs[i] = sbxToUnoValue( pParams->Get32( iSbx ) );
+ pAnyArgs[i] = sbxToUnoValue(pParams->Get(iSbx));
}
}
}
@@ -3670,7 +3670,7 @@ void SbUnoService::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
continue;
if( xParam->isOut() )
- unoToSbxValue( pParams->Get32(j + 1), pAnyArgs[ j ] );
+ unoToSbxValue(pParams->Get(j + 1), pAnyArgs[j]);
}
}
}
@@ -3735,7 +3735,7 @@ void SbUnoSingleton::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
SbxVariable* pVar = pHint->GetVar();
SbxArray* pParams = pVar->GetParameters();
- sal_uInt32 nParamCount = pParams ? (pParams->Count32() - 1) : 0;
+ sal_uInt32 nParamCount = pParams ? (pParams->Count() - 1) : 0;
sal_uInt32 nAllowedParamCount = 1;
Reference < XComponentContext > xContextToUse;
@@ -3743,7 +3743,7 @@ void SbUnoSingleton::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
// Check if first parameter is a context and use it then
Reference < XComponentContext > xFirstParamContext;
- Any aArg1 = sbxToUnoValue( pParams->Get32( 1 ) );
+ Any aArg1 = sbxToUnoValue(pParams->Get(1));
if( (aArg1 >>= xFirstParamContext) && xFirstParamContext.is() )
xContextToUse = xFirstParamContext;
}
@@ -3831,7 +3831,7 @@ void BasicAllListener_Impl::firing_impl( const AllEventObject& Event, Any* pRet
// Convert elements
SbxVariableRef xVar = new SbxVariable( SbxVARIANT );
unoToSbxValue( xVar.get(), pArgs[i] );
- xSbxArray->Put32( xVar.get(), i + 1 );
+ xSbxArray->Put(xVar.get(), i + 1);
}
pLib->Call( aMethodName, xSbxArray.get() );
@@ -3839,7 +3839,7 @@ void BasicAllListener_Impl::firing_impl( const AllEventObject& Event, Any* pRet
// get the return value from the Param-Array, if requested
if( pRet )
{
- SbxVariable* pVar = xSbxArray->Get32( 0 );
+ SbxVariable* pVar = xSbxArray->Get(0);
if( pVar )
{
// #95792 Avoid a second call
@@ -4021,15 +4021,15 @@ sal_Bool SAL_CALL InvocationToAllListenerMapper::hasProperty(const OUString& Nam
void SbRtl_CreateUnoListener(StarBASIC * pBasic, SbxArray & rPar, bool)
{
// We need 2 parameters
- if ( rPar.Count32() != 3 )
+ if (rPar.Count() != 3)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
// get the name of the class of the struct
- OUString aPrefixName = rPar.Get32(1)->GetOUString();
- OUString aListenerClassName = rPar.Get32(2)->GetOUString();
+ OUString aPrefixName = rPar.Get(1)->GetOUString();
+ OUString aListenerClassName = rPar.Get(2)->GetOUString();
// get the CoreReflection
Reference< XIdlReflection > xCoreReflection = getCoreReflection_Impl();
@@ -4066,10 +4066,10 @@ void SbRtl_CreateUnoListener(StarBASIC * pBasic, SbxArray & rPar, bool)
// #100326 Register listener object to set Parent NULL in Dtor
SbxArrayRef xBasicUnoListeners = pBasic->getUnoListeners();
- xBasicUnoListeners->Insert32( pUnoObj, xBasicUnoListeners->Count32() );
+ xBasicUnoListeners->Insert(pUnoObj, xBasicUnoListeners->Count());
// return the object
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
refVar->PutObject( xAllLst->xSbxObj.get() );
}
@@ -4078,7 +4078,7 @@ void SbRtl_CreateUnoListener(StarBASIC * pBasic, SbxArray & rPar, bool)
// in the Basic runtime system.
void RTL_Impl_GetDefaultContext( SbxArray& rPar )
{
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
Any aContextAny( comphelper::getProcessComponentContext() );
@@ -4092,15 +4092,15 @@ void RTL_Impl_GetDefaultContext( SbxArray& rPar )
void RTL_Impl_CreateUnoValue( SbxArray& rPar )
{
// 2 parameters needed
- if ( rPar.Count32() != 3 )
+ if (rPar.Count() != 3)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
// get the name of the class of the struct
- OUString aTypeName = rPar.Get32(1)->GetOUString();
- SbxVariable* pVal = rPar.Get32(2);
+ OUString aTypeName = rPar.Get(1)->GetOUString();
+ SbxVariable* pVal = rPar.Get(2);
if( aTypeName == "type" )
{
@@ -4132,7 +4132,7 @@ void RTL_Impl_CreateUnoValue( SbxArray& rPar )
if( bSuccess )
{
Any aTypeAny( aType );
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
SbxObjectRef xUnoAnyObject = new SbUnoAnyObject( aTypeAny );
refVar->PutObject( xUnoAnyObject.get() );
}
@@ -4162,7 +4162,7 @@ void RTL_Impl_CreateUnoValue( SbxArray& rPar )
Any aVal = sbxToUnoValueImpl( pVal );
Any aConvertedVal = convertAny( aVal, aDestType );
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
SbxObjectRef xUnoAnyObject = new SbUnoAnyObject( aConvertedVal );
refVar->PutObject( xUnoAnyObject.get() );
}
@@ -4239,7 +4239,7 @@ void SAL_CALL ModuleInvocationProxy::setValue(const OUString& rProperty, const A
SbxArrayRef xArray = new SbxArray;
SbxVariableRef xVar = new SbxVariable( SbxVARIANT );
unoToSbxValue( xVar.get(), rValue );
- xArray->Put32( xVar.get(), 1 );
+ xArray->Put(xVar.get(), 1);
// Call property method
SbxVariableRef xValue = new SbxVariable;
@@ -4339,7 +4339,7 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const OUString& rFunction,
{
SbxVariableRef xVar = new SbxVariable( SbxVARIANT );
unoToSbxValue( xVar.get(), pArgs[i] );
- xArray->Put32( xVar.get(), sal::static_int_cast< sal_uInt16 >(i+1) );
+ xArray->Put(xVar.get(), sal::static_int_cast<sal_uInt16>(i + 1));
}
}
@@ -4463,7 +4463,7 @@ void registerComListenerVariableForBasic( SbxVariable* pVar, StarBASIC* pBasic )
{
StarBasicDisposeItem* pItem = lcl_getOrCreateItemForBasic( pBasic );
SbxArray* pArray = pItem->m_pRegisteredVariables.get();
- pArray->Put32( pVar, pArray->Count32() );
+ pArray->Put(pVar, pArray->Count());
}
void disposeComVariablesForBasic( StarBASIC const * pBasic )
@@ -4475,10 +4475,10 @@ void disposeComVariablesForBasic( StarBASIC const * pBasic )
StarBasicDisposeItem* pItem = *it;
SbxArray* pArray = pItem->m_pRegisteredVariables.get();
- sal_uInt32 nCount = pArray->Count32();
+ sal_uInt32 nCount = pArray->Count();
for( sal_uInt32 i = 0 ; i < nCount ; ++i )
{
- SbxVariable* pVar = pArray->Get32( i );
+ SbxVariable* pVar = pArray->Get(i);
pVar->ClearComListener();
}
@@ -4515,10 +4515,10 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP
bool bSuccess = false;
SbxArray* pModIfaces = pClassData->mxIfaces.get();
- sal_uInt32 nCount = pModIfaces->Count32();
+ sal_uInt32 nCount = pModIfaces->Count();
for( sal_uInt32 i = 0 ; i < nCount ; ++i )
{
- SbxVariable* pVar = pModIfaces->Get32( i );
+ SbxVariable* pVar = pModIfaces->Get(i);
const OUString& aIfaceName = pVar->GetName();
if( !aIfaceName.isEmpty() )
@@ -4771,11 +4771,11 @@ OUString SbUnoStructRefObject::Impl_DumpProperties()
aRet.append("Properties of object ");
aRet.append( getDbgObjectName() );
- sal_uInt32 nPropCount = pProps->Count32();
+ sal_uInt32 nPropCount = pProps->Count();
sal_uInt32 nPropsPerLine = 1 + nPropCount / 30;
for( sal_uInt32 i = 0; i < nPropCount; i++ )
{
- SbxVariable* pVar = pProps->Get32( i );
+ SbxVariable* pVar = pProps->Get(i);
if( pVar )
{
OUStringBuffer aPropStr;
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 5e9647e955a7..cacaa7650357 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -229,7 +229,7 @@ DocObjectWrapper::invoke( const OUString& aFunctionName, const Sequence< Any >&
{
SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT );
unoToSbxValue( xSbxVar.get(), pParams[i] );
- xSbxParams->Put32( xSbxVar.get(), static_cast< sal_uInt32 >( i ) + 1 );
+ xSbxParams->Put(xSbxVar.get(), static_cast<sal_uInt32>(i) + 1);
// Enable passing by ref
if ( xSbxVar->GetType() != SbxVARIANT )
@@ -251,13 +251,13 @@ DocObjectWrapper::invoke( const OUString& aFunctionName, const Sequence< Any >&
if ( pInfo_ )
{
OutParamMap aOutParamMap;
- for ( sal_uInt32 n = 1, nCount = xSbxParams->Count32(); n < nCount; ++n )
+ for (sal_uInt32 n = 1, nCount = xSbxParams->Count(); n < nCount; ++n)
{
assert(n <= std::numeric_limits<sal_uInt16>::max());
const SbxParamInfo* pParamInfo = pInfo_->GetParam( sal::static_int_cast<sal_uInt16>(n) );
if ( pParamInfo && ( pParamInfo->eType & SbxBYREF ) != 0 )
{
- SbxVariable* pVar = xSbxParams->Get32( n );
+ SbxVariable* pVar = xSbxParams->Get(n);
if ( pVar )
{
SbxVariableRef xVar = pVar;
@@ -472,15 +472,15 @@ void SbModule::StartDefinitions()
// methods and properties persist, but they are invalid;
// at least are the information under certain conditions clogged
sal_uInt32 i;
- for( i = 0; i < pMethods->Count32(); i++ )
+ for (i = 0; i < pMethods->Count(); i++)
{
- SbMethod* p = dynamic_cast<SbMethod*>( pMethods->Get32( i ) );
+ SbMethod* p = dynamic_cast<SbMethod*>(pMethods->Get(i));
if( p )
p->bInvalid = true;
}
- for( i = 0; i < pProps->Count32(); )
+ for (i = 0; i < pProps->Count();)
{
- SbProperty* p = dynamic_cast<SbProperty*>( pProps->Get32( i ) );
+ SbProperty* p = dynamic_cast<SbProperty*>(pProps->Get(i));
if( p )
pProps->Remove( i );
else
@@ -503,7 +503,7 @@ SbMethod* SbModule::GetMethod( const OUString& rName, SbxDataType t )
pMeth = new SbMethod( rName, t, this );
pMeth->SetParent( this );
pMeth->SetFlags( SbxFlagBits::Read );
- pMethods->Put32( pMeth, pMethods->Count32() );
+ pMethods->Put(pMeth, pMethods->Count());
StartListening(pMeth->GetBroadcaster(), DuplicateHandling::Prevent);
}
// The method is per default valid, because it could be
@@ -541,7 +541,7 @@ SbProperty* SbModule::GetProperty( const OUString& rName, SbxDataType t )
pProp = new SbProperty( rName, t, this );
pProp->SetFlag( SbxFlagBits::ReadWrite );
pProp->SetParent( this );
- pProps->Put32( pProp, pProps->Count32() );
+ pProps->Put(pProp, pProps->Count());
StartListening(pProp->GetBroadcaster(), DuplicateHandling::Prevent);
}
return pProp;
@@ -560,7 +560,7 @@ void SbModule::GetProcedureProperty( const OUString& rName, SbxDataType t )
pProp = new SbProcedureProperty( rName, t );
pProp->SetFlag( SbxFlagBits::ReadWrite );
pProp->SetParent( this );
- pProps->Put32( pProp, pProps->Count32() );
+ pProps->Put(pProp, pProps->Count());
StartListening(pProp->GetBroadcaster(), DuplicateHandling::Prevent);
}
}
@@ -578,7 +578,7 @@ void SbModule::GetIfaceMapperMethod( const OUString& rName, SbMethod* pImplMeth
pMapperMethod = new SbIfaceMapperMethod( rName, pImplMeth );
pMapperMethod->SetParent( this );
pMapperMethod->SetFlags( SbxFlagBits::Read );
- pMethods->Put32( pMapperMethod, pMethods->Count32() );
+ pMethods->Put(pMapperMethod, pMethods->Count());
}
pMapperMethod->bInvalid = false;
}
@@ -592,9 +592,9 @@ SbIfaceMapperMethod::~SbIfaceMapperMethod()
void SbModule::EndDefinitions( bool bNewState )
{
- for( sal_uInt32 i = 0; i < pMethods->Count32(); )
+ for (sal_uInt32 i = 0; i < pMethods->Count();)
{
- SbMethod* p = dynamic_cast<SbMethod*>( pMethods->Get32( i ) );
+ SbMethod* p = dynamic_cast<SbMethod*>(pMethods->Get(i));
if( p )
{
if( p->bInvalid )
@@ -695,15 +695,15 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
aVals.eType = SbxVARIANT;
SbxArray* pArg = pVar->GetParameters();
- sal_uInt32 nVarParCount = (pArg != nullptr) ? pArg->Count32() : 0;
+ sal_uInt32 nVarParCount = (pArg != nullptr) ? pArg->Count() : 0;
if( nVarParCount > 1 )
{
auto xMethParameters = tools::make_ref<SbxArray>();
- xMethParameters->Put32( pMethVar, 0 ); // Method as parameter 0
+ xMethParameters->Put(pMethVar, 0); // Method as parameter 0
for( sal_uInt32 i = 1 ; i < nVarParCount ; ++i )
{
- SbxVariable* pPar = pArg->Get32( i );
- xMethParameters->Put32( pPar, i );
+ SbxVariable* pPar = pArg->Get(i);
+ xMethParameters->Put(pPar, i);
}
pMethVar->SetParameters( xMethParameters.get() );
@@ -742,8 +742,8 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
// Setup parameters
SbxArrayRef xArray = new SbxArray;
- xArray->Put32( pMethVar, 0 ); // Method as parameter 0
- xArray->Put32( pVar, 1 );
+ xArray->Put(pMethVar, 0); // Method as parameter 0
+ xArray->Put(pVar, 1);
pMethVar->SetParameters( xArray.get() );
SbxValues aVals;
@@ -900,9 +900,9 @@ static void SendHint_( SbxObject* pObj, SfxHintId nId, SbMethod* p )
pObj->GetBroadcaster().Broadcast( SbxHint( nId, p ) );
// Then ask for the subobjects
SbxArray* pObjs = pObj->GetObjects();
- for( sal_uInt32 i = 0; i < pObjs->Count32(); i++ )
+ for (sal_uInt32 i = 0; i < pObjs->Count(); i++)
{
- SbxVariable* pVar = pObjs->Get32( i );
+ SbxVariable* pVar = pObjs->Get(i);
if( dynamic_cast<const SbxObject *>(pVar) != nullptr )
SendHint_( dynamic_cast<SbxObject*>( pVar), nId, p );
}
@@ -945,10 +945,10 @@ static void ClearUnoObjectsInRTL_Impl_Rek( StarBASIC* pBasic )
}
// Go over all Sub-Basics
SbxArray* pObjs = pBasic->GetObjects();
- sal_uInt32 nCount = pObjs->Count32();
+ sal_uInt32 nCount = pObjs->Count();
for( sal_uInt32 i = 0 ; i < nCount ; i++ )
{
- SbxVariable* pObjVar = pObjs->Get32( i );
+ SbxVariable* pObjVar = pObjs->Get(i);
StarBASIC* pSubBasic = dynamic_cast<StarBASIC*>( pObjVar );
if( pSubBasic )
{
@@ -1292,9 +1292,9 @@ void SbModule::RemoveVars()
void SbModule::ClearPrivateVars()
{
- for( sal_uInt32 i = 0 ; i < pProps->Count32() ; i++ )
+ for (sal_uInt32 i = 0; i < pProps->Count(); i++)
{
- SbProperty* p = dynamic_cast<SbProperty*>( pProps->Get32( i ) );
+ SbProperty* p = dynamic_cast<SbProperty*>(pProps->Get(i));
if( p )
{
// Delete not the arrays, only their content
@@ -1303,9 +1303,9 @@ void SbModule::ClearPrivateVars()
SbxArray* pArray = dynamic_cast<SbxArray*>( p->GetObject() );
if( pArray )
{
- for( sal_uInt32 j = 0 ; j < pArray->Count32() ; j++ )
+ for (sal_uInt32 j = 0; j < pArray->Count(); j++)
{
- SbxVariable* pj = pArray->Get32( j );
+ SbxVariable* pj = pArray->Get(j);
pj->SbxValue::Clear();
}
}
@@ -1346,9 +1346,9 @@ void SbModule::implClearIfVarDependsOnDeletedBasic( SbxVariable* pVar, StarBASIC
void SbModule::ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic )
{
- for( sal_uInt32 i = 0 ; i < pProps->Count32() ; i++ )
+ for (sal_uInt32 i = 0; i < pProps->Count(); i++)
{
- SbProperty* p = dynamic_cast<SbProperty*>( pProps->Get32( i ) );
+ SbProperty* p = dynamic_cast<SbProperty*>(pProps->Get(i));
if( p )
{
if( p->GetType() & SbxARRAY )
@@ -1356,9 +1356,9 @@ void SbModule::ClearVarsDependingOnDeletedBasic( StarBASIC* pDeletedBasic )
SbxArray* pArray = dynamic_cast<SbxArray*>( p->GetObject() );
if( pArray )
{
- for( sal_uInt32 j = 0 ; j < pArray->Count32() ; j++ )
+ for (sal_uInt32 j = 0; j < pArray->Count(); j++)
{
- SbxVariable* pVar = pArray->Get32( j );
+ SbxVariable* pVar = pArray->Get(j);
implClearIfVarDependsOnDeletedBasic( pVar, pDeletedBasic );
}
}
@@ -1572,9 +1572,9 @@ SbModule::fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg ) const
{
if ( !pImg )
pImg = pImage;
- for( sal_uInt32 i = 0; i < pMethods->Count32(); i++ )
+ for (sal_uInt32 i = 0; i < pMethods->Count(); i++)
{
- SbMethod* pMeth = dynamic_cast<SbMethod*>( pMethods->Get32(i) );
+ SbMethod* pMeth = dynamic_cast<SbMethod*>(pMethods->Get(i));
if( pMeth )
{
//fixup method start positions
@@ -1798,16 +1798,16 @@ bool SbModule::LoadCompleted()
{
SbxArray* p = GetMethods().get();
sal_uInt32 i;
- for( i = 0; i < p->Count32(); i++ )
+ for (i = 0; i < p->Count(); i++)
{
- SbMethod* q = dynamic_cast<SbMethod*>( p->Get32( i ) );
+ SbMethod* q = dynamic_cast<SbMethod*>(p->Get(i));
if( q )
q->pMod = this;
}
p = GetProperties();
- for( i = 0; i < p->Count32(); i++ )
+ for (i = 0; i < p->Count(); i++)
{
- SbProperty* q = dynamic_cast<SbProperty*>( p->Get32( i ) );
+ SbProperty* q = dynamic_cast<SbProperty*>(p->Get(i));
if( q )
q->pMod = this;
}
@@ -1839,15 +1839,15 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
aVals.eType = SbxVARIANT;
SbxArray* pArg = pVar->GetParameters();
- sal_uInt32 nVarParCount = (pArg != nullptr) ? pArg->Count32() : 0;
+ sal_uInt32 nVarParCount = (pArg != nullptr) ? pArg->Count() : 0;
if( nVarParCount > 1 )
{
SbxArrayRef xMethParameters = new SbxArray;
- xMethParameters->Put32( pMeth, 0 ); // Method as parameter 0
+ xMethParameters->Put(pMeth, 0); // Method as parameter 0
for( sal_uInt32 i = 1 ; i < nVarParCount ; ++i )
{
- SbxVariable* pPar = pArg->Get32( i );
- xMethParameters->Put32( pPar, i );
+ SbxVariable* pPar = pArg->Get(i);
+ xMethParameters->Put(pPar, i);
}
pMeth->SetParameters( xMethParameters.get() );
@@ -1886,8 +1886,8 @@ void SbModule::handleProcedureProperties( SfxBroadcaster& rBC, const SfxHint& rH
{
// Setup parameters
SbxArrayRef xArray = new SbxArray;
- xArray->Put32( pMeth, 0 ); // Method as parameter 0
- xArray->Put32( pVar, 1 );
+ xArray->Put(pMeth, 0); // Method as parameter 0
+ xArray->Put(pVar, 1);
pMeth->SetParameters( xArray.get() );
SbxValues aVals;
@@ -2437,13 +2437,13 @@ void SbUserFormModule::triggerMethod( const OUString& aMethodToRun, Sequence< An
if ( aArguments.hasElements() ) // Setup parameters
{
auto xArray = tools::make_ref<SbxArray>();
- xArray->Put32( pMeth, 0 ); // Method as parameter 0
+ xArray->Put(pMeth, 0); // Method as parameter 0
for ( sal_Int32 i = 0; i < aArguments.getLength(); ++i )
{
auto xSbxVar = tools::make_ref<SbxVariable>( SbxVARIANT );
unoToSbxValue( xSbxVar.get(), aArguments[i] );
- xArray->Put32( xSbxVar.get(), static_cast< sal_uInt32 >( i ) + 1 );
+ xArray->Put(xSbxVar.get(), static_cast<sal_uInt32>(i) + 1);
// Enable passing by ref
if ( xSbxVar->GetType() != SbxVARIANT )
@@ -2456,7 +2456,7 @@ void SbUserFormModule::triggerMethod( const OUString& aMethodToRun, Sequence< An
for ( sal_Int32 i = 0; i < aArguments.getLength(); ++i )
{
- aArguments[i] = sbxToUnoValue( xArray->Get32( static_cast< sal_uInt32 >(i) + 1) );
+ aArguments[i] = sbxToUnoValue(xArray->Get(static_cast<sal_uInt32>(i) + 1));
}
pMeth->SetParameters( nullptr );
}