basctl/source/basicide/baside2.cxx | 13 basctl/source/basicide/baside2b.cxx | 45 - basctl/source/basicide/basobj2.cxx | 6 basctl/source/basicide/basobj3.cxx | 2 basctl/source/basicide/macrodlg.cxx | 4 basic/qa/cppunit/basictest.cxx | 2 basic/source/basmgr/basmgr.cxx | 8 basic/source/classes/eventatt.cxx | 12 basic/source/classes/image.cxx | 20 basic/source/classes/propacc.cxx | 6 basic/source/classes/sb.cxx | 80 +-- basic/source/classes/sbunoobj.cxx | 156 +++--- basic/source/classes/sbxmod.cxx | 92 +-- basic/source/comp/codegen.cxx | 10 basic/source/comp/dim.cxx | 12 basic/source/comp/sbcomp.cxx | 4 basic/source/runtime/dllmgr-none.cxx | 10 basic/source/runtime/dllmgr-x64.cxx | 47 - basic/source/runtime/dllmgr-x86.cxx | 45 - basic/source/runtime/inputbox.cxx | 18 basic/source/runtime/methods.cxx | 816 +++++++++++++++----------------- basic/source/runtime/methods1.cxx | 621 ++++++++++++------------ basic/source/runtime/props.cxx | 498 ++++--------------- basic/source/runtime/runtime.cxx | 162 +++--- basic/source/runtime/stdobj.cxx | 2 basic/source/runtime/stdobj1.cxx | 18 basic/source/sbx/sbxarray.cxx | 60 +- basic/source/sbx/sbxcoll.cxx | 24 basic/source/sbx/sbxexec.cxx | 2 basic/source/sbx/sbxobj.cxx | 42 - basic/source/sbx/sbxstr.cxx | 12 basic/source/sbx/sbxvalue.cxx | 2 basic/source/sbx/sbxvar.cxx | 6 include/basic/sbx.hxx | 38 - sc/source/core/data/validat.cxx | 6 sc/source/core/tool/interpr4.cxx | 24 sc/source/ui/vba/vbaapplication.cxx | 2 scripting/source/basprov/basmodnode.cxx | 8 scripting/source/basprov/basscript.cxx | 6 sw/source/core/doc/docbasic.cxx | 4 sw/source/uibase/docvw/edtwin.cxx | 22 41 files changed, 1348 insertions(+), 1619 deletions(-)
New commits: commit fbaf865ffc5db1ed1094fec608e6b2472437e066 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Mon Mar 8 12:29:39 2021 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Tue Mar 9 13:22:18 2021 +0100 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.kagan...@collabora.com> diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index bf1c17dc03c1..7c8d1ff01610 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -341,9 +341,9 @@ void ModulWindow::BasicExecute() const sal_uInt32 nCurMethodStart = aSel.GetStart().GetPara() + 1; SbMethod* pMethod = nullptr; // first Macro, else blind "Main" (ExtSearch?) - for ( sal_uInt32 nMacro = 0; nMacro < m_xModule->GetMethods()->Count32(); nMacro++ ) + for (sal_uInt32 nMacro = 0; nMacro < m_xModule->GetMethods()->Count(); nMacro++) { - SbMethod* pM = static_cast<SbMethod*>(m_xModule->GetMethods()->Get32( nMacro )); + SbMethod* pM = static_cast<SbMethod*>(m_xModule->GetMethods()->Get(nMacro)); assert(pM && "Method?"); pM->GetLineRange( nStart, nEnd ); if ( nCurMethodStart >= nStart && nCurMethodStart <= nEnd ) @@ -531,9 +531,10 @@ void ModulWindow::ToggleBreakPoint( sal_uInt16 nLine ) GetBreakPoints().InsertSorted( BreakPoint( nLine ) ); if ( StarBASIC::IsRunning() ) { - for ( sal_uInt32 nMethod = 0; nMethod < m_xModule->GetMethods()->Count32(); nMethod++ ) + for (sal_uInt32 nMethod = 0; nMethod < m_xModule->GetMethods()->Count(); nMethod++) { - SbMethod* pMethod = static_cast<SbMethod*>(m_xModule->GetMethods()->Get32( nMethod )); + SbMethod* pMethod + = static_cast<SbMethod*>(m_xModule->GetMethods()->Get(nMethod)); assert(pMethod && "Method not found! (NULL)"); pMethod->SetDebugFlags( pMethod->GetDebugFlags() | BasicDebugFlags::Break ); } @@ -1300,9 +1301,9 @@ void ModulWindow::BasicStarted() { rList.ResetHitCount(); rList.SetBreakPointsInBasic( m_xModule.get() ); - for ( sal_uInt32 nMethod = 0; nMethod < m_xModule->GetMethods()->Count32(); nMethod++ ) + for (sal_uInt32 nMethod = 0; nMethod < m_xModule->GetMethods()->Count(); nMethod++) { - SbMethod* pMethod = static_cast<SbMethod*>(m_xModule->GetMethods()->Get32( nMethod )); + SbMethod* pMethod = static_cast<SbMethod*>(m_xModule->GetMethods()->Get(nMethod)); assert(pMethod && "Method not found! (NULL)"); pMethod->SetDebugFlags( pMethod->GetDebugFlags() | BasicDebugFlags::Break ); } diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index a420949e4584..f2ace93d299c 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -676,11 +676,11 @@ void EditorWindow::HandleAutoCorrect() { //autocorrect procedures SbxArray* pArr = rModulWindow.GetSbModule()->GetMethods().get(); - for( sal_uInt32 i=0; i < pArr->Count32(); ++i ) + for (sal_uInt32 i = 0; i < pArr->Count(); ++i) { - if( pArr->Get32(i)->GetName().equalsIgnoreAsciiCase( sStr ) ) + if (pArr->Get(i)->GetName().equalsIgnoreAsciiCase(sStr)) { - sStr = pArr->Get32(i)->GetName(); //if found, get the correct case + sStr = pArr->Get(i)->GetName(); //if found, get the correct case pEditEngine->ReplaceText( sTextSelection, sStr ); pEditView->SetSelection( aSel ); return; @@ -1144,9 +1144,9 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) OUString EditorWindow::GetActualSubName( sal_uLong nLine ) { SbxArrayRef pMethods = rModulWindow.GetSbModule()->GetMethods(); - 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 ) { sal_uInt16 l1,l2; @@ -1892,9 +1892,9 @@ void StackWindow::UpdateCalls() { aEntry.append("("); // 0 is the sub's name... - for ( sal_uInt32 nParam = 1; nParam < pParams->Count32(); nParam++ ) + for (sal_uInt32 nParam = 1; nParam < pParams->Count(); nParam++) { - SbxVariable* pVar = pParams->Get32( nParam ); + SbxVariable* pVar = pParams->Get(nParam); assert(pVar && "Parameter?!"); if ( !pVar->GetName().isEmpty() ) { @@ -1919,7 +1919,7 @@ void StackWindow::UpdateCalls() { aEntry.append(pVar->GetOUString()); } - if ( nParam < ( pParams->Count32() - 1 ) ) + if (nParam < (pParams->Count() - 1)) { aEntry.append(", "); } @@ -2059,11 +2059,10 @@ EditorWindow::GetComponentInterface(bool bCreate) static sal_uInt32 getCorrectedPropCount(SbxArray* p) { - sal_uInt32 nPropCount = p->Count32(); - if (nPropCount >= 3 - && p->Get32(nPropCount - 1)->GetName().equalsIgnoreAsciiCase("Dbg_Methods") - && p->Get32(nPropCount - 2)->GetName().equalsIgnoreAsciiCase("Dbg_Properties") - && p->Get32(nPropCount - 3)->GetName().equalsIgnoreAsciiCase("Dbg_SupportedInterfaces")) + sal_uInt32 nPropCount = p->Count(); + if (nPropCount >= 3 && p->Get(nPropCount - 1)->GetName().equalsIgnoreAsciiCase("Dbg_Methods") + && p->Get(nPropCount - 2)->GetName().equalsIgnoreAsciiCase("Dbg_Properties") + && p->Get(nPropCount - 3)->GetName().equalsIgnoreAsciiCase("Dbg_SupportedInterfaces")) { nPropCount -= 3; } @@ -2100,7 +2099,7 @@ IMPL_LINK(WatchWindow, RequestingChildrenHdl, const weld::TreeIter&, rParent, bo for( sal_uInt32 i = 0 ; i < nPropCount ; ++i ) { - SbxVariable* pVar = pProps->Get32( i ); + SbxVariable* pVar = pProps->Get(i); pItem->maMemberList.push_back(pVar->GetName()); OUString const& rName = pItem->maMemberList.back(); @@ -2126,7 +2125,7 @@ IMPL_LINK(WatchWindow, RequestingChildrenHdl, const weld::TreeIter&, rParent, bo int nParentLevel = bArrayIsRootArray ? pItem->nDimLevel : 0; int nThisLevel = nParentLevel + 1; sal_Int32 nMin, nMax; - if (pArray->GetDim32(nThisLevel, nMin, nMax)) + if (pArray->GetDim(nThisLevel, nMin, nMax)) { for (sal_Int32 i = nMin; i <= nMax; i++) { @@ -2213,7 +2212,7 @@ SbxBase* WatchWindow::ImplGetSBXForEntry(const weld::TreeIter& rEntry, bool& rbA { rbArrayElement = true; if( pParentItem->nDimLevel + 1 == pParentItem->nDimCount ) - pSBX = pArray->Get32(pItem->vIndices.empty() ? nullptr : &*pItem->vIndices.begin()); + pSBX = pArray->Get(pItem->vIndices.empty() ? nullptr : &*pItem->vIndices.begin()); } } else @@ -2326,7 +2325,7 @@ OUString implCreateTypeStringForDimArray( WatchItem* pItem, SbxDataType eType ) for( int i = nDimLevel ; i < nDims ; i++ ) { sal_Int32 nMin, nMax; - pArray->GetDim32( sal::static_int_cast<sal_Int32>( i+1 ), nMin, nMax ); + pArray->GetDim(sal::static_int_cast<sal_Int32>(i + 1), nMin, nMax); aRetStr += OUString::number(nMin) + " to " + OUString::number(nMax); if( i < nDims - 1 ) aRetStr += ", "; @@ -2398,8 +2397,8 @@ void WatchWindow::UpdateWatches(bool bBasicStopped) { // Compare Array dimensions to see if array has changed // Can be a copy, so comparing pointers does not work - sal_Int32 nOldDims = pOldArray->GetDims32(); - sal_Int32 nNewDims = pNewArray->GetDims32(); + sal_Int32 nOldDims = pOldArray->GetDims(); + sal_Int32 nNewDims = pNewArray->GetDims(); if( nOldDims != nNewDims ) { bArrayChanged = true; @@ -2411,8 +2410,8 @@ void WatchWindow::UpdateWatches(bool bBasicStopped) sal_Int32 nOldMin, nOldMax; sal_Int32 nNewMin, nNewMax; - pOldArray->GetDim32( i+1, nOldMin, nOldMax ); - pNewArray->GetDim32( i+1, nNewMin, nNewMax ); + pOldArray->GetDim(i + 1, nOldMin, nOldMax); + pNewArray->GetDim(i + 1, nNewMin, nNewMax); if( nOldMin != nNewMin || nOldMax != nNewMax ) { bArrayChanged = true; @@ -2433,7 +2432,7 @@ void WatchWindow::UpdateWatches(bool bBasicStopped) eEnableChildren = TRISTATE_TRUE; pItem->mpArray = pNewArray; - sal_Int32 nDims = pNewArray->GetDims32(); + sal_Int32 nDims = pNewArray->GetDims(); pItem->nDimLevel = 0; pItem->nDimCount = nDims; } @@ -2461,7 +2460,7 @@ void WatchWindow::UpdateWatches(bool bBasicStopped) bCollapse = pItem->maMemberList.size() != nPropCount; for( sal_uInt32 i = 0 ; !bCollapse && i < nPropCount ; i++ ) { - SbxVariable* pVar_ = pProps->Get32( i ); + SbxVariable* pVar_ = pProps->Get(i); if( pItem->maMemberList[i] != pVar_->GetName() ) bCollapse = true; } diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index b302c8b9493c..9748b24ccd2f 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -379,11 +379,11 @@ Sequence< OUString > GetMethodNames( const ScriptDocument& rDocument, const OUSt pMod = xModule.get(); } - sal_uInt32 nCount = pMod->GetMethods()->Count32(); + sal_uInt32 nCount = pMod->GetMethods()->Count(); sal_uInt32 nRealCount = nCount; for ( sal_uInt32 i = 0; i < nCount; i++ ) { - SbMethod* pMethod = static_cast<SbMethod*>(pMod->GetMethods()->Get32( i )); + SbMethod* pMethod = static_cast<SbMethod*>(pMod->GetMethods()->Get(i)); if( pMethod->IsHidden() ) --nRealCount; } @@ -392,7 +392,7 @@ Sequence< OUString > GetMethodNames( const ScriptDocument& rDocument, const OUSt sal_uInt32 iTarget = 0; for ( sal_uInt32 i = 0 ; i < nCount; ++i ) { - SbMethod* pMethod = static_cast<SbMethod*>(pMod->GetMethods()->Get32( i )); + SbMethod* pMethod = static_cast<SbMethod*>(pMod->GetMethods()->Get(i)); if( pMethod->IsHidden() ) continue; SAL_WARN_IF( !pMethod, "basctl.basicide","Method not found! (NULL)" ); diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx index f71bbb206378..fa7c2fc3d220 100644 --- a/basctl/source/basicide/basobj3.cxx +++ b/basctl/source/basicide/basobj3.cxx @@ -74,7 +74,7 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName ) OUString aMacroName( rMacroName ); if ( aMacroName.isEmpty() ) { - if ( !pModule->GetMethods()->Count32() ) + if (!pModule->GetMethods()->Count()) aMacroName = "Main" ; else { diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 24cb210ea7e3..511abf83591e 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -479,10 +479,10 @@ IMPL_LINK_NOARG(MacroChooser, BasicSelectHdl, weld::TreeView&, void) m_xMacroBox->freeze(); - sal_uInt32 nMacroCount = pModule->GetMethods()->Count32(); + sal_uInt32 nMacroCount = pModule->GetMethods()->Count(); for ( sal_uInt32 iMeth = 0; iMeth < nMacroCount; iMeth++ ) { - SbMethod* pMethod = static_cast<SbMethod*>(pModule->GetMethods()->Get32( iMeth )); + SbMethod* pMethod = static_cast<SbMethod*>(pModule->GetMethods()->Get(iMeth)); assert(pMethod && "Method not found!"); if (pMethod->IsHidden()) continue; diff --git a/basic/qa/cppunit/basictest.cxx b/basic/qa/cppunit/basictest.cxx index 414f51a39adb..8cf9812d5212 100644 --- a/basic/qa/cppunit/basictest.cxx +++ b/basic/qa/cppunit/basictest.cxx @@ -84,7 +84,7 @@ SbxVariableRef MacroSnippet::Run( const css::uno::Sequence< css::uno::Any >& rAr { SbxVariable* pVar = new SbxVariable(); unoToSbxValue( pVar, rArgs[ i ] ); - aArgs->Put32( pVar, i + 1 ); + aArgs->Put(pVar, i + 1); } pMeth->SetParameters( aArgs.get() ); } diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 881deabd75e1..41882928a81d 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1836,10 +1836,10 @@ sal_Bool DialogContainer_Impl::hasElements() { bool bRet = false; - sal_Int32 nCount = mpLib->GetObjects()->Count32(); + sal_Int32 nCount = mpLib->GetObjects()->Count(); for( sal_Int32 nObj = 0; nObj < nCount ; nObj++ ) { - SbxVariable* pVar = mpLib->GetObjects()->Get32( nObj ); + SbxVariable* pVar = mpLib->GetObjects()->Get( nObj ); SbxObject* pObj = dynamic_cast<SbxObject*>(pVar); if ( pObj && (pObj->GetSbxId() == SBXID_DIALOG ) ) { @@ -1870,14 +1870,14 @@ uno::Any DialogContainer_Impl::getByName( const OUString& aName ) uno::Sequence< OUString > DialogContainer_Impl::getElementNames() { - sal_Int32 nCount = mpLib->GetObjects()->Count32(); + sal_Int32 nCount = mpLib->GetObjects()->Count(); uno::Sequence< OUString > aRetSeq( nCount ); OUString* pRetSeq = aRetSeq.getArray(); sal_Int32 nDialogCounter = 0; for( sal_Int32 nObj = 0; nObj < nCount ; nObj++ ) { - SbxVariable* pVar = mpLib->GetObjects()->Get32( nObj ); + SbxVariable* pVar = mpLib->GetObjects()->Get( nObj ); SbxObject* pObj = dynamic_cast<SbxObject*> (pVar); if ( pObj && ( pObj->GetSbxId() == SBXID_DIALOG ) ) { 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 ); } diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index f821c15aece6..565fafe6c079 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -165,7 +165,7 @@ void SbiCodeGen::Save() SbxVariable* pIfaceVar = new SbxVariable( SbxVARIANT ); pIfaceVar->SetName( rIfaceName ); SbxArray* pIfaces = rMod.pClassData->mxIfaces.get(); - pIfaces->Insert32( pIfaceVar, pIfaces->Count32() ); + pIfaces->Insert( pIfaceVar, pIfaces->Count() ); } } @@ -372,16 +372,16 @@ void SbiCodeGen::Save() p->AddString( pPool->Find( i ) ); } // Insert types - sal_uInt32 nCount = pParser->rTypeArray->Count32(); + sal_uInt32 nCount = pParser->rTypeArray->Count(); for (i = 0; i < nCount; i++) { - p->AddType(static_cast<SbxObject *>(pParser->rTypeArray->Get32(i))); + p->AddType(static_cast<SbxObject *>(pParser->rTypeArray->Get(i))); } // Insert enum objects - nCount = pParser->rEnumArray->Count32(); + nCount = pParser->rEnumArray->Count(); for (i = 0; i < nCount; i++) { - p->AddEnum(static_cast<SbxObject *>(pParser->rEnumArray->Get32(i))); + p->AddEnum(static_cast<SbxObject *>(pParser->rEnumArray->Get(i))); } if( !p->IsError() ) { diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index e95e8ee88054..20396cd729ad 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -641,12 +641,12 @@ void SbiParser::DefType() } else if ( !bCompatible ) ub += nBase; - pArray->AddDim32( lb, ub ); + pArray->AddDim(lb, ub); } pArray->setHasFixedSize( true ); } else - pArray->unoAddDim32( 0, -1 ); // variant array + pArray->unoAddDim(0, -1); // variant array SbxFlagBits nSavFlags = pTypeElem->GetFlags(); // need to reset the FIXED flag // when calling PutObject ( because the type will not match Object ) @@ -669,7 +669,7 @@ void SbiParser::DefType() } } } - pTypeMembers->Insert32( pTypeElem, pTypeMembers->Count32() ); + pTypeMembers->Insert(pTypeElem, pTypeMembers->Count()); } } } @@ -677,7 +677,7 @@ void SbiParser::DefType() pType->Remove( "Name", SbxClassType::DontCare ); pType->Remove( "Parent", SbxClassType::DontCare ); - rTypeArray->Insert32 (pType,rTypeArray->Count32()); + rTypeArray->Insert(pType, rTypeArray->Count()); } @@ -801,14 +801,14 @@ void SbiParser::DefEnum( bool bPrivate ) pEnumElem->PutLong( nCurrentEnumValue ); pEnumElem->ResetFlag( SbxFlagBits::Write ); pEnumElem->SetFlag( SbxFlagBits::Const ); - pEnumMembers->Insert32( pEnumElem, pEnumMembers->Count32() ); + pEnumMembers->Insert(pEnumElem, pEnumMembers->Count()); } } pEnum->Remove( "Name", SbxClassType::DontCare ); pEnum->Remove( "Parent", SbxClassType::DontCare ); - rEnumArray->Insert32( pEnum, rEnumArray->Count32() ); + rEnumArray->Insert(pEnum, rEnumArray->Count()); } diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index bc8db7e3442a..1a6a52b22850 100644 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -62,9 +62,9 @@ bool SbModule::Compile() pBasic->ClearAllModuleVars(); RemoveVars(); // remove 'this' Modules variables // clear all method statics - for( sal_uInt32 i = 0; i < pMethods->Count32(); i++ ) + for (sal_uInt32 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->ClearStatics(); } diff --git a/basic/source/runtime/dllmgr-none.cxx b/basic/source/runtime/dllmgr-none.cxx index f5d48930745c..30070977d215 100644 --- a/basic/source/runtime/dllmgr-none.cxx +++ b/basic/source/runtime/dllmgr-none.cxx @@ -40,9 +40,9 @@ ErrCode returnInt64InOutArg(SbxArray *pArgs, SbxVariable &rRetVal, { if (!rRetVal.PutLong(1) && !rRetVal.PutInteger(1)) return ERRCODE_BASIC_BAD_ARGUMENT; - if (!pArgs || pArgs->Count32() != 2) + if (!pArgs || pArgs->Count() != 2) return ERRCODE_BASIC_BAD_ARGUMENT; - SbxVariable *pOut = pArgs->Get32(1); + SbxVariable* pOut = pArgs->Get(1); if (!pOut) return ERRCODE_BASIC_BAD_ARGUMENT; if (pOut->IsCurrency()) @@ -59,10 +59,10 @@ ErrCode returnInt64InOutArg(SbxArray *pArgs, SbxVariable &rRetVal, // We expect two Longs but other mappings could be possible too. SbxArray* pProps = pObj->GetProperties(); - if (pProps->Count32() != 2) + if (pProps->Count() != 2) return ERRCODE_BASIC_BAD_ARGUMENT; - SbxVariable* pLow = pProps->Get32( 0 ); - SbxVariable* pHigh = pProps->Get32( 1 ); + SbxVariable* pLow = pProps->Get(0); + SbxVariable* pHigh = pProps->Get(1); if (!pLow || !pLow->IsLong() || !pHigh || !pHigh->IsLong()) return ERRCODE_BASIC_BAD_ARGUMENT; diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx index 46f7fec3d204..bbffbe51f6c8 100644 --- a/basic/source/runtime/dllmgr-x64.cxx +++ b/basic/source/runtime/dllmgr-x64.cxx @@ -162,8 +162,9 @@ std::size_t alignment(SbxVariable const * variable) { SbxObject* pobj = dynamic_cast<SbxObject*>(variable->GetObject()); assert(pobj); SbxArray* props = pobj->GetProperties(); - for (sal_uInt32 i = 0; i < props->Count32(); ++i) { - n = std::max(n, alignment(props->Get32(i))); + for (sal_uInt32 i = 0; i < props->Count(); ++i) + { + n = std::max(n, alignment(props->Get(i))); } return n; } @@ -177,13 +178,13 @@ std::size_t alignment(SbxVariable const * variable) { } else { SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() ); assert(arr); - sal_Int32 dims = arr->GetDims32(); + sal_Int32 dims = arr->GetDims(); std::vector< sal_Int32 > low(dims); for (sal_Int32 i = 0; i < dims; ++i) { sal_Int32 up; - arr->GetDim32(i + 1, low[i], up); + arr->GetDim(i + 1, low[i], up); } - return alignment(arr->Get32(low.data())); + return alignment(arr->Get(low.data())); } } @@ -215,8 +216,9 @@ ErrCode marshalStruct( SbxObject* pobj = dynamic_cast<SbxObject*>(variable->GetObject()); assert(pobj); SbxArray* props = pobj->GetProperties(); - for (sal_uInt32 i = 0; i < props->Count32(); ++i) { - ErrCode e = marshal(false, props->Get32(i), false, blob, offset, data); + for (sal_uInt32 i = 0; i < props->Count(); ++i) + { + ErrCode e = marshal(false, props->Get(i), false, blob, offset, data); if (e != ERRCODE_NONE) { return e; } @@ -231,15 +233,14 @@ ErrCode marshalArray( assert(variable != nullptr); SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() ); assert(arr); - sal_Int32 dims = arr->GetDims32(); + sal_Int32 dims = arr->GetDims(); std::vector< sal_Int32 > low(dims); std::vector< sal_Int32 > up(dims); for (sal_Int32 i = 0; i < dims; ++i) { - arr->GetDim32(i + 1, low[i], up[i]); + arr->GetDim(i + 1, low[i], up[i]); } for (std::vector< sal_Int32 > idx = low;;) { - ErrCode e = marshal( - false, arr->Get32(idx.data()), false, blob, offset, data); + ErrCode e = marshal(false, arr->Get(idx.data()), false, blob, offset, data); if (e != ERRCODE_NONE) { return e; } @@ -409,8 +410,9 @@ void const * unmarshal(SbxVariable * variable, void const * data) { SbxObject* pobj = dynamic_cast<SbxObject*>(variable->GetObject()); assert(pobj); SbxArray* props = pobj->GetProperties(); - for (sal_uInt32 i = 0; i < props->Count32(); ++i) { - data = unmarshal(props->Get32(i), data); + for (sal_uInt32 i = 0; i < props->Count(); ++i) + { + data = unmarshal(props->Get(i), data); } break; } @@ -427,14 +429,14 @@ void const * unmarshal(SbxVariable * variable, void const * data) { } else { SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() ); assert(arr); - sal_Int32 dims = arr->GetDims32(); + sal_Int32 dims = arr->GetDims(); std::vector< sal_Int32 > low(dims); std::vector< sal_Int32 > up(dims); for (sal_Int32 i = 0; i < dims; ++i) { - arr->GetDim32(i + 1, low[i], up[i]); + arr->GetDim(i + 1, low[i], up[i]); } for (std::vector< sal_Int32 > idx = low;;) { - data = unmarshal(arr->Get32(idx.data()), data); + data = unmarshal(arr->Get(idx.data()), data); sal_Int32 i = dims - 1; while (idx[i] == up[i]) { idx[i] = low[i]; @@ -482,7 +484,7 @@ ErrCode call( OUString const & dll, ProcData const & proc, SbxArray * arguments, SbxVariable & result) { - if (arguments && arguments->Count32() > 20) + if (arguments && arguments->Count() > 20) return ERRCODE_BASIC_NOT_IMPLEMENTED; std::vector< char > stack; @@ -495,9 +497,9 @@ ErrCode call( bool special = dll.equalsIgnoreAsciiCase("KERNEL32.DLL") && (proc.name == OString("GetLogicalDriveStringsA")); - for (sal_uInt32 i = 1; i < (arguments == nullptr ? 0 : arguments->Count32()); ++i) { - ErrCode e = marshal( - true, arguments->Get32(i), special && i == 2, stack, stack.size(), + for (sal_uInt32 i = 1; i < (arguments == nullptr ? 0 : arguments->Count()); ++i) + { + ErrCode e = marshal(true, arguments->Get(i), special && i == 2, stack, stack.size(), data); if (e != ERRCODE_NONE) { return e; @@ -619,8 +621,9 @@ ErrCode call( assert(false); break; } - for (sal_uInt32 i = 1; i < (arguments == nullptr ? 0 : arguments->Count32()); ++i) { - arguments->Get32(i)->ResetFlag(SbxFlagBits::Reference); + for (sal_uInt32 i = 1; i < (arguments == nullptr ? 0 : arguments->Count()); ++i) + { + arguments->Get(i)->ResetFlag(SbxFlagBits::Reference); //TODO: skipped for errors?!? } for (auto const& elem : data.unmarshal) diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx index f07495949dff..93e5c2bf533f 100644 --- a/basic/source/runtime/dllmgr-x86.cxx +++ b/basic/source/runtime/dllmgr-x86.cxx @@ -169,8 +169,9 @@ std::size_t alignment(SbxVariable * variable) { SbxObject* pobj = dynamic_cast<SbxObject*>(variable->GetObject()); assert(pobj); SbxArray* props = pobj->GetProperties(); - for (sal_uInt32 i = 0; i < props->Count32(); ++i) { - n = std::max(n, alignment(props->Get32(i))); + for (sal_uInt32 i = 0; i < props->Count(); ++i) + { + n = std::max(n, alignment(props->Get(i))); } return n; } @@ -184,13 +185,13 @@ std::size_t alignment(SbxVariable * variable) { } else { SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() ); assert(arr); - sal_Int32 dims = arr->GetDims32(); + sal_Int32 dims = arr->GetDims(); std::vector< sal_Int32 > low(dims); for (sal_Int32 i = 0; i < dims; ++i) { sal_Int32 up; - arr->GetDim32(i + 1, low[i], up); + arr->GetDim(i + 1, low[i], up); } - return alignment(arr->Get32(&low[0])); + return alignment(arr->Get(&low[0])); } } @@ -223,8 +224,9 @@ ErrCode marshalStruct( SbxObject* pobj = dynamic_cast<SbxObject*>(variable->GetObject()); assert(pobj); SbxArray* props = pobj->GetProperties(); - for (sal_uInt32 i = 0; i < props->Count32(); ++i) { - ErrCode e = marshal(false, props->Get32(i), false, blob, offset, data); + for (sal_uInt32 i = 0; i < props->Count(); ++i) + { + ErrCode e = marshal(false, props->Get(i), false, blob, offset, data); if (e != ERRCODE_NONE) { return e; } @@ -239,15 +241,14 @@ ErrCode marshalArray( assert(variable != 0); SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() ); assert(arr); - sal_Int32 dims = arr->GetDims32(); + sal_Int32 dims = arr->GetDims(); std::vector< sal_Int32 > low(dims); std::vector< sal_Int32 > up(dims); for (sal_Int32 i = 0; i < dims; ++i) { - arr->GetDim32(i + 1, low[i], up[i]); + arr->GetDim(i + 1, low[i], up[i]); } for (std::vector< sal_Int32 > idx = low;;) { - ErrCode e = marshal( - false, arr->Get32(&idx[0]), false, blob, offset, data); + ErrCode e = marshal(false, arr->Get(&idx[0]), false, blob, offset, data); if (e != ERRCODE_NONE) { return e; } @@ -417,8 +418,9 @@ void const * unmarshal(SbxVariable * variable, void const * data) { SbxObject* pobj = dynamic_cast<SbxObject*>(variable->GetObject()); assert(pobj); SbxArray* props = pobj->GetProperties(); - for (sal_uInt32 i = 0; i < props->Count32(); ++i) { - data = unmarshal(props->Get32(i), data); + for (sal_uInt32 i = 0; i < props->Count(); ++i) + { + data = unmarshal(props->Get(i), data); } break; } @@ -435,14 +437,14 @@ void const * unmarshal(SbxVariable * variable, void const * data) { } else { SbxDimArray * arr = dynamic_cast<SbxDimArray*>( variable->GetObject() ); assert(arr); - sal_Int32 dims = arr->GetDims32(); + sal_Int32 dims = arr->GetDims(); std::vector< sal_Int32 > low(dims); std::vector< sal_Int32 > up(dims); for (sal_Int32 i = 0; i < dims; ++i) { - arr->GetDim32(i + 1, low[i], up[i]); + arr->GetDim(i + 1, low[i], up[i]); } for (std::vector< sal_Int32 > idx = low;;) { - data = unmarshal(arr->Get32(&idx[0]), data); + data = unmarshal(arr->Get(&idx[0]), data); sal_Int32 i = dims - 1; while (idx[i] == up[i]) { idx[i] = low[i]; @@ -498,9 +500,9 @@ ErrCode call( // require similar treatment, too: bool special = dll.equalsIgnoreAsciiCase("KERNEL32.DLL") && (proc.name == OString("GetLogicalDriveStringsA")); - for (sal_uInt32 i = 1; i < (arguments == 0 ? 0 : arguments->Count32()); ++i) { - ErrCode e = marshal( - true, arguments->Get32(i), special && i == 2, stack, stack.size(), + for (sal_uInt32 i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) + { + ErrCode e = marshal(true, arguments->Get(i), special && i == 2, stack, stack.size(), data); if (e != ERRCODE_NONE) { return e; @@ -559,8 +561,9 @@ ErrCode call( assert(false); break; } - for (sal_uInt32 i = 1; i < (arguments == 0 ? 0 : arguments->Count32()); ++i) { - arguments->Get32(i)->ResetFlag(SbxFlagBits::Reference); + for (sal_uInt32 i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) + { + arguments->Get(i)->ResetFlag(SbxFlagBits::Reference); //TODO: skipped for errors?!? } for (auto& rUnmarshalData : data.unmarshal) diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx index bf21aea13ce4..50b19ee51273 100644 --- a/basic/source/runtime/inputbox.cxx +++ b/basic/source/runtime/inputbox.cxx @@ -110,7 +110,7 @@ IMPL_LINK_NOARG( SvRTLInputBox, CancelHdl, weld::Button&, void ) void SbRtl_InputBox(StarBASIC *, SbxArray & rPar, bool) { - sal_uInt32 nArgCount = rPar.Count32(); + sal_uInt32 nArgCount = rPar.Count(); if ( nArgCount < 2 ) StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); else @@ -118,11 +118,11 @@ void SbRtl_InputBox(StarBASIC *, SbxArray & rPar, bool) OUString aTitle; OUString aDefault; sal_Int32 nX = -1, nY = -1; // center - const OUString& rPrompt = rPar.Get32(1)->GetOUString(); - if ( nArgCount > 2 && !rPar.Get32(2)->IsErr() ) - aTitle = rPar.Get32(2)->GetOUString(); - if ( nArgCount > 3 && !rPar.Get32(3)->IsErr() ) - aDefault = rPar.Get32(3)->GetOUString(); + const OUString& rPrompt = rPar.Get(1)->GetOUString(); + if (nArgCount > 2 && !rPar.Get(2)->IsErr()) + aTitle = rPar.Get(2)->GetOUString(); + if (nArgCount > 3 && !rPar.Get(3)->IsErr()) + aDefault = rPar.Get(3)->GetOUString(); if ( nArgCount > 4 ) { if ( nArgCount != 6 ) @@ -130,13 +130,13 @@ void SbRtl_InputBox(StarBASIC *, SbxArray & rPar, bool) StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } - nX = rPar.Get32(4)->GetLong(); - nY = rPar.Get32(5)->GetLong(); + nX = rPar.Get(4)->GetLong(); + nY = rPar.Get(5)->GetLong(); } vcl::Window* pParent = Application::GetDefDialogParent(); SvRTLInputBox aDlg(pParent ? pParent->GetFrameWeld() : nullptr,rPrompt,aTitle,aDefault,nX,nY); aDlg.run(); - rPar.Get32(0)->PutString(aDlg.GetText()); + rPar.Get(0)->PutString(aDlg.GetText()); } } diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index d8c0c3f9a583..2e2311078a67 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -175,7 +175,7 @@ static uno::Reference< ucb::XSimpleFileAccess3 > const & getFileAccess() void SbRtl_CreateObject(StarBASIC * pBasic, SbxArray & rPar, bool) { - OUString aClass( rPar.Get32(1)->GetOUString() ); + OUString aClass(rPar.Get(1)->GetOUString()); SbxObjectRef p = SbxBase::CreateObject( aClass ); if( !p.is() ) StarBASIC::Error( ERRCODE_BASIC_CANNOT_LOAD ); @@ -183,7 +183,7 @@ void SbRtl_CreateObject(StarBASIC * pBasic, SbxArray & rPar, bool) { // Convenience: enter BASIC as parent p->SetParent( pBasic ); - rPar.Get32(0)->PutObject( p.get() ); + rPar.Get(0)->PutObject(p.get()); } } @@ -198,14 +198,14 @@ void SbRtl_Error(StarBASIC * pBasic, SbxArray & rPar, bool) OUString aErrorMsg; ErrCode nErr = ERRCODE_NONE; sal_Int32 nCode = 0; - if( rPar.Count32() == 1 ) + if (rPar.Count() == 1) { nErr = StarBASIC::GetErrBasic(); aErrorMsg = StarBASIC::GetErrorMsg(); } else { - nCode = rPar.Get32(1)->GetLong(); + nCode = rPar.Get(1)->GetLong(); if( nCode > 65535 ) { StarBASIC::Error( ERRCODE_BASIC_CONVERSION ); @@ -230,7 +230,7 @@ void SbRtl_Error(StarBASIC * pBasic, SbxArray & rPar, bool) // If this rtlfunc 'Error' passed an errcode the same as the active Err Objects's // current err then return the description for the error message if it is set // ( complicated isn't it ? ) - if ( bVBA && rPar.Count32() > 1 ) + if (bVBA && rPar.Count() > 1) { uno::Reference< ooo::vba::XErrObject > xErrObj( SbxErrObject::getUnoErrObject() ); if ( xErrObj.is() && xErrObj->getNumber() == nCode && !xErrObj->getDescription().isEmpty() ) @@ -238,7 +238,7 @@ void SbRtl_Error(StarBASIC * pBasic, SbxArray & rPar, bool) tmpErrMsg = xErrObj->getDescription(); } } - rPar.Get32(0)->PutString( tmpErrMsg ); + rPar.Get(0)->PutString(tmpErrMsg); } } @@ -246,86 +246,86 @@ void SbRtl_Error(StarBASIC * pBasic, SbxArray & rPar, bool) void SbRtl_Sin(StarBASIC *, SbxArray & rPar, bool) { - if ( rPar.Count32() < 2 ) + if (rPar.Count() < 2) StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); else { - SbxVariableRef pArg = rPar.Get32(1); - rPar.Get32(0)->PutDouble( sin( pArg->GetDouble() ) ); + SbxVariableRef pArg = rPar.Get(1); + rPar.Get(0)->PutDouble(sin(pArg->GetDouble())); } } void SbRtl_Cos(StarBASIC *, SbxArray & rPar, bool) { - if ( rPar.Count32() < 2 ) + if (rPar.Count() < 2) StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); else { - SbxVariableRef pArg = rPar.Get32(1); - rPar.Get32(0)->PutDouble( cos( pArg->GetDouble() ) ); + SbxVariableRef pArg = rPar.Get(1); + rPar.Get(0)->PutDouble(cos(pArg->GetDouble())); } } void SbRtl_Atn(StarBASIC *, SbxArray & rPar, bool) { - if ( rPar.Count32() < 2 ) + if (rPar.Count() < 2) StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); else { - SbxVariableRef pArg = rPar.Get32(1); - rPar.Get32(0)->PutDouble( atan( pArg->GetDouble() ) ); + SbxVariableRef pArg = rPar.Get(1); + rPar.Get(0)->PutDouble(atan(pArg->GetDouble())); } } void SbRtl_Abs(StarBASIC *, SbxArray & rPar, bool) { - if ( rPar.Count32() < 2 ) + if (rPar.Count() < 2) { StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { - SbxVariableRef pArg = rPar.Get32(1); - rPar.Get32(0)->PutDouble( fabs( pArg->GetDouble() ) ); + SbxVariableRef pArg = rPar.Get(1); + rPar.Get(0)->PutDouble(fabs(pArg->GetDouble())); } } void SbRtl_Asc(StarBASIC *, SbxArray & rPar, bool) { - if ( rPar.Count32() < 2 ) + if (rPar.Count() < 2) { StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { - SbxVariableRef pArg = rPar.Get32(1); + SbxVariableRef pArg = rPar.Get(1); OUString aStr( pArg->GetOUString() ); if ( aStr.isEmpty()) { StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); - rPar.Get32(0)->PutEmpty(); + rPar.Get(0)->PutEmpty(); } else { sal_Unicode aCh = aStr[0]; - rPar.Get32(0)->PutLong( aCh ); + rPar.Get(0)->PutLong(aCh); } } } static void implChr( SbxArray& rPar, bool bChrW ) { - if ( rPar.Count32() < 2 ) + if (rPar.Count() < 2) { StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { - SbxVariableRef pArg = rPar.Get32(1); + SbxVariableRef pArg = rPar.Get(1); OUString aStr; if( !bChrW && SbiRuntime::isVBAEnabled() ) @@ -345,7 +345,7 @@ static void implChr( SbxArray& rPar, bool bChrW ) } aStr = OUString(static_cast<sal_Unicode>(aCh)); } - rPar.Get32(0)->PutString( aStr ); + rPar.Get(0)->PutString(aStr); } } @@ -391,9 +391,9 @@ void SbRtl_CurDir(StarBASIC * pBasic, SbxArray & rPar, bool bWrite) #if defined(_WIN32) int nCurDir = 0; // Current dir // JSM - if ( rPar.Count32() == 2 ) + if (rPar.Count() == 2) { - OUString aDrive = rPar.Get32(1)->GetOUString(); + OUString aDrive = rPar.Get(1)->GetOUString(); if ( aDrive.getLength() != 1 ) { StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); @@ -416,7 +416,7 @@ void SbRtl_CurDir(StarBASIC * pBasic, SbxArray & rPar, bool bWrite) _set_thread_local_invalid_parameter_handler(handler); if ( ok ) { - rPar.Get32(0)->PutString( OUString(o3tl::toU(pBuffer)) ); + rPar.Get(0)->PutString(OUString(o3tl::toU(pBuffer))); } else { @@ -439,7 +439,7 @@ void SbRtl_CurDir(StarBASIC * pBasic, SbxArray & rPar, bool bWrite) } if( getcwd( pMem.get(), nSize-1 ) != nullptr ) { - rPar.Get32(0)->PutString( OUString::createFromAscii(pMem.get()) ); + rPar.Get(0)->PutString(OUString::createFromAscii(pMem.get())); return; } if( errno != ERANGE ) @@ -455,13 +455,14 @@ void SbRtl_CurDir(StarBASIC * pBasic, SbxArray & rPar, bool bWrite) void SbRtl_ChDir(StarBASIC * pBasic, SbxArray & rPar, bool) { - rPar.Get32(0)->PutEmpty(); - if (rPar.Count32() == 2) + rPar.Get(0)->PutEmpty(); + if (rPar.Count() == 2) { // VBA: track current directory per document type (separately for Writer, Calc, Impress, etc.) if( SbiRuntime::isVBAEnabled() ) { - ::basic::vba::registerCurrentDirectory( getDocumentModel( pBasic ), rPar.Get32(1)->GetOUString() ); + ::basic::vba::registerCurrentDirectory(getDocumentModel(pBasic), + rPar.Get(1)->GetOUString()); } } else @@ -472,8 +473,8 @@ void SbRtl_ChDir(StarBASIC * pBasic, SbxArray & rPar, bool) void SbRtl_ChDrive(StarBASIC *, SbxArray & rPar, bool) { - rPar.Get32(0)->PutEmpty(); - if (rPar.Count32() != 2) + rPar.Get(0)->PutEmpty(); ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits