summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2.cxx13
-rw-r--r--basctl/source/basicide/baside2b.cxx45
-rw-r--r--basctl/source/basicide/basobj2.cxx6
-rw-r--r--basctl/source/basicide/basobj3.cxx2
-rw-r--r--basctl/source/basicide/macrodlg.cxx4
-rw-r--r--basic/qa/cppunit/basictest.cxx2
-rw-r--r--basic/source/basmgr/basmgr.cxx8
-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
-rw-r--r--basic/source/comp/codegen.cxx10
-rw-r--r--basic/source/comp/dim.cxx12
-rw-r--r--basic/source/comp/sbcomp.cxx4
-rw-r--r--basic/source/runtime/dllmgr-none.cxx10
-rw-r--r--basic/source/runtime/dllmgr-x64.cxx47
-rw-r--r--basic/source/runtime/dllmgr-x86.cxx45
-rw-r--r--basic/source/runtime/inputbox.cxx18
-rw-r--r--basic/source/runtime/methods.cxx816
-rw-r--r--basic/source/runtime/methods1.cxx621
-rw-r--r--basic/source/runtime/props.cxx498
-rw-r--r--basic/source/runtime/runtime.cxx162
-rw-r--r--basic/source/runtime/stdobj.cxx2
-rw-r--r--basic/source/runtime/stdobj1.cxx18
-rw-r--r--basic/source/sbx/sbxarray.cxx60
-rw-r--r--basic/source/sbx/sbxcoll.cxx24
-rw-r--r--basic/source/sbx/sbxexec.cxx2
-rw-r--r--basic/source/sbx/sbxobj.cxx42
-rw-r--r--basic/source/sbx/sbxstr.cxx12
-rw-r--r--basic/source/sbx/sbxvalue.cxx2
-rw-r--r--basic/source/sbx/sbxvar.cxx6
-rw-r--r--include/basic/sbx.hxx38
-rw-r--r--sc/source/core/data/validat.cxx6
-rw-r--r--sc/source/core/tool/interpr4.cxx24
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx2
-rw-r--r--scripting/source/basprov/basmodnode.cxx8
-rw-r--r--scripting/source/basprov/basscript.cxx6
-rw-r--r--sw/source/core/doc/docbasic.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx22
41 files changed, 1348 insertions, 1619 deletions
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();
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
@@ -524,11 +525,11 @@ void implStepRenameOSL( const OUString& aSource, const OUString& aDest )
void SbRtl_FileCopy(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutEmpty();
- if (rPar.Count32() == 3)
+ rPar.Get(0)->PutEmpty();
+ if (rPar.Count() == 3)
{
- OUString aSource = rPar.Get32(1)->GetOUString();
- OUString aDest = rPar.Get32(2)->GetOUString();
+ OUString aSource = rPar.Get(1)->GetOUString();
+ OUString aDest = rPar.Get(2)->GetOUString();
if( hasUno() )
{
const uno::Reference< ucb::XSimpleFileAccess3 >& xSFI = getFileAccess();
@@ -559,10 +560,10 @@ void SbRtl_FileCopy(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Kill(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutEmpty();
- if (rPar.Count32() == 2)
+ rPar.Get(0)->PutEmpty();
+ if (rPar.Count() == 2)
{
- OUString aFileSpec = rPar.Get32(1)->GetOUString();
+ OUString aFileSpec = rPar.Get(1)->GetOUString();
if( hasUno() )
{
@@ -598,10 +599,10 @@ void SbRtl_Kill(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_MkDir(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
{
- rPar.Get32(0)->PutEmpty();
- if (rPar.Count32() == 2)
+ rPar.Get(0)->PutEmpty();
+ if (rPar.Count() == 2)
{
- OUString aPath = rPar.Get32(1)->GetOUString();
+ OUString aPath = rPar.Get(1)->GetOUString();
if ( SbiRuntime::isVBAEnabled() )
{
// In vba if the full path is not specified then
@@ -612,12 +613,12 @@ void SbRtl_MkDir(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
SbxArrayRef pPar = new SbxArray();
SbxVariableRef pResult = new SbxVariable();
SbxVariableRef pParam = new SbxVariable();
- pPar->Insert32( pResult.get(), pPar->Count32() );
- pPar->Insert32( pParam.get(), pPar->Count32() );
+ pPar->Insert(pResult.get(), pPar->Count());
+ pPar->Insert(pParam.get(), pPar->Count());
SbRtl_CurDir( pBasic, *pPar, bWrite );
OUString sCurPathURL;
- File::getFileURLFromSystemPath( pPar->Get32(0)->GetOUString(), sCurPathURL );
+ File::getFileURLFromSystemPath(pPar->Get(0)->GetOUString(), sCurPathURL);
aURLObj.SetURL( sCurPathURL );
aURLObj.Append( aPath );
@@ -684,10 +685,10 @@ static void implRemoveDirRecursive( const OUString& aDirPath )
void SbRtl_RmDir(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutEmpty();
- if (rPar.Count32() == 2)
+ rPar.Get(0)->PutEmpty();
+ if (rPar.Count() == 2)
{
- OUString aPath = rPar.Get32(1)->GetOUString();
+ OUString aPath = rPar.Get(1)->GetOUString();
if( hasUno() )
{
const uno::Reference< ucb::XSimpleFileAccess3 >& xSFI = getFileAccess();
@@ -733,32 +734,32 @@ void SbRtl_RmDir(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_SendKeys(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutEmpty();
+ rPar.Get(0)->PutEmpty();
StarBASIC::Error(ERRCODE_BASIC_NOT_IMPLEMENTED);
}
void SbRtl_Exp(StarBASIC *, SbxArray & rPar, bool)
{
- if( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
else
{
- double aDouble = rPar.Get32(1)->GetDouble();
+ double aDouble = rPar.Get(1)->GetDouble();
aDouble = exp( aDouble );
checkArithmeticOverflow( aDouble );
- rPar.Get32(0)->PutDouble( aDouble );
+ rPar.Get(0)->PutDouble(aDouble);
}
}
void SbRtl_FileLen(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() );
sal_Int32 nLen = 0;
if( hasUno() )
@@ -784,27 +785,27 @@ void SbRtl_FileLen(StarBASIC *, SbxArray & rPar, bool)
(void)aItem.getFileStatus( aFileStatus );
nLen = static_cast<sal_Int32>(aFileStatus.getFileSize());
}
- rPar.Get32(0)->PutLong( static_cast<tools::Long>(nLen) );
+ rPar.Get(0)->PutLong(static_cast<tools::Long>(nLen));
}
}
void SbRtl_Hex(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);
// converting value to unsigned and limit to 2 or 4 byte representation
sal_uInt32 nVal = pArg->IsInteger() ?
static_cast<sal_uInt16>(pArg->GetInteger()) :
static_cast<sal_uInt32>(pArg->GetLong());
OUString aStr(OUString::number( nVal, 16 ));
aStr = aStr.toAsciiUpperCase();
- rPar.Get32(0)->PutString( aStr );
+ rPar.Get(0)->PutString(aStr);
}
}
@@ -813,11 +814,11 @@ void SbRtl_FuncCaller(StarBASIC *, SbxArray & rPar, bool)
if ( SbiRuntime::isVBAEnabled() && GetSbData()->pInst && GetSbData()->pInst->pRun )
{
if ( GetSbData()->pInst->pRun->GetExternalCaller() )
- *rPar.Get32(0) = *GetSbData()->pInst->pRun->GetExternalCaller();
+ *rPar.Get(0) = *GetSbData()->pInst->pRun->GetExternalCaller();
else
{
SbxVariableRef pVar = new SbxVariable(SbxVARIANT);
- *rPar.Get32(0) = *pVar;
+ *rPar.Get(0) = *pVar;
}
}
else
@@ -830,7 +831,7 @@ void SbRtl_FuncCaller(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_InStr(StarBASIC *, SbxArray & rPar, bool)
{
- const sal_uInt32 nArgCount = rPar.Count32()-1;
+ const sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 2 )
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
else
@@ -840,7 +841,7 @@ void SbRtl_InStr(StarBASIC *, SbxArray & rPar, bool)
if ( nArgCount >= 3 )
{
- nStartPos = rPar.Get32(1)->GetLong();
+ nStartPos = rPar.Get(1)->GetLong();
if( nStartPos <= 0 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -863,10 +864,10 @@ void SbRtl_InStr(StarBASIC *, SbxArray & rPar, bool)
}
if ( nArgCount == 4 )
{
- bTextMode = rPar.Get32(4)->GetInteger();
+ bTextMode = rPar.Get(4)->GetInteger();
}
sal_Int32 nPos;
- const OUString& rToken = rPar.Get32(nFirstStringPos+1)->GetOUString();
+ const OUString& rToken = rPar.Get(nFirstStringPos + 1)->GetOUString();
// #97545 Always find empty string
if( rToken.isEmpty() )
@@ -877,12 +878,12 @@ void SbRtl_InStr(StarBASIC *, SbxArray & rPar, bool)
{
if( !bTextMode )
{
- const OUString& rStr1 = rPar.Get32(nFirstStringPos)->GetOUString();
+ const OUString& rStr1 = rPar.Get(nFirstStringPos)->GetOUString();
nPos = rStr1.indexOf( rToken, nStartPos - 1 ) + 1;
}
else
{
- OUString aStr1 = rPar.Get32(nFirstStringPos)->GetOUString();
+ OUString aStr1 = rPar.Get(nFirstStringPos)->GetOUString();
OUString aToken = rToken;
aStr1 = aStr1.toAsciiUpperCase();
@@ -891,7 +892,7 @@ void SbRtl_InStr(StarBASIC *, SbxArray & rPar, bool)
nPos = aStr1.indexOf( aToken, nStartPos-1 ) + 1;
}
}
- rPar.Get32(0)->PutLong( nPos );
+ rPar.Get(0)->PutLong(nPos);
}
}
@@ -900,20 +901,20 @@ void SbRtl_InStr(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_InStrRev(StarBASIC *, SbxArray & rPar, bool)
{
- const sal_uInt32 nArgCount = rPar.Count32()-1;
+ const sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 2 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- OUString aStr1 = rPar.Get32(1)->GetOUString();
- OUString aToken = rPar.Get32(2)->GetOUString();
+ OUString aStr1 = rPar.Get(1)->GetOUString();
+ OUString aToken = rPar.Get(2)->GetOUString();
sal_Int32 nStartPos = -1;
if ( nArgCount >= 3 )
{
- nStartPos = rPar.Get32(3)->GetLong();
+ nStartPos = rPar.Get(3)->GetLong();
if( nStartPos <= 0 && nStartPos != -1 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -935,7 +936,7 @@ void SbRtl_InStrRev(StarBASIC *, SbxArray & rPar, bool)
}
if ( nArgCount == 4 )
{
- bTextMode = rPar.Get32(4)->GetInteger();
+ bTextMode = rPar.Get(4)->GetInteger();
}
sal_Int32 nStrLen = aStr1.getLength();
if( nStartPos == -1 )
@@ -967,7 +968,7 @@ void SbRtl_InStrRev(StarBASIC *, SbxArray & rPar, bool)
}
}
}
- rPar.Get32(0)->PutLong( nPos );
+ rPar.Get(0)->PutLong(nPos);
}
}
@@ -981,64 +982,64 @@ void SbRtl_InStrRev(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Int(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);
double aDouble= pArg->GetDouble();
/*
floor( 2.8 ) = 2.0
floor( -2.8 ) = -3.0
*/
aDouble = floor( aDouble );
- rPar.Get32(0)->PutDouble( aDouble );
+ rPar.Get(0)->PutDouble(aDouble);
}
}
void SbRtl_Fix(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);
double aDouble = pArg->GetDouble();
if ( aDouble >= 0.0 )
aDouble = floor( aDouble );
else
aDouble = ceil( aDouble );
- rPar.Get32(0)->PutDouble( aDouble );
+ rPar.Get(0)->PutDouble(aDouble);
}
}
void SbRtl_LCase(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
const CharClass& rCharClass = GetCharClass();
- OUString aStr( rPar.Get32(1)->GetOUString() );
+ OUString aStr(rPar.Get(1)->GetOUString());
aStr = rCharClass.lowercase(aStr);
- rPar.Get32(0)->PutString( aStr );
+ rPar.Get(0)->PutString(aStr);
}
}
void SbRtl_Left(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 3 )
+ if (rPar.Count() < 3)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- OUString aStr( rPar.Get32(1)->GetOUString() );
- sal_Int32 nResultLen = rPar.Get32(2)->GetLong();
+ OUString aStr(rPar.Get(1)->GetOUString());
+ sal_Int32 nResultLen = rPar.Get(2)->GetLong();
if( nResultLen < 0 )
{
nResultLen = 0;
@@ -1049,24 +1050,24 @@ void SbRtl_Left(StarBASIC *, SbxArray & rPar, bool)
nResultLen = aStr.getLength();
}
aStr = aStr.copy(0, nResultLen );
- rPar.Get32(0)->PutString( aStr );
+ rPar.Get(0)->PutString(aStr);
}
}
void SbRtl_Log(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- double aArg = rPar.Get32(1)->GetDouble();
+ double aArg = rPar.Get(1)->GetDouble();
if ( aArg > 0 )
{
double d = log( aArg );
checkArithmeticOverflow( d );
- rPar.Get32(0)->PutDouble( d );
+ rPar.Get(0)->PutDouble(d);
}
else
{
@@ -1077,14 +1078,14 @@ void SbRtl_Log(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_LTrim(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- OUString aStr(comphelper::string::stripStart(rPar.Get32(1)->GetOUString(), ' '));
- rPar.Get32(0)->PutString(aStr);
+ OUString aStr(comphelper::string::stripStart(rPar.Get(1)->GetOUString(), ' '));
+ rPar.Get(0)->PutString(aStr);
}
}
@@ -1093,7 +1094,7 @@ void SbRtl_LTrim(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Mid(StarBASIC *, SbxArray & rPar, bool bWrite)
{
- int nArgCount = rPar.Count32()-1;
+ int nArgCount = rPar.Count() - 1;
if ( nArgCount < 2 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -1108,8 +1109,8 @@ void SbRtl_Mid(StarBASIC *, SbxArray & rPar, bool bWrite)
{
bWrite = true;
}
- OUString aArgStr = rPar.Get32(1)->GetOUString();
- sal_Int32 nStartPos = rPar.Get32(2)->GetLong();
+ OUString aArgStr = rPar.Get(1)->GetOUString();
+ sal_Int32 nStartPos = rPar.Get(2)->GetLong();
if ( nStartPos < 1 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -1121,7 +1122,7 @@ void SbRtl_Mid(StarBASIC *, SbxArray & rPar, bool bWrite)
bool bWriteNoLenParam = false;
if ( nArgCount == 3 || bWrite )
{
- sal_Int32 n = rPar.Get32(3)->GetLong();
+ sal_Int32 n = rPar.Get(3)->GetLong();
if( bWrite && n == -1 )
{
bWriteNoLenParam = true;
@@ -1143,7 +1144,7 @@ void SbRtl_Mid(StarBASIC *, SbxArray & rPar, bool bWrite)
nStartPos = nArgLen;
}
- OUString aReplaceStr = rPar.Get32(4)->GetOUString();
+ OUString aReplaceStr = rPar.Get(4)->GetOUString();
sal_Int32 nReplaceStrLen = aReplaceStr.getLength();
sal_Int32 nReplaceLen;
if( bWriteNoLenParam )
@@ -1165,7 +1166,7 @@ void SbRtl_Mid(StarBASIC *, SbxArray & rPar, bool bWrite)
aResultStr.insert(
nStartPos, aReplaceStr.getStr(), std::min(nReplaceLen, nReplaceStrLen));
- rPar.Get32(1)->PutString( aResultStr.makeStringAndClear() );
+ rPar.Get(1)->PutString(aResultStr.makeStringAndClear());
}
else
{
@@ -1189,7 +1190,7 @@ void SbRtl_Mid(StarBASIC *, SbxArray & rPar, bool bWrite)
if (nLen > 0)
aResultStr = aArgStr.copy( nStartPos, nLen );
}
- rPar.Get32(0)->PutString( aResultStr );
+ rPar.Get(0)->PutString(aResultStr);
}
}
}
@@ -1197,14 +1198,14 @@ void SbRtl_Mid(StarBASIC *, SbxArray & rPar, bool bWrite)
void SbRtl_Oct(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
char aBuffer[16];
- SbxVariableRef pArg = rPar.Get32(1);
+ SbxVariableRef pArg = rPar.Get(1);
if ( pArg->IsInteger() )
{
snprintf( aBuffer, sizeof(aBuffer), "%o", pArg->GetInteger() );
@@ -1213,7 +1214,7 @@ void SbRtl_Oct(StarBASIC *, SbxArray & rPar, bool)
{
snprintf( aBuffer, sizeof(aBuffer), "%lo", static_cast<long unsigned int>(pArg->GetLong()) );
}
- rPar.Get32(0)->PutString( OUString::createFromAscii( aBuffer ) );
+ rPar.Get(0)->PutString(OUString::createFromAscii(aBuffer));
}
}
@@ -1221,7 +1222,7 @@ void SbRtl_Oct(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Replace(StarBASIC *, SbxArray & rPar, bool)
{
- const sal_uInt32 nArgCount = rPar.Count32()-1;
+ const sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 3 || nArgCount > 6 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -1231,9 +1232,9 @@ void SbRtl_Replace(StarBASIC *, SbxArray & rPar, bool)
sal_Int32 lStartPos = 1;
if (nArgCount >= 4)
{
- if (rPar.Get32(4)->GetType() != SbxEMPTY)
+ if (rPar.Get(4)->GetType() != SbxEMPTY)
{
- lStartPos = rPar.Get32(4)->GetLong();
+ lStartPos = rPar.Get(4)->GetLong();
}
if (lStartPos < 1)
{
@@ -1245,9 +1246,9 @@ void SbRtl_Replace(StarBASIC *, SbxArray & rPar, bool)
sal_Int32 lCount = -1;
if (nArgCount >= 5)
{
- if (rPar.Get32(5)->GetType() != SbxEMPTY)
+ if (rPar.Get(5)->GetType() != SbxEMPTY)
{
- lCount = rPar.Get32(5)->GetLong();
+ lCount = rPar.Get(5)->GetLong();
}
if (lCount < -1)
{
@@ -1259,7 +1260,7 @@ void SbRtl_Replace(StarBASIC *, SbxArray & rPar, bool)
bool bCaseInsensitive;
if (nArgCount == 6)
{
- bCaseInsensitive = rPar.Get32(6)->GetInteger();
+ bCaseInsensitive = rPar.Get(6)->GetInteger();
}
else
{
@@ -1275,9 +1276,9 @@ void SbRtl_Replace(StarBASIC *, SbxArray & rPar, bool)
}
}
- const OUString aExpStr = rPar.Get32(1)->GetOUString();
- OUString aFindStr = rPar.Get32(2)->GetOUString();
- const OUString aReplaceStr = rPar.Get32(3)->GetOUString();
+ const OUString aExpStr = rPar.Get(1)->GetOUString();
+ OUString aFindStr = rPar.Get(2)->GetOUString();
+ const OUString aReplaceStr = rPar.Get(3)->GetOUString();
const sal_Int32 nExpStrLen = aExpStr.getLength();
const sal_Int32 nFindStrLen = aFindStr.getLength();
@@ -1311,19 +1312,19 @@ void SbRtl_Replace(StarBASIC *, SbxArray & rPar, bool)
}
}
sResult.append(aExpStr.getStr() + nPrevPos, nExpStrLen - nPrevPos);
- rPar.Get32(0)->PutString(sResult.makeStringAndClear());
+ rPar.Get(0)->PutString(sResult.makeStringAndClear());
}
void SbRtl_Right(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 3 )
+ if (rPar.Count() < 3)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- const OUString& rStr = rPar.Get32(1)->GetOUString();
- int nResultLen = rPar.Get32(2)->GetLong();
+ const OUString& rStr = rPar.Get(1)->GetOUString();
+ int nResultLen = rPar.Get(2)->GetLong();
if( nResultLen < 0 )
{
nResultLen = 0;
@@ -1335,37 +1336,37 @@ void SbRtl_Right(StarBASIC *, SbxArray & rPar, bool)
nResultLen = nStrLen;
}
OUString aResultStr = rStr.copy( nStrLen - nResultLen );
- rPar.Get32(0)->PutString( aResultStr );
+ rPar.Get(0)->PutString(aResultStr);
}
}
void SbRtl_RTL(StarBASIC * pBasic, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutObject( pBasic->getRTL().get() );
+ rPar.Get(0)->PutObject(pBasic->getRTL().get());
}
void SbRtl_RTrim(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- OUString aStr(comphelper::string::stripEnd(rPar.Get32(1)->GetOUString(), ' '));
- rPar.Get32(0)->PutString(aStr);
+ OUString aStr(comphelper::string::stripEnd(rPar.Get(1)->GetOUString(), ' '));
+ rPar.Get(0)->PutString(aStr);
}
}
void SbRtl_Sgn(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- double aDouble = rPar.Get32(1)->GetDouble();
+ double aDouble = rPar.Get(1)->GetDouble();
sal_Int16 nResult = 0;
if ( aDouble > 0 )
{
@@ -1375,50 +1376,50 @@ void SbRtl_Sgn(StarBASIC *, SbxArray & rPar, bool)
{
nResult = -1;
}
- rPar.Get32(0)->PutInteger( nResult );
+ rPar.Get(0)->PutInteger(nResult);
}
}
void SbRtl_Space(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
OUStringBuffer aBuf;
- string::padToLength(aBuf, rPar.Get32(1)->GetLong(), ' ');
- rPar.Get32(0)->PutString(aBuf.makeStringAndClear());
+ string::padToLength(aBuf, rPar.Get(1)->GetLong(), ' ');
+ rPar.Get(0)->PutString(aBuf.makeStringAndClear());
}
}
void SbRtl_Spc(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
OUStringBuffer aBuf;
- string::padToLength(aBuf, rPar.Get32(1)->GetLong(), ' ');
- rPar.Get32(0)->PutString(aBuf.makeStringAndClear());
+ string::padToLength(aBuf, rPar.Get(1)->GetLong(), ' ');
+ rPar.Get(0)->PutString(aBuf.makeStringAndClear());
}
}
void SbRtl_Sqr(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- double aDouble = rPar.Get32(1)->GetDouble();
+ double aDouble = rPar.Get(1)->GetDouble();
if ( aDouble >= 0 )
{
- rPar.Get32(0)->PutDouble( sqrt( aDouble ));
+ rPar.Get(0)->PutDouble(sqrt(aDouble));
}
else
{
@@ -1429,7 +1430,7 @@ void SbRtl_Sqr(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Str(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
@@ -1437,7 +1438,7 @@ void SbRtl_Str(StarBASIC *, SbxArray & rPar, bool)
{
OUString aStr;
OUString aStrNew("");
- SbxVariableRef pArg = rPar.Get32(1);
+ SbxVariableRef pArg = rPar.Get(1);
pArg->Format( aStr );
// Numbers start with a space
@@ -1484,20 +1485,20 @@ void SbRtl_Str(StarBASIC *, SbxArray & rPar, bool)
{
aStrNew = aStr;
}
- rPar.Get32(0)->PutString( aStrNew );
+ rPar.Get(0)->PutString(aStrNew);
}
}
void SbRtl_StrComp(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 3 )
+ if (rPar.Count() < 3)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
- rPar.Get32(0)->PutEmpty();
+ rPar.Get(0)->PutEmpty();
return;
}
- const OUString& rStr1 = rPar.Get32(1)->GetOUString();
- const OUString& rStr2 = rPar.Get32(2)->GetOUString();
+ const OUString& rStr1 = rPar.Get(1)->GetOUString();
+ const OUString& rStr2 = rPar.Get(2)->GetOUString();
SbiInstance* pInst = GetSbData()->pInst;
bool bTextCompare;
@@ -1511,8 +1512,8 @@ void SbRtl_StrComp(StarBASIC *, SbxArray & rPar, bool)
{
bTextCompare = true;
}
- if ( rPar.Count32() == 4 )
- bTextCompare = rPar.Get32(3)->GetInteger();
+ if (rPar.Count() == 4)
+ bTextCompare = rPar.Get(3)->GetInteger();
if( !bCompatibility )
{
@@ -1550,75 +1551,75 @@ void SbRtl_StrComp(StarBASIC *, SbxArray & rPar, bool)
nRetValue = 1;
}
}
- rPar.Get32(0)->PutInteger( sal::static_int_cast< sal_Int16 >( nRetValue ) );
+ rPar.Get(0)->PutInteger(sal::static_int_cast<sal_Int16>(nRetValue));
}
void SbRtl_String(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
sal_Unicode aFiller;
- sal_Int32 lCount = rPar.Get32(1)->GetLong();
+ sal_Int32 lCount = rPar.Get(1)->GetLong();
if( lCount < 0 || lCount > 0xffff )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- if( rPar.Get32(2)->GetType() == SbxINTEGER )
+ if (rPar.Get(2)->GetType() == SbxINTEGER)
{
- aFiller = static_cast<sal_Unicode>(rPar.Get32(2)->GetInteger());
+ aFiller = static_cast<sal_Unicode>(rPar.Get(2)->GetInteger());
}
else
{
- const OUString& rStr = rPar.Get32(2)->GetOUString();
+ const OUString& rStr = rPar.Get(2)->GetOUString();
aFiller = rStr[0];
}
OUStringBuffer aBuf(lCount);
string::padToLength(aBuf, lCount, aFiller);
- rPar.Get32(0)->PutString(aBuf.makeStringAndClear());
+ rPar.Get(0)->PutString(aBuf.makeStringAndClear());
}
}
void SbRtl_Tab(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
else
{
OUStringBuffer aStr;
- comphelper::string::padToLength(aStr, rPar.Get32(1)->GetLong(), '\t');
- rPar.Get32(0)->PutString(aStr.makeStringAndClear());
+ comphelper::string::padToLength(aStr, rPar.Get(1)->GetLong(), '\t');
+ rPar.Get(0)->PutString(aStr.makeStringAndClear());
}
}
void SbRtl_Tan(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( tan( pArg->GetDouble() ) );
+ SbxVariableRef pArg = rPar.Get(1);
+ rPar.Get(0)->PutDouble(tan(pArg->GetDouble()));
}
}
void SbRtl_UCase(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
const CharClass& rCharClass = GetCharClass();
- OUString aStr( rPar.Get32(1)->GetOUString() );
+ OUString aStr(rPar.Get(1)->GetOUString());
aStr = rCharClass.uppercase( aStr );
- rPar.Get32(0)->PutString( aStr );
+ rPar.Get(0)->PutString(aStr);
}
}
@@ -1628,7 +1629,7 @@ void SbRtl_Val(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
(void)pBasic;
(void)bWrite;
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
@@ -1637,7 +1638,7 @@ void SbRtl_Val(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
double nResult = 0.0;
char* pEndPtr;
- OUString aStr( rPar.Get32(1)->GetOUString() );
+ OUString aStr(rPar.Get(1)->GetOUString());
FilterWhiteSpace( aStr );
if ( aStr.getLength() > 1 && aStr[0] == '&' )
@@ -1677,7 +1678,7 @@ void SbRtl_Val(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
#endif
}
- rPar.Get32(0)->PutDouble( nResult );
+ rPar.Get(0)->PutDouble(nResult);
}
}
@@ -1728,28 +1729,28 @@ void SbxDateFromUNODate( SbxValue *pVal, const css::util::Date& aUnoDate)
// Function to convert date to UNO date (com.sun.star.util.Date)
void SbRtl_CDateToUnoDate(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- unoToSbxValue(rPar.Get32(0), Any(SbxDateToUNODate(rPar.Get32(1))));
+ unoToSbxValue(rPar.Get(0), Any(SbxDateToUNODate(rPar.Get(1))));
}
// Function to convert date from UNO date (com.sun.star.util.Date)
void SbRtl_CDateFromUnoDate(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 || rPar.Get32(1)->GetType() != SbxOBJECT )
+ if (rPar.Count() != 2 || rPar.Get(1)->GetType() != SbxOBJECT)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- Any aAny (sbxToUnoValue(rPar.Get32(1), cppu::UnoType<css::util::Date>::get()));
+ Any aAny(sbxToUnoValue(rPar.Get(1), cppu::UnoType<css::util::Date>::get()));
css::util::Date aUnoDate;
if(aAny >>= aUnoDate)
- SbxDateFromUNODate(rPar.Get32(0), aUnoDate);
+ SbxDateFromUNODate(rPar.Get(0), aUnoDate);
else
SbxBase::SetError( ERRCODE_BASIC_CONVERSION );
}
@@ -1775,28 +1776,28 @@ void SbxDateFromUNOTime( SbxValue *pVal, const css::util::Time& aUnoTime)
// Function to convert date to UNO time (com.sun.star.util.Time)
void SbRtl_CDateToUnoTime(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- unoToSbxValue(rPar.Get32(0), Any(SbxDateToUNOTime(rPar.Get32(1))));
+ unoToSbxValue(rPar.Get(0), Any(SbxDateToUNOTime(rPar.Get(1))));
}
// Function to convert date from UNO time (com.sun.star.util.Time)
void SbRtl_CDateFromUnoTime(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 || rPar.Get32(1)->GetType() != SbxOBJECT )
+ if (rPar.Count() != 2 || rPar.Get(1)->GetType() != SbxOBJECT)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- Any aAny (sbxToUnoValue(rPar.Get32(1), cppu::UnoType<css::util::Time>::get()));
+ Any aAny(sbxToUnoValue(rPar.Get(1), cppu::UnoType<css::util::Time>::get()));
css::util::Time aUnoTime;
if(aAny >>= aUnoTime)
- SbxDateFromUNOTime(rPar.Get32(0), aUnoTime);
+ SbxDateFromUNOTime(rPar.Get(0), aUnoTime);
else
SbxBase::SetError( ERRCODE_BASIC_CONVERSION );
}
@@ -1831,28 +1832,28 @@ void SbxDateFromUNODateTime( SbxValue *pVal, const css::util::DateTime& aUnoDT)
// Function to convert date to UNO date (com.sun.star.util.Date)
void SbRtl_CDateToUnoDateTime(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- unoToSbxValue(rPar.Get32(0), Any(SbxDateToUNODateTime(rPar.Get32(1))));
+ unoToSbxValue(rPar.Get(0), Any(SbxDateToUNODateTime(rPar.Get(1))));
}
// Function to convert date from UNO date (com.sun.star.util.Date)
void SbRtl_CDateFromUnoDateTime(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 || rPar.Get32(1)->GetType() != SbxOBJECT )
+ if (rPar.Count() != 2 || rPar.Get(1)->GetType() != SbxOBJECT)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- Any aAny (sbxToUnoValue(rPar.Get32(1), cppu::UnoType<css::util::DateTime>::get()));
+ Any aAny(sbxToUnoValue(rPar.Get(1), cppu::UnoType<css::util::DateTime>::get()));
css::util::DateTime aUnoDT;
if(aAny >>= aUnoDT)
- SbxDateFromUNODateTime(rPar.Get32(0), aUnoDT);
+ SbxDateFromUNODateTime(rPar.Get(0), aUnoDT);
else
SbxBase::SetError( ERRCODE_BASIC_CONVERSION );
}
@@ -1860,9 +1861,9 @@ void SbRtl_CDateFromUnoDateTime(StarBASIC *, SbxArray & rPar, bool)
// Function to convert date to ISO 8601 date format YYYYMMDD
void SbRtl_CDateToIso(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- double aDate = rPar.Get32(1)->GetDate();
+ double aDate = rPar.Get(1)->GetDate();
// Date may actually even be -YYYYYMMDD
char Buffer[11];
@@ -1872,7 +1873,7 @@ void SbRtl_CDateToIso(StarBASIC *, SbxArray & rPar, bool)
static_cast<int>(implGetDateMonth( aDate )),
static_cast<int>(implGetDateDay( aDate )) );
OUString aRetStr = OUString::createFromAscii( Buffer );
- rPar.Get32(0)->PutString( aRetStr );
+ rPar.Get(0)->PutString(aRetStr);
}
else
{
@@ -1884,11 +1885,11 @@ void SbRtl_CDateToIso(StarBASIC *, SbxArray & rPar, bool)
// And even YYMMDD for compatibility, sigh...
void SbRtl_CDateFromIso(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
do
{
- OUString aStr = rPar.Get32(1)->GetOUString();
+ OUString aStr = rPar.Get(1)->GetOUString();
if (aStr.isEmpty())
break;
@@ -1953,7 +1954,7 @@ void SbRtl_CDateFromIso(StarBASIC *, SbxArray & rPar, bool)
bUseTwoDigitYear, SbDateCorrection::None, dDate ))
break;
- rPar.Get32(0)->PutDate( dDate );
+ rPar.Get(0)->PutDate(dDate);
return;
}
@@ -1969,36 +1970,36 @@ void SbRtl_CDateFromIso(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_DateSerial(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 4 )
+ if (rPar.Count() < 4)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- sal_Int16 nYear = rPar.Get32(1)->GetInteger();
- sal_Int16 nMonth = rPar.Get32(2)->GetInteger();
- sal_Int16 nDay = rPar.Get32(3)->GetInteger();
+ sal_Int16 nYear = rPar.Get(1)->GetInteger();
+ sal_Int16 nMonth = rPar.Get(2)->GetInteger();
+ sal_Int16 nDay = rPar.Get(3)->GetInteger();
double dDate;
if( implDateSerial( nYear, nMonth, nDay, true, SbDateCorrection::RollOver, dDate ) )
{
- rPar.Get32(0)->PutDate( dDate );
+ rPar.Get(0)->PutDate(dDate);
}
}
void SbRtl_TimeSerial(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 4 )
+ if (rPar.Count() < 4)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- sal_Int16 nHour = rPar.Get32(1)->GetInteger();
+ sal_Int16 nHour = rPar.Get(1)->GetInteger();
if ( nHour == 24 )
{
nHour = 0; // because of UNO DateTimes, which go till 24 o'clock
}
- sal_Int16 nMinute = rPar.Get32(2)->GetInteger();
- sal_Int16 nSecond = rPar.Get32(3)->GetInteger();
+ sal_Int16 nMinute = rPar.Get(2)->GetInteger();
+ sal_Int16 nSecond = rPar.Get(3)->GetInteger();
if ((nHour < 0 || nHour > 23) ||
(nMinute < 0 || nMinute > 59 ) ||
(nSecond < 0 || nSecond > 59 ))
@@ -2007,12 +2008,12 @@ void SbRtl_TimeSerial(StarBASIC *, SbxArray & rPar, bool)
return;
}
- rPar.Get32(0)->PutDate( implTimeSerial(nHour, nMinute, nSecond) ); // JSM
+ rPar.Get(0)->PutDate(implTimeSerial(nHour, nMinute, nSecond)); // JSM
}
void SbRtl_DateValue(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
@@ -2033,7 +2034,7 @@ void SbRtl_DateValue(StarBASIC *, SbxArray & rPar, bool)
LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType();
sal_uInt32 nIndex = pFormatter->GetStandardIndex( eLangType);
double fResult;
- OUString aStr( rPar.Get32(1)->GetOUString() );
+ OUString aStr(rPar.Get(1)->GetOUString());
bool bSuccess = pFormatter->IsNumberFormat( aStr, nIndex, fResult );
SvNumFormatType nType = pFormatter->GetType( nIndex );
@@ -2062,7 +2063,7 @@ void SbRtl_DateValue(StarBASIC *, SbxArray & rPar, bool)
fResult = ceil( fResult );
}
}
- rPar.Get32(0)->PutDate( fResult );
+ rPar.Get(0)->PutDate(fResult);
}
else
{
@@ -2073,7 +2074,7 @@ void SbRtl_DateValue(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_TimeValue(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
@@ -2090,7 +2091,7 @@ void SbRtl_TimeValue(StarBASIC *, SbxArray & rPar, bool)
sal_uInt32 nIndex = 0;
double fResult;
- bool bSuccess = pFormatter->IsNumberFormat( rPar.Get32(1)->GetOUString(),
+ bool bSuccess = pFormatter->IsNumberFormat(rPar.Get(1)->GetOUString(),
nIndex, fResult );
SvNumFormatType nType = pFormatter->GetType(nIndex);
if(bSuccess && (nType==SvNumFormatType::TIME||nType==SvNumFormatType::DATETIME))
@@ -2100,7 +2101,7 @@ void SbRtl_TimeValue(StarBASIC *, SbxArray & rPar, bool)
// cut days
fResult = fmod( fResult, 1 );
}
- rPar.Get32(0)->PutDate( fResult );
+ rPar.Get(0)->PutDate(fResult);
}
else
{
@@ -2111,30 +2112,30 @@ void SbRtl_TimeValue(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Day(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);
double aDate = pArg->GetDate();
sal_Int16 nDay = implGetDateDay( aDate );
- rPar.Get32(0)->PutInteger( nDay );
+ rPar.Get(0)->PutInteger(nDay);
}
}
void SbRtl_Year(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- sal_Int16 nYear = implGetDateYear( rPar.Get32(1)->GetDate() );
- rPar.Get32(0)->PutInteger( nYear );
+ sal_Int16 nYear = implGetDateYear(rPar.Get(1)->GetDate());
+ rPar.Get(0)->PutInteger(nYear);
}
}
@@ -2149,42 +2150,42 @@ sal_Int16 implGetHour( double dDate )
void SbRtl_Hour(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- double nArg = rPar.Get32(1)->GetDate();
+ double nArg = rPar.Get(1)->GetDate();
sal_Int16 nHour = implGetHour( nArg );
- rPar.Get32(0)->PutInteger( nHour );
+ rPar.Get(0)->PutInteger(nHour);
}
}
void SbRtl_Minute(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- double nArg = rPar.Get32(1)->GetDate();
+ double nArg = rPar.Get(1)->GetDate();
sal_Int16 nMin = implGetMinute( nArg );
- rPar.Get32(0)->PutInteger( nMin );
+ rPar.Get(0)->PutInteger(nMin);
}
}
void SbRtl_Month(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- sal_Int16 nMonth = implGetDateMonth( rPar.Get32(1)->GetDate() );
- rPar.Get32(0)->PutInteger( nMonth );
+ sal_Int16 nMonth = implGetDateMonth(rPar.Get(1)->GetDate());
+ rPar.Get(0)->PutInteger(nMonth);
}
}
@@ -2204,15 +2205,15 @@ sal_Int16 implGetSecond( double dDate )
void SbRtl_Second(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- double nArg = rPar.Get32(1)->GetDate();
+ double nArg = rPar.Get(1)->GetDate();
sal_Int16 nSecond = implGetSecond( nArg );
- rPar.Get32(0)->PutInteger( nSecond );
+ rPar.Get(0)->PutInteger(nSecond);
}
}
@@ -2231,10 +2232,7 @@ double Now_Impl()
// Date Now()
-void SbRtl_Now(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutDate( Now_Impl() );
-}
+void SbRtl_Now(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutDate(Now_Impl()); }
// Date Time()
@@ -2243,7 +2241,7 @@ void SbRtl_Time(StarBASIC *, SbxArray & rPar, bool bWrite)
if ( !bWrite )
{
tools::Time aTime( tools::Time::SYSTEM );
- SbxVariable* pMeth = rPar.Get32(0);
+ SbxVariable* pMeth = rPar.Get(0);
OUString aRes;
if( pMeth->IsFixed() )
{
@@ -2293,7 +2291,7 @@ void SbRtl_Timer(StarBASIC *, SbxArray & rPar, bool)
nSeconds *= 3600;
nSeconds += aTime.GetMin() * 60;
nSeconds += aTime.GetSec();
- rPar.Get32(0)->PutDate( static_cast<double>(nSeconds) );
+ rPar.Get(0)->PutDate(static_cast<double>(nSeconds));
}
@@ -2303,7 +2301,7 @@ void SbRtl_Date(StarBASIC *, SbxArray & rPar, bool bWrite)
{
Date aToday( Date::SYSTEM );
double nDays = static_cast<double>(GetDayDiff( aToday ));
- SbxVariable* pMeth = rPar.Get32(0);
+ SbxVariable* pMeth = rPar.Get(0);
if( pMeth->IsString() )
{
OUString aRes;
@@ -2338,25 +2336,25 @@ void SbRtl_Date(StarBASIC *, SbxArray & rPar, bool bWrite)
void SbRtl_IsArray(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- rPar.Get32(0)->PutBool((rPar.Get32(1)->GetType() & SbxARRAY) != 0);
+ rPar.Get(0)->PutBool((rPar.Get(1)->GetType() & SbxARRAY) != 0);
}
}
void SbRtl_IsObject(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- SbxVariable* pVar = rPar.Get32(1);
+ SbxVariable* pVar = rPar.Get(1);
bool bObject = pVar->IsObject();
SbxBase* pObj = (bObject ? pVar->GetObject() : nullptr);
@@ -2364,20 +2362,20 @@ void SbRtl_IsObject(StarBASIC *, SbxArray & rPar, bool)
{
bObject = pUnoClass->getUnoClass().is();
}
- rPar.Get32(0)->PutBool( bObject );
+ rPar.Get(0)->PutBool(bObject);
}
}
void SbRtl_IsDate(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
// #46134 only string is converted, all other types result in sal_False
- SbxVariableRef xArg = rPar.Get32(1);
+ SbxVariableRef xArg = rPar.Get(1);
SbxDataType eType = xArg->GetType();
bool bDate = false;
@@ -2398,13 +2396,13 @@ void SbRtl_IsDate(StarBASIC *, SbxArray & rPar, bool)
SbxBase::ResetError();
SbxBase::SetError( nPrevError );
}
- rPar.Get32(0)->PutBool( bDate );
+ rPar.Get(0)->PutBool(bDate);
}
}
void SbRtl_IsEmpty(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
@@ -2413,29 +2411,29 @@ void SbRtl_IsEmpty(StarBASIC *, SbxArray & rPar, bool)
SbxVariable* pVar = nullptr;
if( SbiRuntime::isVBAEnabled() )
{
- pVar = getDefaultProp( rPar.Get32(1) );
+ pVar = getDefaultProp(rPar.Get(1));
}
if ( pVar )
{
pVar->Broadcast( SfxHintId::BasicDataWanted );
- rPar.Get32(0)->PutBool( pVar->IsEmpty() );
+ rPar.Get(0)->PutBool(pVar->IsEmpty());
}
else
{
- rPar.Get32(0)->PutBool( rPar.Get32(1)->IsEmpty() );
+ rPar.Get(0)->PutBool(rPar.Get(1)->IsEmpty());
}
}
}
void SbRtl_IsError(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- SbxVariable* pVar =rPar.Get32(1);
+ SbxVariable* pVar = rPar.Get(1);
SbUnoObject* pObj = dynamic_cast<SbUnoObject*>( pVar );
if ( !pObj )
{
@@ -2451,18 +2449,18 @@ void SbRtl_IsError(StarBASIC *, SbxArray & rPar, bool)
}
if ( xError.is() )
{
- rPar.Get32(0)->PutBool( xError->hasError() );
+ rPar.Get(0)->PutBool(xError->hasError());
}
else
{
- rPar.Get32(0)->PutBool( rPar.Get32(1)->IsErr() );
+ rPar.Get(0)->PutBool(rPar.Get(1)->IsErr());
}
}
}
void SbRtl_IsNull(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
@@ -2470,8 +2468,8 @@ void SbRtl_IsNull(StarBASIC *, SbxArray & rPar, bool)
{
// #51475 because of Uno-objects return true
// even if the pObj value is NULL
- SbxVariableRef pArg = rPar.Get32(1);
- bool bNull = rPar.Get32(1)->IsNull();
+ SbxVariableRef pArg = rPar.Get(1);
+ bool bNull = rPar.Get(1)->IsNull();
if( !bNull && pArg->GetType() == SbxOBJECT )
{
SbxBase* pObj = pArg->GetObject();
@@ -2480,33 +2478,33 @@ void SbRtl_IsNull(StarBASIC *, SbxArray & rPar, bool)
bNull = true;
}
}
- rPar.Get32(0)->PutBool( bNull );
+ rPar.Get(0)->PutBool(bNull);
}
}
void SbRtl_IsNumeric(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- rPar.Get32(0)->PutBool( rPar.Get32(1)->IsNumericRTL() );
+ rPar.Get(0)->PutBool(rPar.Get(1)->IsNumericRTL());
}
}
void SbRtl_IsMissing(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
// #57915 Missing is reported by an error
- rPar.Get32(0)->PutBool( rPar.Get32(1)->IsErr() );
+ rPar.Get(0)->PutBool(rPar.Get(1)->IsErr());
}
}
@@ -2624,7 +2622,7 @@ void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool)
{
OUString aPath;
- const sal_uInt32 nParCount = rPar.Count32();
+ const sal_uInt32 nParCount = rPar.Count();
if( nParCount > 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -2640,7 +2638,7 @@ void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool)
{
if ( nParCount >= 2 )
{
- OUString aFileParam = rPar.Get32(1)->GetOUString();
+ OUString aFileParam = rPar.Get(1)->GetOUString();
OUString aFileURLStr = implSetupWildcard(aFileParam, rRTLData);
if (!rRTLData.sFullNameToBeChecked.isEmpty())
@@ -2656,7 +2654,7 @@ void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool)
aNameOnlyStr = aFileURL.getName( INetURLObject::LAST_SEGMENT,
true, INetURLObject::DecodeMechanism::WithCharset );
}
- rPar.Get32(0)->PutString( aNameOnlyStr );
+ rPar.Get(0)->PutString(aNameOnlyStr);
return;
}
@@ -2671,14 +2669,14 @@ void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool)
}
else
{
- rPar.Get32(0)->PutString( "" );
+ rPar.Get(0)->PutString("");
}
SbAttributes nFlags = SbAttributes::NONE;
if ( nParCount > 2 )
{
rRTLData.nDirFlags = nFlags
- = static_cast<SbAttributes>(rPar.Get32(2)->GetInteger());
+ = static_cast<SbAttributes>(rPar.Get(2)->GetInteger());
}
else
{
@@ -2778,7 +2776,7 @@ void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool)
break;
}
}
- rPar.Get32(0)->PutString( aPath );
+ rPar.Get(0)->PutString(aPath);
}
}
else
@@ -2786,7 +2784,7 @@ void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool)
// TODO: OSL
if ( nParCount >= 2 )
{
- OUString aFileParam = rPar.Get32(1)->GetOUString();
+ OUString aFileParam = rPar.Get(1)->GetOUString();
OUString aDirURL = implSetupWildcard(aFileParam, rRTLData);
@@ -2794,7 +2792,7 @@ void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool)
if ( nParCount > 2 )
{
rRTLData.nDirFlags = nFlags
- = static_cast<SbAttributes>(rPar.Get32(2)->GetInteger());
+ = static_cast<SbAttributes>(rPar.Get(2)->GetInteger());
}
else
{
@@ -2808,7 +2806,7 @@ void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool)
if( nRet != FileBase::E_None )
{
rRTLData.pDir.reset();
- rPar.Get32(0)->PutString( OUString() );
+ rPar.Get(0)->PutString(OUString());
return;
}
@@ -2889,7 +2887,7 @@ void SbRtl_Dir(StarBASIC *, SbxArray & rPar, bool)
break;
}
}
- rPar.Get32(0)->PutString( aPath );
+ rPar.Get(0)->PutString(aPath);
}
}
}
@@ -2900,7 +2898,7 @@ void SbRtl_GetAttr(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
(void)pBasic;
(void)bWrite;
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
sal_Int16 nFlags = 0;
@@ -2909,7 +2907,7 @@ void SbRtl_GetAttr(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
#if defined(_WIN32)
if( SbiRuntime::isVBAEnabled() )
{
- OUString aPathURL = getFullPath( rPar.Get32(1)->GetOUString() );
+ OUString aPathURL = getFullPath(rPar.Get(1)->GetOUString());
OUString aPath;
FileBase::getSystemPathFromFileURL( aPathURL, aPath );
DWORD nRealFlags = GetFileAttributesW (o3tl::toW(aPath.getStr()));
@@ -2925,7 +2923,7 @@ void SbRtl_GetAttr(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
{
StarBASIC::Error( ERRCODE_BASIC_FILE_NOT_FOUND );
}
- rPar.Get32(0)->PutInteger( nFlags );
+ rPar.Get(0)->PutInteger(nFlags);
return;
}
@@ -2938,7 +2936,7 @@ void SbRtl_GetAttr(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
{
try
{
- OUString aPath = getFullPath( rPar.Get32(1)->GetOUString() );
+ OUString aPath = getFullPath(rPar.Get(1)->GetOUString());
bool bExists = false;
try { bExists = xSFI->exists( aPath ); }
catch(const Exception & ) {}
@@ -2973,7 +2971,7 @@ void SbRtl_GetAttr(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
else
{
DirectoryItem aItem;
- (void)DirectoryItem::get( getFullPath( rPar.Get32(1)->GetOUString() ), aItem );
+ (void)DirectoryItem::get(getFullPath(rPar.Get(1)->GetOUString()), aItem);
FileStatus aFileStatus( osl_FileStatus_Mask_Attributes | osl_FileStatus_Mask_Type );
(void)aItem.getFileStatus( aFileStatus );
sal_uInt64 nAttributes = aFileStatus.getAttributes();
@@ -2990,7 +2988,7 @@ void SbRtl_GetAttr(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
nFlags |= sal_uInt16(SbAttributes::DIRECTORY);
}
}
- rPar.Get32(0)->PutInteger( nFlags );
+ rPar.Get(0)->PutInteger(nFlags);
}
else
{
@@ -3001,13 +2999,13 @@ void SbRtl_GetAttr(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
void SbRtl_FileDateTime(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- OUString aPath = rPar.Get32(1)->GetOUString();
+ OUString aPath = rPar.Get(1)->GetOUString();
tools::Time aTime( tools::Time::EMPTY );
Date aDate( Date::EMPTY );
if( hasUno() )
@@ -3093,7 +3091,7 @@ void SbRtl_FileDateTime(StarBASIC *, SbxArray & rPar, bool)
pFormatter->GetOutputString( fSerial, nIndex, aRes, &pCol );
}
- rPar.Get32(0)->PutString( aRes );
+ rPar.Get(0)->PutString(aRes);
}
}
@@ -3101,13 +3099,13 @@ void SbRtl_FileDateTime(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_EOF(StarBASIC *, SbxArray & rPar, bool)
{
// No changes for UCB
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- sal_Int16 nChannel = rPar.Get32(1)->GetInteger();
+ sal_Int16 nChannel = rPar.Get(1)->GetInteger();
SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIO->GetStream( nChannel );
if ( !pSbStrm )
@@ -3131,7 +3129,7 @@ void SbRtl_EOF(StarBASIC *, SbxArray & rPar, bool)
{
beof = pSvStrm->eof(); // for binary data!
}
- rPar.Get32(0)->PutBool( beof );
+ rPar.Get(0)->PutBool(beof);
}
}
@@ -3142,13 +3140,13 @@ void SbRtl_FileAttr(StarBASIC *, SbxArray & rPar, bool)
// not touched by the adjustment to virtual URLs, as it only works on
// already opened files and the name doesn't matter there.
- if ( rPar.Count32() != 3 )
+ if (rPar.Count() != 3)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- sal_Int16 nChannel = rPar.Get32(1)->GetInteger();
+ sal_Int16 nChannel = rPar.Get(1)->GetInteger();
SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIO->GetStream( nChannel );
if ( !pSbStrm )
@@ -3157,7 +3155,7 @@ void SbRtl_FileAttr(StarBASIC *, SbxArray & rPar, bool)
return;
}
sal_Int16 nRet;
- if ( rPar.Get32(2)->GetInteger() == 1 )
+ if (rPar.Get(2)->GetInteger() == 1)
{
nRet = static_cast<sal_Int16>(pSbStrm->GetMode());
}
@@ -3165,19 +3163,19 @@ void SbRtl_FileAttr(StarBASIC *, SbxArray & rPar, bool)
{
nRet = 0; // System file handle not supported
}
- rPar.Get32(0)->PutInteger( nRet );
+ rPar.Get(0)->PutInteger(nRet);
}
}
void SbRtl_Loc(StarBASIC *, SbxArray & rPar, bool)
{
// No changes for UCB
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- sal_Int16 nChannel = rPar.Get32(1)->GetInteger();
+ sal_Int16 nChannel = rPar.Get(1)->GetInteger();
SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIO->GetStream( nChannel );
if ( !pSbStrm )
@@ -3209,20 +3207,20 @@ void SbRtl_Loc(StarBASIC *, SbxArray & rPar, bool)
{
nPos = pSvStrm->Tell();
}
- rPar.Get32(0)->PutLong( static_cast<sal_Int32>(nPos) );
+ rPar.Get(0)->PutLong(static_cast<sal_Int32>(nPos));
}
}
void SbRtl_Lof(StarBASIC *, SbxArray & rPar, bool)
{
// No changes for UCB
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- sal_Int16 nChannel = rPar.Get32(1)->GetInteger();
+ sal_Int16 nChannel = rPar.Get(1)->GetInteger();
SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIO->GetStream( nChannel );
if ( !pSbStrm )
@@ -3232,7 +3230,7 @@ void SbRtl_Lof(StarBASIC *, SbxArray & rPar, bool)
}
SvStream* pSvStrm = pSbStrm->GetStrm();
sal_uInt64 const nLen = pSvStrm->TellEnd();
- rPar.Get32(0)->PutLong( static_cast<sal_Int32>(nLen) );
+ rPar.Get(0)->PutLong(static_cast<sal_Int32>(nLen));
}
}
@@ -3240,13 +3238,13 @@ void SbRtl_Lof(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Seek(StarBASIC *, SbxArray & rPar, bool)
{
// No changes for UCB
- int nArgs = static_cast<int>(rPar.Count32());
+ int nArgs = static_cast<int>(rPar.Count());
if ( nArgs < 2 || nArgs > 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- sal_Int16 nChannel = rPar.Get32(1)->GetInteger();
+ sal_Int16 nChannel = rPar.Get(1)->GetInteger();
SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIO->GetStream( nChannel );
if ( !pSbStrm )
@@ -3264,11 +3262,11 @@ void SbRtl_Seek(StarBASIC *, SbxArray & rPar, bool)
nPos = nPos / pSbStrm->GetBlockLen();
}
nPos++; // Basic counts from 1
- rPar.Get32(0)->PutLong( static_cast<sal_Int32>(nPos) );
+ rPar.Get(0)->PutLong(static_cast<sal_Int32>(nPos));
}
else // Seek-Statement
{
- sal_Int32 nPos = rPar.Get32(2)->GetLong();
+ sal_Int32 nPos = rPar.Get(2)->GetLong();
if ( nPos < 1 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -3287,7 +3285,7 @@ void SbRtl_Seek(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Format(StarBASIC *, SbxArray & rPar, bool)
{
- const sal_uInt32 nArgCount = rPar.Count32();
+ const sal_uInt32 nArgCount = rPar.Count();
if ( nArgCount < 2 || nArgCount > 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -3297,21 +3295,21 @@ void SbRtl_Format(StarBASIC *, SbxArray & rPar, bool)
OUString aResult;
if( nArgCount == 2 )
{
- rPar.Get32(1)->Format( aResult );
+ rPar.Get(1)->Format(aResult);
}
else
{
- OUString aFmt( rPar.Get32(2)->GetOUString() );
- rPar.Get32(1)->Format( aResult, &aFmt );
+ OUString aFmt(rPar.Get(2)->GetOUString());
+ rPar.Get(1)->Format(aResult, &aFmt);
}
- rPar.Get32(0)->PutString( aResult );
+ rPar.Get(0)->PutString(aResult);
}
}
// https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/formatnumber-function
void SbRtl_FormatNumber(StarBASIC*, SbxArray& rPar, bool)
{
- const sal_uInt32 nArgCount = rPar.Count32();
+ const sal_uInt32 nArgCount = rPar.Count();
if (nArgCount < 2 || nArgCount > 6)
{
StarBASIC::Error(ERRCODE_BASIC_BAD_ARGUMENT);
@@ -3321,9 +3319,9 @@ void SbRtl_FormatNumber(StarBASIC*, SbxArray& rPar, bool)
// The UI locale never changes -> we can use static value here
static const LocaleDataWrapper localeData(Application::GetSettings().GetUILanguageTag());
sal_Int16 nNumDigitsAfterDecimal = -1;
- if (nArgCount > 2 && !rPar.Get32(2)->IsEmpty())
+ if (nArgCount > 2 && !rPar.Get(2)->IsEmpty())
{
- nNumDigitsAfterDecimal = rPar.Get32(2)->GetInteger();
+ nNumDigitsAfterDecimal = rPar.Get(2)->GetInteger();
if (nNumDigitsAfterDecimal < -1)
{
StarBASIC::Error(ERRCODE_BASIC_BAD_ARGUMENT);
@@ -3336,9 +3334,9 @@ void SbRtl_FormatNumber(StarBASIC*, SbxArray& rPar, bool)
nNumDigitsAfterDecimal = LocaleDataWrapper::getNumDigits();
bool bIncludeLeadingDigit = LocaleDataWrapper::isNumLeadingZero();
- if (nArgCount > 3 && !rPar.Get32(3)->IsEmpty())
+ if (nArgCount > 3 && !rPar.Get(3)->IsEmpty())
{
- switch (rPar.Get32(3)->GetInteger())
+ switch (rPar.Get(3)->GetInteger())
{
case ooo::vba::VbTriState::vbFalse:
bIncludeLeadingDigit = false;
@@ -3356,9 +3354,9 @@ void SbRtl_FormatNumber(StarBASIC*, SbxArray& rPar, bool)
}
bool bUseParensForNegativeNumbers = false;
- if (nArgCount > 4 && !rPar.Get32(4)->IsEmpty())
+ if (nArgCount > 4 && !rPar.Get(4)->IsEmpty())
{
- switch (rPar.Get32(4)->GetInteger())
+ switch (rPar.Get(4)->GetInteger())
{
case ooo::vba::VbTriState::vbFalse:
case ooo::vba::VbTriState::vbUseDefault:
@@ -3374,9 +3372,9 @@ void SbRtl_FormatNumber(StarBASIC*, SbxArray& rPar, bool)
}
bool bGroupDigits = false;
- if (nArgCount > 5 && !rPar.Get32(5)->IsEmpty())
+ if (nArgCount > 5 && !rPar.Get(5)->IsEmpty())
{
- switch (rPar.Get32(5)->GetInteger())
+ switch (rPar.Get(5)->GetInteger())
{
case ooo::vba::VbTriState::vbFalse:
case ooo::vba::VbTriState::vbUseDefault:
@@ -3391,7 +3389,7 @@ void SbRtl_FormatNumber(StarBASIC*, SbxArray& rPar, bool)
}
}
- double fVal = rPar.Get32(1)->GetDouble();
+ double fVal = rPar.Get(1)->GetDouble();
const bool bNegative = fVal < 0;
if (bNegative)
fVal = fabs(fVal); // Always work with non-negatives, to easily handle leading zero
@@ -3432,7 +3430,7 @@ void SbRtl_FormatNumber(StarBASIC*, SbxArray& rPar, bool)
aResult = "-" + aResult;
}
- rPar.Get32(0)->PutString(aResult);
+ rPar.Get(0)->PutString(aResult);
}
namespace {
@@ -3469,13 +3467,13 @@ class theRandomNumberGenerator : public rtl::Static<RandomNumberGenerator, theRa
void SbRtl_Randomize(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() > 2 )
+ if (rPar.Count() > 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- if( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- int nSeed = static_cast<int>(rPar.Get32(1)->GetInteger());
+ int nSeed = static_cast<int>(rPar.Get(1)->GetInteger());
theRandomNumberGenerator::get().global_rng.seed(nSeed);
}
// without parameter, no need to do anything - RNG is seeded at first use
@@ -3483,7 +3481,7 @@ void SbRtl_Randomize(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Rnd(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() > 2 )
+ if (rPar.Count() > 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
@@ -3491,7 +3489,7 @@ void SbRtl_Rnd(StarBASIC *, SbxArray & rPar, bool)
{
std::uniform_real_distribution<double> dist(0.0, 1.0);
double const tmp(dist(theRandomNumberGenerator::get().global_rng));
- rPar.Get32(0)->PutDouble(tmp);
+ rPar.Get(0)->PutDouble(tmp);
}
}
@@ -3507,21 +3505,21 @@ void SbRtl_Rnd(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool)
{
- const sal_uInt32 nArgCount = rPar.Count32();
+ const sal_uInt32 nArgCount = rPar.Count();
if ( nArgCount < 2 || nArgCount > 5 )
{
- rPar.Get32(0)->PutLong(0);
+ rPar.Get(0)->PutLong(0);
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
oslProcessOption nOptions = osl_Process_SEARCHPATH | osl_Process_DETACHED;
- OUString aCmdLine = rPar.Get32(1)->GetOUString();
+ OUString aCmdLine = rPar.Get(1)->GetOUString();
// attach additional parameters - everything must be parsed anyway
if( nArgCount >= 4 )
{
- OUString tmp = rPar.Get32(3)->GetOUString().trim();
+ OUString tmp = rPar.Get(3)->GetOUString().trim();
if (!tmp.isEmpty())
{
aCmdLine += " " + tmp;
@@ -3592,7 +3590,7 @@ void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool)
sal_Int16 nWinStyle = 0;
if( nArgCount >= 3 )
{
- nWinStyle = rPar.Get32(2)->GetInteger();
+ nWinStyle = rPar.Get(2)->GetInteger();
switch( nWinStyle )
{
case 2:
@@ -3609,7 +3607,7 @@ void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool)
bool bSync = false;
if( nArgCount >= 5 )
{
- bSync = rPar.Get32(4)->GetBool();
+ bSync = rPar.Get(4)->GetBool();
}
if( bSync )
{
@@ -3664,21 +3662,21 @@ void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool)
}
else
{
- rPar.Get32(0)->PutLong( 0 );
+ rPar.Get(0)->PutLong(0);
}
}
}
void SbRtl_VarType(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- SbxDataType eType = rPar.Get32(1)->GetType();
- rPar.Get32(0)->PutInteger( static_cast<sal_Int16>(eType) );
+ SbxDataType eType = rPar.Get(1)->GetType();
+ rPar.Get(0)->PutInteger(static_cast<sal_Int16>(eType));
}
}
@@ -3801,19 +3799,19 @@ static OUString getObjectTypeName( SbxVariable* pVar )
void SbRtl_TypeName(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- SbxDataType eType = rPar.Get32(1)->GetType();
+ SbxDataType eType = rPar.Get(1)->GetType();
bool bIsArray = ( ( eType & SbxARRAY ) != 0 );
OUString aRetStr;
if ( SbiRuntime::isVBAEnabled() && eType == SbxOBJECT )
{
- aRetStr = getObjectTypeName( rPar.Get32(1) );
+ aRetStr = getObjectTypeName(rPar.Get(1));
}
else
{
@@ -3823,33 +3821,33 @@ void SbRtl_TypeName(StarBASIC *, SbxArray & rPar, bool)
{
aRetStr += "()";
}
- rPar.Get32(0)->PutString( aRetStr );
+ rPar.Get(0)->PutString(aRetStr);
}
}
void SbRtl_Len(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- const OUString& rStr = rPar.Get32(1)->GetOUString();
- rPar.Get32(0)->PutLong( rStr.getLength() );
+ const OUString& rStr = rPar.Get(1)->GetOUString();
+ rPar.Get(0)->PutLong(rStr.getLength());
}
}
void SbRtl_DDEInitiate(StarBASIC *, SbxArray & rPar, bool)
{
- int nArgs = static_cast<int>(rPar.Count32());
+ int nArgs = static_cast<int>(rPar.Count());
if ( nArgs != 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- const OUString& rApp = rPar.Get32(1)->GetOUString();
- const OUString& rTopic = rPar.Get32(2)->GetOUString();
+ const OUString& rApp = rPar.Get(1)->GetOUString();
+ const OUString& rTopic = rPar.Get(2)->GetOUString();
SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
size_t nChannel;
@@ -3860,20 +3858,20 @@ void SbRtl_DDEInitiate(StarBASIC *, SbxArray & rPar, bool)
}
else
{
- rPar.Get32(0)->PutInteger( static_cast<sal_Int16>(nChannel) );
+ rPar.Get(0)->PutInteger(static_cast<sal_Int16>(nChannel));
}
}
void SbRtl_DDETerminate(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutEmpty();
- int nArgs = static_cast<int>(rPar.Count32());
+ rPar.Get(0)->PutEmpty();
+ int nArgs = static_cast<int>(rPar.Count());
if ( nArgs != 2 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- size_t nChannel = rPar.Get32(1)->GetInteger();
+ size_t nChannel = rPar.Get(1)->GetInteger();
SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
ErrCode nDdeErr = pDDE->Terminate( nChannel );
if( nDdeErr )
@@ -3884,8 +3882,8 @@ void SbRtl_DDETerminate(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_DDETerminateAll(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutEmpty();
- int nArgs = static_cast<int>(rPar.Count32());
+ rPar.Get(0)->PutEmpty();
+ int nArgs = static_cast<int>(rPar.Count());
if ( nArgs != 1 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -3902,14 +3900,14 @@ void SbRtl_DDETerminateAll(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_DDERequest(StarBASIC *, SbxArray & rPar, bool)
{
- int nArgs = static_cast<int>(rPar.Count32());
+ int nArgs = static_cast<int>(rPar.Count());
if ( nArgs != 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- size_t nChannel = rPar.Get32(1)->GetInteger();
- const OUString& rItem = rPar.Get32(2)->GetOUString();
+ size_t nChannel = rPar.Get(1)->GetInteger();
+ const OUString& rItem = rPar.Get(2)->GetOUString();
SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
OUString aResult;
ErrCode nDdeErr = pDDE->Request( nChannel, rItem, aResult );
@@ -3919,21 +3917,21 @@ void SbRtl_DDERequest(StarBASIC *, SbxArray & rPar, bool)
}
else
{
- rPar.Get32(0)->PutString( aResult );
+ rPar.Get(0)->PutString(aResult);
}
}
void SbRtl_DDEExecute(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutEmpty();
- int nArgs = static_cast<int>(rPar.Count32());
+ rPar.Get(0)->PutEmpty();
+ int nArgs = static_cast<int>(rPar.Count());
if ( nArgs != 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- size_t nChannel = rPar.Get32(1)->GetInteger();
- const OUString& rCommand = rPar.Get32(2)->GetOUString();
+ size_t nChannel = rPar.Get(1)->GetInteger();
+ const OUString& rCommand = rPar.Get(2)->GetOUString();
SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
ErrCode nDdeErr = pDDE->Execute( nChannel, rCommand );
if( nDdeErr )
@@ -3944,16 +3942,16 @@ void SbRtl_DDEExecute(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_DDEPoke(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutEmpty();
- int nArgs = static_cast<int>(rPar.Count32());
+ rPar.Get(0)->PutEmpty();
+ int nArgs = static_cast<int>(rPar.Count());
if ( nArgs != 4 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- size_t nChannel = rPar.Get32(1)->GetInteger();
- const OUString& rItem = rPar.Get32(2)->GetOUString();
- const OUString& rData = rPar.Get32(3)->GetOUString();
+ size_t nChannel = rPar.Get(1)->GetInteger();
+ const OUString& rItem = rPar.Get(2)->GetOUString();
+ const OUString& rData = rPar.Get(3)->GetOUString();
SbiDdeControl* pDDE = GetSbData()->pInst->GetDdeControl();
ErrCode nDdeErr = pDDE->Poke( nChannel, rItem, rData );
if( nDdeErr )
@@ -3965,7 +3963,7 @@ void SbRtl_DDEPoke(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_FreeFile(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 1 )
+ if (rPar.Count() != 1)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
@@ -3977,7 +3975,7 @@ void SbRtl_FreeFile(StarBASIC *, SbxArray & rPar, bool)
SbiStream* pStrm = pIO->GetStream( nChannel );
if( !pStrm )
{
- rPar.Get32(0)->PutInteger( nChannel );
+ rPar.Get(0)->PutInteger(nChannel);
return;
}
nChannel++;
@@ -3987,22 +3985,22 @@ void SbRtl_FreeFile(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_LBound(StarBASIC *, SbxArray & rPar, bool)
{
- const sal_uInt32 nParCount = rPar.Count32();
+ const sal_uInt32 nParCount = rPar.Count();
if ( nParCount != 3 && nParCount != 2 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- SbxBase* pParObj = rPar.Get32(1)->GetObject();
+ SbxBase* pParObj = rPar.Get(1)->GetObject();
SbxDimArray* pArr = dynamic_cast<SbxDimArray*>( pParObj );
if( pArr )
{
sal_Int32 nLower, nUpper;
- short nDim = (nParCount == 3) ? static_cast<short>(rPar.Get32(2)->GetInteger()) : 1;
- if( !pArr->GetDim32( nDim, nLower, nUpper ) )
+ short nDim = (nParCount == 3) ? static_cast<short>(rPar.Get(2)->GetInteger()) : 1;
+ if (!pArr->GetDim(nDim, nLower, nUpper))
StarBASIC::Error( ERRCODE_BASIC_OUT_OF_RANGE );
else
- rPar.Get32(0)->PutLong( nLower );
+ rPar.Get(0)->PutLong(nLower);
}
else
StarBASIC::Error( ERRCODE_BASIC_MUST_HAVE_DIMS );
@@ -4010,23 +4008,23 @@ void SbRtl_LBound(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_UBound(StarBASIC *, SbxArray & rPar, bool)
{
- const sal_uInt32 nParCount = rPar.Count32();
+ const sal_uInt32 nParCount = rPar.Count();
if ( nParCount != 3 && nParCount != 2 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- SbxBase* pParObj = rPar.Get32(1)->GetObject();
+ SbxBase* pParObj = rPar.Get(1)->GetObject();
SbxDimArray* pArr = dynamic_cast<SbxDimArray*>( pParObj );
if( pArr )
{
sal_Int32 nLower, nUpper;
- short nDim = (nParCount == 3) ? static_cast<short>(rPar.Get32(2)->GetInteger()) : 1;
- if( !pArr->GetDim32( nDim, nLower, nUpper ) )
+ short nDim = (nParCount == 3) ? static_cast<short>(rPar.Get(2)->GetInteger()) : 1;
+ if (!pArr->GetDim(nDim, nLower, nUpper))
StarBASIC::Error( ERRCODE_BASIC_OUT_OF_RANGE );
else
- rPar.Get32(0)->PutLong( nUpper );
+ rPar.Get(0)->PutLong(nUpper);
}
else
StarBASIC::Error( ERRCODE_BASIC_MUST_HAVE_DIMS );
@@ -4034,15 +4032,15 @@ void SbRtl_UBound(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_RGB(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 4 )
+ if (rPar.Count() != 4)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- sal_Int32 nRed = rPar.Get32(1)->GetInteger() & 0xFF;
- sal_Int32 nGreen = rPar.Get32(2)->GetInteger() & 0xFF;
- sal_Int32 nBlue = rPar.Get32(3)->GetInteger() & 0xFF;
+ sal_Int32 nRed = rPar.Get(1)->GetInteger() & 0xFF;
+ sal_Int32 nGreen = rPar.Get(2)->GetInteger() & 0xFF;
+ sal_Int32 nBlue = rPar.Get(3)->GetInteger() & 0xFF;
sal_Int32 nRGB;
SbiInstance* pInst = GetSbData()->pInst;
@@ -4055,7 +4053,7 @@ void SbRtl_RGB(StarBASIC *, SbxArray & rPar, bool)
{
nRGB = (nRed << 16) | (nGreen << 8) | nBlue;
}
- rPar.Get32(0)->PutLong( nRGB );
+ rPar.Get(0)->PutLong(nRGB);
}
void SbRtl_QBColor(StarBASIC *, SbxArray & rPar, bool)
@@ -4080,40 +4078,40 @@ void SbRtl_QBColor(StarBASIC *, SbxArray & rPar, bool)
0xFFFFFF,
};
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- sal_Int16 nCol = rPar.Get32(1)->GetInteger();
+ sal_Int16 nCol = rPar.Get(1)->GetInteger();
if( nCol < 0 || nCol > 15 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
sal_Int32 nRGB = pRGB[ nCol ];
- rPar.Get32(0)->PutLong( nRGB );
+ rPar.Get(0)->PutLong(nRGB);
}
// StrConv(string, conversion, LCID)
void SbRtl_StrConv(StarBASIC *, SbxArray & rPar, bool)
{
- const sal_uInt32 nArgCount = rPar.Count32()-1;
+ const sal_uInt32 nArgCount = rPar.Count() - 1;
if( nArgCount < 2 || nArgCount > 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- OUString aOldStr = rPar.Get32(1)->GetOUString();
- sal_Int32 nConversion = rPar.Get32(2)->GetLong();
+ OUString aOldStr = rPar.Get(1)->GetOUString();
+ sal_Int32 nConversion = rPar.Get(2)->GetLong();
sal_Int32 nOldLen = aOldStr.getLength();
if( nOldLen == 0 )
{
// null string,return
- rPar.Get32(0)->PutString(aOldStr);
+ rPar.Get(0)->PutString(aOldStr);
return;
}
@@ -4177,7 +4175,7 @@ void SbRtl_StrConv(StarBASIC *, SbxArray & rPar, bool)
// there is no concept about default codepage in unix. so it is incorrectly in unix
OUString aOUStr = OStringToOUString(aOStr, osl_getThreadTextEncoding());
- rPar.Get32(0)->PutString( aOUStr );
+ rPar.Get(0)->PutString(aOUStr);
return;
}
else if ( (nConversion & 0x80) == 128 ) // vbFromUnicode
@@ -4192,16 +4190,16 @@ void SbRtl_StrConv(StarBASIC *, SbxArray & rPar, bool)
{
if( bIncIndex )
{
- pArray->AddDim32( 1, nArraySize );
+ pArray->AddDim(1, nArraySize);
}
else
{
- pArray->AddDim32( 0, nArraySize-1 );
+ pArray->AddDim(0, nArraySize - 1);
}
}
else
{
- pArray->unoAddDim32( 0, -1 );
+ pArray->unoAddDim(0, -1);
}
for( sal_Int32 i=0; i< nArraySize; i++)
@@ -4216,10 +4214,10 @@ void SbRtl_StrConv(StarBASIC *, SbxArray & rPar, bool)
{
++aIdx[0];
}
- pArray->Put32(pNew, aIdx);
+ pArray->Put(pNew, aIdx);
}
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
SbxFlagBits nFlags = refVar->GetFlags();
refVar->ResetFlag( SbxFlagBits::Fixed );
refVar->PutObject( pArray );
@@ -4227,13 +4225,13 @@ void SbRtl_StrConv(StarBASIC *, SbxArray & rPar, bool)
refVar->SetParameters( nullptr );
return;
}
- rPar.Get32(0)->PutString(aNewStr);
+ rPar.Get(0)->PutString(aNewStr);
}
void SbRtl_Beep(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 1 )
+ if (rPar.Count() != 1)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
@@ -4243,14 +4241,14 @@ void SbRtl_Beep(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Load(StarBASIC *, SbxArray & rPar, bool)
{
- if( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- SbxBase* pObj = rPar.Get32(1)->GetObject();
+ SbxBase* pObj = rPar.Get(1)->GetObject();
if ( !pObj )
return;
@@ -4270,15 +4268,15 @@ void SbRtl_Load(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Unload(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutEmpty();
- if( rPar.Count32() != 2 )
+ rPar.Get(0)->PutEmpty();
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- SbxBase* pObj = rPar.Get32(1)->GetObject();
+ SbxBase* pObj = rPar.Get(1)->GetObject();
if ( !pObj )
return;
@@ -4298,13 +4296,13 @@ void SbRtl_Unload(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_LoadPicture(StarBASIC *, SbxArray & rPar, bool)
{
- if( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- OUString aFileURL = getFullPath( rPar.Get32(1)->GetOUString() );
+ OUString aFileURL = getFullPath(rPar.Get(1)->GetOUString());
std::unique_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream( aFileURL, StreamMode::READ ));
if( pStream )
{
@@ -4315,23 +4313,23 @@ void SbRtl_LoadPicture(StarBASIC *, SbxArray & rPar, bool)
SbxObjectRef xRef = new SbStdPicture;
static_cast<SbStdPicture*>(xRef.get())->SetGraphic( aGraphic );
- rPar.Get32(0)->PutObject( xRef.get() );
+ rPar.Get(0)->PutObject(xRef.get());
}
}
void SbRtl_SavePicture(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutEmpty();
- if( rPar.Count32() != 3 )
+ rPar.Get(0)->PutEmpty();
+ if (rPar.Count() != 3)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- SbxBase* pObj = rPar.Get32(1)->GetObject();
+ SbxBase* pObj = rPar.Get(1)->GetObject();
if (SbStdPicture *pPicture = dynamic_cast<SbStdPicture*>(pObj))
{
- SvFileStream aOStream( rPar.Get32(2)->GetOUString(), StreamMode::WRITE | StreamMode::TRUNC );
+ SvFileStream aOStream(rPar.Get(2)->GetOUString(), StreamMode::WRITE | StreamMode::TRUNC);
const Graphic& aGraphic = pPicture->GetGraphic();
TypeSerializer aSerializer(aOStream);
aSerializer.writeGraphic(aGraphic);
@@ -4340,7 +4338,7 @@ void SbRtl_SavePicture(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool)
{
- const sal_uInt32 nArgCount = rPar.Count32();
+ const sal_uInt32 nArgCount = rPar.Count();
if( nArgCount < 2 || nArgCount > 6 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -4348,7 +4346,7 @@ void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool)
}
WinBits nType = 0; // MB_OK
if( nArgCount >= 3 )
- nType = static_cast<WinBits>(rPar.Get32(2)->GetInteger());
+ nType = static_cast<WinBits>(rPar.Get(2)->GetInteger());
WinBits nStyle = nType;
nStyle &= 15; // delete bits 4-16
if (nStyle > 5)
@@ -4365,11 +4363,11 @@ void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool)
No = 7
};
- OUString aMsg = rPar.Get32(1)->GetOUString();
+ OUString aMsg = rPar.Get(1)->GetOUString();
OUString aTitle;
if( nArgCount >= 4 )
{
- aTitle = rPar.Get32(3)->GetOUString();
+ aTitle = rPar.Get(3)->GetOUString();
}
else
{
@@ -4467,16 +4465,16 @@ void SbRtl_MsgBox(StarBASIC *, SbxArray & rPar, bool)
xBox->set_title(aTitle);
sal_Int16 nRet = xBox->run();
- rPar.Get32(0)->PutInteger(nRet);
+ rPar.Get(0)->PutInteger(nRet);
}
void SbRtl_SetAttr(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutEmpty();
- if ( rPar.Count32() == 3 )
+ rPar.Get(0)->PutEmpty();
+ if (rPar.Count() == 3)
{
- OUString aStr = rPar.Get32(1)->GetOUString();
- SbAttributes nFlags = static_cast<SbAttributes>( rPar.Get32(2)->GetInteger() );
+ OUString aStr = rPar.Get(1)->GetOUString();
+ SbAttributes nFlags = static_cast<SbAttributes>(rPar.Get(2)->GetInteger());
if( hasUno() )
{
@@ -4514,7 +4512,7 @@ void SbRtl_Reset(StarBASIC *, SbxArray &, bool)
void SbRtl_DumpAllObjects(StarBASIC * pBasic, SbxArray & rPar, bool)
{
- const sal_uInt32 nArgCount = rPar.Count32();
+ const sal_uInt32 nArgCount = rPar.Count();
if( nArgCount < 2 || nArgCount > 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -4530,9 +4528,9 @@ void SbRtl_DumpAllObjects(StarBASIC * pBasic, SbxArray & rPar, bool)
{
p = p->GetParent();
}
- SvFileStream aStrm( rPar.Get32(1)->GetOUString(),
+ SvFileStream aStrm(rPar.Get(1)->GetOUString(),
StreamMode::WRITE | StreamMode::TRUNC );
- p->Dump( aStrm, rPar.Get32(2)->GetBool() );
+ p->Dump(aStrm, rPar.Get(2)->GetBool());
aStrm.Close();
if( aStrm.GetError() != ERRCODE_NONE )
{
@@ -4544,9 +4542,9 @@ void SbRtl_DumpAllObjects(StarBASIC * pBasic, SbxArray & rPar, bool)
void SbRtl_FileExists(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- OUString aStr = rPar.Get32(1)->GetOUString();
+ OUString aStr = rPar.Get(1)->GetOUString();
bool bExists = false;
if( hasUno() )
@@ -4570,7 +4568,7 @@ void SbRtl_FileExists(StarBASIC *, SbxArray & rPar, bool)
FileBase::RC nRet = DirectoryItem::get( getFullPath( aStr ), aItem );
bExists = (nRet == FileBase::E_None);
}
- rPar.Get32(0)->PutBool( bExists );
+ rPar.Get(0)->PutBool(bExists);
}
else
{
@@ -4580,16 +4578,16 @@ void SbRtl_FileExists(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Partition(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 5 )
+ if (rPar.Count() != 5)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- sal_Int32 nNumber = rPar.Get32(1)->GetLong();
- sal_Int32 nStart = rPar.Get32(2)->GetLong();
- sal_Int32 nStop = rPar.Get32(3)->GetLong();
- sal_Int32 nInterval = rPar.Get32(4)->GetLong();
+ sal_Int32 nNumber = rPar.Get(1)->GetLong();
+ sal_Int32 nStart = rPar.Get(2)->GetLong();
+ sal_Int32 nStop = rPar.Get(3)->GetLong();
+ sal_Int32 nInterval = rPar.Get(4)->GetLong();
if( nStart < 0 || nStop <= nStart || nInterval < 1 )
{
@@ -4655,7 +4653,7 @@ void SbRtl_Partition(StarBASIC *, SbxArray & rPar, bool)
}
}
aRetStr.append( aUpperValue );
- rPar.Get32(0)->PutString( aRetStr.makeStringAndClear());
+ rPar.Get(0)->PutString(aRetStr.makeStringAndClear());
}
#endif
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index c847df8d26e6..3fc1b0c2bf3a 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -104,7 +104,7 @@ void SbRtl_CallByName(StarBASIC *, SbxArray & rPar, bool)
const sal_Int16 vbSet = 8;
// At least 3 parameter needed plus function itself -> 4
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if ( nParCount < 4 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -112,7 +112,7 @@ void SbRtl_CallByName(StarBASIC *, SbxArray & rPar, bool)
}
// 1. parameter is object
- SbxBase* pObjVar = rPar.Get32(1)->GetObject();
+ SbxBase* pObjVar = rPar.Get(1)->GetObject();
SbxObject* pObj = nullptr;
if( pObjVar )
pObj = dynamic_cast<SbxObject*>( pObjVar );
@@ -126,10 +126,10 @@ void SbRtl_CallByName(StarBASIC *, SbxArray & rPar, bool)
}
// 2. parameter is ProcedureName
- OUString aNameStr = rPar.Get32(2)->GetOUString();
+ OUString aNameStr = rPar.Get(2)->GetOUString();
// 3. parameter is CallType
- sal_Int16 nCallType = rPar.Get32(3)->GetInteger();
+ sal_Int16 nCallType = rPar.Get(3)->GetInteger();
//SbxObject* pFindObj = NULL;
SbxVariable* pFindVar = pObj->Find( aNameStr, SbxClassType::DontCare );
@@ -147,7 +147,7 @@ void SbRtl_CallByName(StarBASIC *, SbxArray & rPar, bool)
aVals.eType = SbxVARIANT;
pFindVar->Get( aVals );
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
refVar->Put( aVals );
}
break;
@@ -159,7 +159,7 @@ void SbRtl_CallByName(StarBASIC *, SbxArray & rPar, bool)
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- SbxVariableRef pValVar = rPar.Get32(4);
+ SbxVariableRef pValVar = rPar.Get(4);
if( nCallType == vbLet )
{
SbxValues aVals;
@@ -196,13 +196,13 @@ void SbRtl_CallByName(StarBASIC *, SbxArray & rPar, bool)
xArray = new SbxArray;
for( sal_uInt32 i = 0 ; i < nMethParamCount ; i++ )
{
- SbxVariable* pPar = rPar.Get32( i + 4 );
- xArray->Put32( pPar, i + 1 );
+ SbxVariable* pPar = rPar.Get(i + 4);
+ xArray->Put(pPar, i + 1);
}
}
// Call method
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
if( xArray.is() )
pMeth->SetParameters( xArray.get() );
pMeth->Call( refVar.get() );
@@ -217,46 +217,46 @@ void SbRtl_CallByName(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_CBool(StarBASIC *, SbxArray & rPar, bool) // JSM
{
bool bVal = false;
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
bVal = pSbxVariable->GetBool();
}
else
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- rPar.Get32(0)->PutBool(bVal);
+ rPar.Get(0)->PutBool(bVal);
}
void SbRtl_CByte(StarBASIC *, SbxArray & rPar, bool) // JSM
{
sal_uInt8 nByte = 0;
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
nByte = pSbxVariable->GetByte();
}
else
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- rPar.Get32(0)->PutByte(nByte);
+ rPar.Get(0)->PutByte(nByte);
}
void SbRtl_CCur(StarBASIC *, SbxArray & rPar, bool)
{
sal_Int64 nCur = 0;
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
nCur = pSbxVariable->GetCurrency();
}
else
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- rPar.Get32(0)->PutCurrency( nCur );
+ rPar.Get(0)->PutCurrency(nCur);
}
void SbRtl_CDec(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
@@ -266,18 +266,18 @@ void SbRtl_CDec(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
#ifdef _WIN32
SbxDecimal* pDec = nullptr;
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
pDec = pSbxVariable->GetDecimal();
}
else
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- rPar.Get32(0)->PutDecimal( pDec );
+ rPar.Get(0)->PutDecimal(pDec);
#else
- rPar.Get32(0)->PutEmpty();
+ rPar.Get(0)->PutEmpty();
StarBASIC::Error(ERRCODE_BASIC_NOT_IMPLEMENTED);
#endif
}
@@ -285,24 +285,24 @@ void SbRtl_CDec(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
void SbRtl_CDate(StarBASIC *, SbxArray & rPar, bool) // JSM
{
double nVal = 0.0;
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
nVal = pSbxVariable->GetDate();
}
else
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- rPar.Get32(0)->PutDate(nVal);
+ rPar.Get(0)->PutDate(nVal);
}
void SbRtl_CDbl(StarBASIC *, SbxArray & rPar, bool) // JSM
{
double nVal = 0.0;
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
if( pSbxVariable->GetType() == SbxSTRING )
{
// #41690
@@ -323,45 +323,45 @@ void SbRtl_CDbl(StarBASIC *, SbxArray & rPar, bool) // JSM
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- rPar.Get32(0)->PutDouble(nVal);
+ rPar.Get(0)->PutDouble(nVal);
}
void SbRtl_CInt(StarBASIC *, SbxArray & rPar, bool) // JSM
{
sal_Int16 nVal = 0;
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
nVal = pSbxVariable->GetInteger();
}
else
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- rPar.Get32(0)->PutInteger(nVal);
+ rPar.Get(0)->PutInteger(nVal);
}
void SbRtl_CLng(StarBASIC *, SbxArray & rPar, bool) // JSM
{
sal_Int32 nVal = 0;
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
nVal = pSbxVariable->GetLong();
}
else
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- rPar.Get32(0)->PutLong(nVal);
+ rPar.Get(0)->PutLong(nVal);
}
void SbRtl_CSng(StarBASIC *, SbxArray & rPar, bool) // JSM
{
float nVal = float(0.0);
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
if( pSbxVariable->GetType() == SbxSTRING )
{
// #41690
@@ -383,65 +383,65 @@ void SbRtl_CSng(StarBASIC *, SbxArray & rPar, bool) // JSM
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- rPar.Get32(0)->PutSingle(nVal);
+ rPar.Get(0)->PutSingle(nVal);
}
void SbRtl_CStr(StarBASIC *, SbxArray & rPar, bool) // JSM
{
OUString aString;
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
aString = pSbxVariable->GetOUString();
}
else
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- rPar.Get32(0)->PutString(aString);
+ rPar.Get(0)->PutString(aString);
}
void SbRtl_CVar(StarBASIC *, SbxArray & rPar, bool) // JSM
{
SbxValues aVals( SbxVARIANT );
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
pSbxVariable->Get( aVals );
}
else
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- rPar.Get32(0)->Put( aVals );
+ rPar.Get(0)->Put(aVals);
}
void SbRtl_CVErr(StarBASIC *, SbxArray & rPar, bool)
{
sal_Int16 nErrCode = 0;
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
nErrCode = pSbxVariable->GetInteger();
}
else
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- rPar.Get32(0)->PutErr( nErrCode );
+ rPar.Get(0)->PutErr(nErrCode);
}
void SbRtl_Iif(StarBASIC *, SbxArray & rPar, bool) // JSM
{
- if ( rPar.Count32() == 4 )
+ if (rPar.Count() == 4)
{
- if (rPar.Get32(1)->GetBool())
+ if (rPar.Get(1)->GetBool())
{
- *rPar.Get32(0) = *rPar.Get32(2);
+ *rPar.Get(0) = *rPar.Get(2);
}
else
{
- *rPar.Get32(0) = *rPar.Get32(3);
+ *rPar.Get(0) = *rPar.Get(3);
}
}
else
@@ -452,14 +452,14 @@ void SbRtl_Iif(StarBASIC *, SbxArray & rPar, bool) // JSM
void SbRtl_GetSystemType(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 1 )
+ if (rPar.Count() != 1)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
// Removed for SRC595
- rPar.Get32(0)->PutInteger( -1 );
+ rPar.Get(0)->PutInteger(-1);
}
}
@@ -468,7 +468,7 @@ void SbRtl_GetGUIType(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
(void)pBasic;
(void)bWrite;
- if ( rPar.Count32() != 1 )
+ if (rPar.Count() != 1)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
@@ -476,63 +476,63 @@ void SbRtl_GetGUIType(StarBASIC * pBasic, SbxArray & rPar, bool bWrite)
{
// 17.7.2000 Make simple solution for testtool / fat office
#if defined(_WIN32)
- rPar.Get32(0)->PutInteger( 1 );
+ rPar.Get(0)->PutInteger(1);
#elif defined(UNX)
- rPar.Get32(0)->PutInteger( 4 );
+ rPar.Get(0)->PutInteger(4);
#else
- rPar.Get32(0)->PutInteger( -1 );
+ rPar.Get(0)->PutInteger(-1);
#endif
}
}
void SbRtl_Red(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- sal_Int32 nRGB = rPar.Get32(1)->GetLong();
+ sal_Int32 nRGB = rPar.Get(1)->GetLong();
nRGB &= 0x00FF0000;
nRGB >>= 16;
- rPar.Get32(0)->PutInteger( static_cast<sal_Int16>(nRGB) );
+ rPar.Get(0)->PutInteger(static_cast<sal_Int16>(nRGB));
}
}
void SbRtl_Green(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- sal_Int32 nRGB = rPar.Get32(1)->GetLong();
+ sal_Int32 nRGB = rPar.Get(1)->GetLong();
nRGB &= 0x0000FF00;
nRGB >>= 8;
- rPar.Get32(0)->PutInteger( static_cast<sal_Int16>(nRGB) );
+ rPar.Get(0)->PutInteger(static_cast<sal_Int16>(nRGB));
}
}
void SbRtl_Blue(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- sal_Int32 nRGB = rPar.Get32(1)->GetLong();
+ sal_Int32 nRGB = rPar.Get(1)->GetLong();
nRGB &= 0x000000FF;
- rPar.Get32(0)->PutInteger( static_cast<sal_Int16>(nRGB) );
+ rPar.Get(0)->PutInteger(static_cast<sal_Int16>(nRGB));
}
}
void SbRtl_Switch(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nCount = rPar.Count32();
+ sal_uInt32 nCount = rPar.Count();
if( !(nCount & 0x0001 ))
{
// number of arguments must be odd
@@ -541,21 +541,21 @@ void SbRtl_Switch(StarBASIC *, SbxArray & rPar, bool)
sal_uInt32 nCurExpr = 1;
while( nCurExpr < (nCount-1) )
{
- if( rPar.Get32( nCurExpr )->GetBool())
+ if (rPar.Get(nCurExpr)->GetBool())
{
- (*rPar.Get32(0)) = *(rPar.Get32(nCurExpr+1));
+ (*rPar.Get(0)) = *(rPar.Get(nCurExpr + 1));
return;
}
nCurExpr += 2;
}
- rPar.Get32(0)->PutNull();
+ rPar.Get(0)->PutNull();
}
//i#64882# Common wait impl for existing Wait and new WaitUntil
// rtl functions
void Wait_Impl( bool bDurationBased, SbxArray& rPar )
{
- if( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
@@ -563,14 +563,14 @@ void Wait_Impl( bool bDurationBased, SbxArray& rPar )
tools::Long nWait = 0;
if ( bDurationBased )
{
- double dWait = rPar.Get32(1)->GetDouble();
+ double dWait = rPar.Get(1)->GetDouble();
double dNow = Now_Impl();
double dSecs = ( dWait - dNow ) * 24.0 * 3600.0;
nWait = static_cast<tools::Long>( dSecs * 1000 ); // wait in thousands of sec
}
else
{
- nWait = rPar.Get32(1)->GetLong();
+ nWait = rPar.Get(1)->GetLong();
}
if( nWait < 0 )
{
@@ -606,57 +606,58 @@ void SbRtl_DoEvents(StarBASIC *, SbxArray & rPar, bool)
// we already process application events etc. in between
// basic runtime pcode ( on a timed basis )
// always return 0
- rPar.Get32(0)->PutInteger( 0 );
+ rPar.Get(0)->PutInteger(0);
Application::Reschedule( true );
}
void SbRtl_GetGUIVersion(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 1 )
+ if (rPar.Count() != 1)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
// Removed for SRC595
- rPar.Get32(0)->PutLong( -1 );
+ rPar.Get(0)->PutLong(-1);
}
}
void SbRtl_Choose(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- sal_Int16 nIndex = rPar.Get32(1)->GetInteger();
- sal_uInt32 nCount = rPar.Count32();
+ sal_Int16 nIndex = rPar.Get(1)->GetInteger();
+ sal_uInt32 nCount = rPar.Count();
nCount--;
if( nCount == 1 || nIndex > sal::static_int_cast<sal_Int16>(nCount-1) || nIndex < 1 )
{
- rPar.Get32(0)->PutNull();
+ rPar.Get(0)->PutNull();
return;
}
- (*rPar.Get32(0)) = *(rPar.Get32(nIndex+1));
+ (*rPar.Get(0)) = *(rPar.Get(nIndex + 1));
}
void SbRtl_Trim(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- OUString aStr(comphelper::string::strip(rPar.Get32(1)->GetOUString(), ' '));
- rPar.Get32(0)->PutString(aStr);
+ OUString aStr(comphelper::string::strip(rPar.Get(1)->GetOUString(), ' '));
+ rPar.Get(0)->PutString(aStr);
}
}
void SbRtl_GetSolarVersion(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutLong( LIBO_VERSION_MAJOR * 10000 + LIBO_VERSION_MINOR * 100 + LIBO_VERSION_MICRO * 1);
+ rPar.Get(0)->PutLong(LIBO_VERSION_MAJOR * 10000 + LIBO_VERSION_MINOR * 100
+ + LIBO_VERSION_MICRO * 1);
}
void SbRtl_TwipsPerPixelX(StarBASIC *, SbxArray & rPar, bool)
@@ -670,7 +671,7 @@ void SbRtl_TwipsPerPixelX(StarBASIC *, SbxArray & rPar, bool)
aSize = pDevice->PixelToLogic( aSize, aMap );
nResult = aSize.Width() / 100;
}
- rPar.Get32(0)->PutLong( nResult );
+ rPar.Get(0)->PutLong(nResult);
}
void SbRtl_TwipsPerPixelY(StarBASIC *, SbxArray & rPar, bool)
@@ -684,17 +685,17 @@ void SbRtl_TwipsPerPixelY(StarBASIC *, SbxArray & rPar, bool)
aSize = pDevice->PixelToLogic( aSize, aMap );
nResult = aSize.Height() / 100;
}
- rPar.Get32(0)->PutLong( nResult );
+ rPar.Get(0)->PutLong(nResult);
}
void SbRtl_FreeLibrary(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
- GetSbData()->pInst->GetDllMgr()->FreeDll( rPar.Get32(1)->GetOUString() );
+ GetSbData()->pInst->GetDllMgr()->FreeDll(rPar.Get(1)->GetOUString());
}
bool IsBaseIndexOne()
{
@@ -713,28 +714,28 @@ bool IsBaseIndexOne()
void SbRtl_Array(StarBASIC *, SbxArray & rPar, bool)
{
SbxDimArray* pArray = new SbxDimArray( SbxVARIANT );
- sal_uInt32 nArraySize = rPar.Count32() - 1;
+ sal_uInt32 nArraySize = rPar.Count() - 1;
bool bIncIndex = IsBaseIndexOne();
if( nArraySize )
{
if ( bIncIndex )
{
- pArray->AddDim32( 1, sal::static_int_cast<sal_Int32>(nArraySize) );
+ pArray->AddDim(1, sal::static_int_cast<sal_Int32>(nArraySize));
}
else
{
- pArray->AddDim32( 0, sal::static_int_cast<sal_Int32>(nArraySize) - 1 );
+ pArray->AddDim(0, sal::static_int_cast<sal_Int32>(nArraySize) - 1);
}
}
else
{
- pArray->unoAddDim32( 0, -1 );
+ pArray->unoAddDim(0, -1);
}
// insert parameters into the array
for( sal_uInt32 i = 0 ; i < nArraySize ; i++ )
{
- SbxVariable* pVar = rPar.Get32(i+1);
+ SbxVariable* pVar = rPar.Get(i + 1);
SbxVariable* pNew = new SbxEnsureParentVariable(*pVar);
pNew->SetFlag( SbxFlagBits::Write );
sal_Int32 aIdx[1];
@@ -743,11 +744,11 @@ void SbRtl_Array(StarBASIC *, SbxArray & rPar, bool)
{
++aIdx[0];
}
- pArray->Put32(pNew, aIdx);
+ pArray->Put(pNew, aIdx);
}
// return array
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
SbxFlagBits nFlags = refVar->GetFlags();
refVar->ResetFlag( SbxFlagBits::Fixed );
refVar->PutObject( pArray );
@@ -766,25 +767,25 @@ void SbRtl_Array(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_DimArray(StarBASIC *, SbxArray & rPar, bool)
{
SbxDimArray * pArray = new SbxDimArray( SbxVARIANT );
- sal_uInt32 nArrayDims = rPar.Count32() - 1;
+ sal_uInt32 nArrayDims = rPar.Count() - 1;
if( nArrayDims > 0 )
{
for( sal_uInt32 i = 0; i < nArrayDims ; i++ )
{
- sal_Int32 ub = rPar.Get32(i+1)->GetLong();
+ sal_Int32 ub = rPar.Get(i + 1)->GetLong();
if( ub < 0 )
{
StarBASIC::Error( ERRCODE_BASIC_OUT_OF_RANGE );
ub = 0;
}
- pArray->AddDim32( 0, ub );
+ pArray->AddDim(0, ub);
}
}
else
{
- pArray->unoAddDim32( 0, -1 );
+ pArray->unoAddDim(0, -1);
}
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
SbxFlagBits nFlags = refVar->GetFlags();
refVar->ResetFlag( SbxFlagBits::Fixed );
refVar->PutObject( pArray );
@@ -818,13 +819,13 @@ void SbRtl_DimArray(StarBASIC *, SbxArray & rPar, bool)
// 1st parameter = the object's name as string
void SbRtl_FindObject(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 2 )
+ if (rPar.Count() < 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- OUString aNameStr = rPar.Get32(1)->GetOUString();
+ OUString aNameStr = rPar.Get(1)->GetOUString();
SbxBase* pFind = StarBASIC::FindSBXInCurrentScope( aNameStr );
SbxObject* pFindObj = nullptr;
@@ -832,7 +833,7 @@ void SbRtl_FindObject(StarBASIC *, SbxArray & rPar, bool)
{
pFindObj = dynamic_cast<SbxObject*>( pFind );
}
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
refVar->PutObject( pFindObj );
}
@@ -841,13 +842,13 @@ void SbRtl_FindObject(StarBASIC *, SbxArray & rPar, bool)
// 2nd parameter = the property's name as string
void SbRtl_FindPropertyObject(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() < 3 )
+ if (rPar.Count() < 3)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- SbxBase* pObjVar = rPar.Get32(1)->GetObject();
+ SbxBase* pObjVar = rPar.Get(1)->GetObject();
SbxObject* pObj = nullptr;
if( pObjVar )
{
@@ -857,7 +858,7 @@ void SbRtl_FindPropertyObject(StarBASIC *, SbxArray & rPar, bool)
if (auto pSbxVar = dynamic_cast<const SbxVariable*>( pObjVar))
pObj = dynamic_cast<SbxObject*>( pSbxVar->GetObject() );
- OUString aNameStr = rPar.Get32(2)->GetOUString();
+ OUString aNameStr = rPar.Get(2)->GetOUString();
SbxObject* pFindObj = nullptr;
if( pObj )
@@ -870,7 +871,7 @@ void SbRtl_FindPropertyObject(StarBASIC *, SbxArray & rPar, bool)
StarBASIC::Error( ERRCODE_BASIC_BAD_PARAMETER );
}
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
refVar->PutObject( pFindObj );
}
@@ -1092,7 +1093,7 @@ static bool lcl_WriteReadSbxArray( SbxDimArray& rArr, SvStream* pStrm,
{
SAL_WARN_IF( nCurDim <= 0,"basic", "Bad Dim");
sal_Int32 nLower, nUpper;
- if( !rArr.GetDim32( nCurDim, nLower, nUpper ) )
+ if (!rArr.GetDim(nCurDim, nLower, nUpper))
return false;
for(sal_Int32 nCur = nLower; nCur <= nUpper; nCur++ )
{
@@ -1101,7 +1102,7 @@ static bool lcl_WriteReadSbxArray( SbxDimArray& rArr, SvStream* pStrm,
lcl_WriteReadSbxArray(rArr, pStrm, bBinary, nCurDim-1, pOtherDims, bWrite);
else
{
- SbxVariable* pVar = rArr.Get32( pOtherDims );
+ SbxVariable* pVar = rArr.Get(pOtherDims);
bool bRet;
if( bWrite )
bRet = lcl_WriteSbxVariable(*pVar, pStrm, bBinary, 0, true );
@@ -1116,13 +1117,13 @@ static bool lcl_WriteReadSbxArray( SbxDimArray& rArr, SvStream* pStrm,
static void PutGet( SbxArray& rPar, bool bPut )
{
- if ( rPar.Count32() != 4 )
+ if (rPar.Count() != 4)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- sal_Int16 nFileNo = rPar.Get32(1)->GetInteger();
- SbxVariable* pVar2 = rPar.Get32(2);
+ sal_Int16 nFileNo = rPar.Get(1)->GetInteger();
+ SbxVariable* pVar2 = rPar.Get(2);
SbxDataType eType2 = pVar2->GetType();
bool bHasRecordNo = (eType2 != SbxEMPTY && eType2 != SbxERROR);
tools::Long nRecordNo = pVar2->GetLong();
@@ -1159,7 +1160,7 @@ static void PutGet( SbxArray& rPar, bool bPut )
}
SbxDimArray* pArr = nullptr;
- SbxVariable* pVar = rPar.Get32(3);
+ SbxVariable* pVar = rPar.Get(3);
if( pVar->GetType() & SbxARRAY )
{
SbxBase* pParObj = pVar->GetObject();
@@ -1171,7 +1172,7 @@ static void PutGet( SbxArray& rPar, bool bPut )
if( pArr )
{
sal_uInt64 const nFPos = pStrm->Tell();
- sal_Int32 nDims = pArr->GetDims32();
+ sal_Int32 nDims = pArr->GetDims();
std::unique_ptr<sal_Int32[]> pDims(new sal_Int32[ nDims ]);
bRet = lcl_WriteReadSbxArray(*pArr,pStrm,!bRandom,nDims,pDims.get(),bPut);
pDims.reset();
@@ -1201,21 +1202,21 @@ void SbRtl_Get(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Environ(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
OUString aResult;
// should be ANSI but that's not possible under Win16 in the DLL
- OString aByteStr(OUStringToOString(rPar.Get32(1)->GetOUString(),
+ OString aByteStr(OUStringToOString(rPar.Get(1)->GetOUString(),
osl_getThreadTextEncoding()));
const char* pEnvStr = getenv(aByteStr.getStr());
if ( pEnvStr )
{
aResult = OUString(pEnvStr, strlen(pEnvStr), osl_getThreadTextEncoding());
}
- rPar.Get32(0)->PutString( aResult );
+ rPar.Get(0)->PutString(aResult);
}
static double GetDialogZoomFactor( bool bX, tools::Long nValue )
@@ -1250,60 +1251,60 @@ static double GetDialogZoomFactor( bool bX, tools::Long nValue )
void SbRtl_GetDialogZoomFactorX(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- rPar.Get32(0)->PutDouble( GetDialogZoomFactor( true, rPar.Get32(1)->GetLong() ));
+ rPar.Get(0)->PutDouble(GetDialogZoomFactor(true, rPar.Get(1)->GetLong()));
}
void SbRtl_GetDialogZoomFactorY(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- rPar.Get32(0)->PutDouble( GetDialogZoomFactor( false, rPar.Get32(1)->GetLong()));
+ rPar.Get(0)->PutDouble(GetDialogZoomFactor(false, rPar.Get(1)->GetLong()));
}
void SbRtl_EnableReschedule(StarBASIC *, SbxArray & rPar, bool)
{
- rPar.Get32(0)->PutEmpty();
- if ( rPar.Count32() != 2 )
+ rPar.Get(0)->PutEmpty();
+ if (rPar.Count() != 2)
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
if( GetSbData()->pInst )
- GetSbData()->pInst->EnableReschedule( rPar.Get32(1)->GetBool() );
+ GetSbData()->pInst->EnableReschedule(rPar.Get(1)->GetBool());
}
void SbRtl_GetSystemTicks(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 1 )
+ if (rPar.Count() != 1)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- rPar.Get32(0)->PutLong( tools::Time::GetSystemTicks() );
+ rPar.Get(0)->PutLong(tools::Time::GetSystemTicks());
}
void SbRtl_GetPathSeparator(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 1 )
+ if (rPar.Count() != 1)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- rPar.Get32(0)->PutString( OUString( SAL_PATHDELIMITER ) );
+ rPar.Get(0)->PutString(OUString(SAL_PATHDELIMITER));
}
void SbRtl_ResolvePath(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- OUString aStr = rPar.Get32(1)->GetOUString();
- rPar.Get32(0)->PutString( aStr );
+ OUString aStr = rPar.Get(1)->GetOUString();
+ rPar.Get(0)->PutString(aStr);
}
else
{
@@ -1313,13 +1314,13 @@ void SbRtl_ResolvePath(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_TypeLen(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- SbxDataType eType = rPar.Get32(1)->GetType();
+ SbxDataType eType = rPar.Get(1)->GetType();
sal_Int16 nLen = 0;
switch( eType )
{
@@ -1375,14 +1376,14 @@ void SbRtl_TypeLen(StarBASIC *, SbxArray & rPar, bool)
case SbxLPWSTR:
case SbxCoreSTRING:
case SbxSTRING:
- nLen = static_cast<sal_Int16>(rPar.Get32(1)->GetOUString().getLength());
+ nLen = static_cast<sal_Int16>(rPar.Get(1)->GetOUString().getLength());
break;
default:
nLen = 0;
break;
}
- rPar.Get32(0)->PutInteger( nLen );
+ rPar.Get(0)->PutInteger(nLen);
}
}
@@ -1457,16 +1458,16 @@ void SbRtl_GlobalScope(StarBASIC * pBasic, SbxArray & rPar, bool)
{
p = p->GetParent();
}
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
refVar->PutObject( p );
}
// Helper functions to convert Url from/to system paths
void SbRtl_ConvertToUrl(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- OUString aStr = rPar.Get32(1)->GetOUString();
+ OUString aStr = rPar.Get(1)->GetOUString();
INetURLObject aURLObj( aStr, INetProtocol::File );
OUString aFileURL = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
if( aFileURL.isEmpty() )
@@ -1477,7 +1478,7 @@ void SbRtl_ConvertToUrl(StarBASIC *, SbxArray & rPar, bool)
{
aFileURL = aStr;
}
- rPar.Get32(0)->PutString(aFileURL);
+ rPar.Get(0)->PutString(aFileURL);
}
else
{
@@ -1487,16 +1488,16 @@ void SbRtl_ConvertToUrl(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_ConvertFromUrl(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() == 2 )
+ if (rPar.Count() == 2)
{
- OUString aStr = rPar.Get32(1)->GetOUString();
+ OUString aStr = rPar.Get(1)->GetOUString();
OUString aSysPath;
::osl::File::getSystemPathFromFileURL( aStr, aSysPath );
if( aSysPath.isEmpty() )
{
aSysPath = aStr;
}
- rPar.Get32(0)->PutString(aSysPath);
+ rPar.Get(0)->PutString(aSysPath);
}
else
{
@@ -1513,17 +1514,17 @@ void SbRtl_GetDefaultContext(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Join(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if ( nParCount != 3 && nParCount != 2 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- SbxBase* pParObj = rPar.Get32(1)->GetObject();
+ SbxBase* pParObj = rPar.Get(1)->GetObject();
SbxDimArray* pArr = dynamic_cast<SbxDimArray*>( pParObj );
if( pArr )
{
- if( pArr->GetDims32() != 1 )
+ if (pArr->GetDims() != 1)
{
StarBASIC::Error( ERRCODE_BASIC_WRONG_DIMS ); // Syntax Error?!
return;
@@ -1531,7 +1532,7 @@ void SbRtl_Join(StarBASIC *, SbxArray & rPar, bool)
OUString aDelim;
if( nParCount == 3 )
{
- aDelim = rPar.Get32(2)->GetOUString();
+ aDelim = rPar.Get(2)->GetOUString();
}
else
{
@@ -1539,18 +1540,18 @@ void SbRtl_Join(StarBASIC *, SbxArray & rPar, bool)
}
OUStringBuffer aRetStr(32);
sal_Int32 nLower, nUpper;
- pArr->GetDim32( 1, nLower, nUpper );
+ pArr->GetDim(1, nLower, nUpper);
sal_Int32 aIdx[1];
for (aIdx[0] = nLower; aIdx[0] <= nUpper; ++aIdx[0])
{
- OUString aStr = pArr->Get32(aIdx)->GetOUString();
+ OUString aStr = pArr->Get(aIdx)->GetOUString();
aRetStr.append(aStr);
if (aIdx[0] != nUpper)
{
aRetStr.append(aDelim);
}
}
- rPar.Get32(0)->PutString( aRetStr.makeStringAndClear() );
+ rPar.Get(0)->PutString(aRetStr.makeStringAndClear());
}
else
{
@@ -1561,14 +1562,14 @@ void SbRtl_Join(StarBASIC *, SbxArray & rPar, bool)
void SbRtl_Split(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if ( nParCount < 2 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- OUString aExpression = rPar.Get32(1)->GetOUString();
+ OUString aExpression = rPar.Get(1)->GetOUString();
sal_Int32 nArraySize = 0;
std::vector< OUString > vRet;
if( !aExpression.isEmpty() )
@@ -1576,7 +1577,7 @@ void SbRtl_Split(StarBASIC *, SbxArray & rPar, bool)
OUString aDelim;
if( nParCount >= 3 )
{
- aDelim = rPar.Get32(2)->GetOUString();
+ aDelim = rPar.Get(2)->GetOUString();
}
else
{
@@ -1586,7 +1587,7 @@ void SbRtl_Split(StarBASIC *, SbxArray & rPar, bool)
sal_Int32 nCount = -1;
if( nParCount == 4 )
{
- nCount = rPar.Get32(3)->GetLong();
+ nCount = rPar.Get(3)->GetLong();
}
sal_Int32 nDelimLen = aDelim.getLength();
if( nDelimLen )
@@ -1630,7 +1631,7 @@ void SbRtl_Split(StarBASIC *, SbxArray & rPar, bool)
// tdf#123025 - split returns an array of substrings
SbxDimArray* pArray = new SbxDimArray( SbxSTRING );
- pArray->unoAddDim32( 0, nArraySize-1 );
+ pArray->unoAddDim(0, nArraySize - 1);
// insert parameter(s) into the array
for(sal_Int32 i = 0 ; i < nArraySize ; i++ )
@@ -1638,11 +1639,11 @@ void SbRtl_Split(StarBASIC *, SbxArray & rPar, bool)
// tdf#123025 - split returns an array of substrings
SbxVariableRef xVar = new SbxVariable( SbxSTRING );
xVar->PutString( vRet[i] );
- pArray->Put32( xVar.get(), &i );
+ pArray->Put(xVar.get(), &i);
}
// return array
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
SbxFlagBits nFlags = refVar->GetFlags();
refVar->ResetFlag( SbxFlagBits::Fixed );
refVar->PutObject( pArray );
@@ -1653,7 +1654,7 @@ void SbRtl_Split(StarBASIC *, SbxArray & rPar, bool)
// MonthName(month[, abbreviate])
void SbRtl_MonthName(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if( nParCount != 2 && nParCount != 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -1669,7 +1670,7 @@ void SbRtl_MonthName(StarBASIC *, SbxArray & rPar, bool)
Sequence< CalendarItem2 > aMonthSeq = xCalendar->getMonths2();
sal_Int32 nMonthCount = aMonthSeq.getLength();
- sal_Int16 nVal = rPar.Get32(1)->GetInteger();
+ sal_Int16 nVal = rPar.Get(1)->GetInteger();
if( nVal < 1 || nVal > nMonthCount )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -1678,19 +1679,19 @@ void SbRtl_MonthName(StarBASIC *, SbxArray & rPar, bool)
bool bAbbreviate = false;
if( nParCount == 3 )
- bAbbreviate = rPar.Get32(2)->GetBool();
+ bAbbreviate = rPar.Get(2)->GetBool();
const CalendarItem2* pCalendarItems = aMonthSeq.getConstArray();
const CalendarItem2& rItem = pCalendarItems[nVal - 1];
OUString aRetStr = ( bAbbreviate ? rItem.AbbrevName : rItem.FullName );
- rPar.Get32(0)->PutString(aRetStr);
+ rPar.Get(0)->PutString(aRetStr);
}
// WeekdayName(weekday, abbreviate, firstdayofweek)
void SbRtl_WeekdayName(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if( nParCount < 2 || nParCount > 4 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -1706,11 +1707,11 @@ void SbRtl_WeekdayName(StarBASIC *, SbxArray & rPar, bool)
Sequence< CalendarItem2 > aDaySeq = xCalendar->getDays2();
sal_Int16 nDayCount = static_cast<sal_Int16>(aDaySeq.getLength());
- sal_Int16 nDay = rPar.Get32(1)->GetInteger();
+ sal_Int16 nDay = rPar.Get(1)->GetInteger();
sal_Int16 nFirstDay = 0;
if( nParCount == 4 )
{
- nFirstDay = rPar.Get32(3)->GetInteger();
+ nFirstDay = rPar.Get(3)->GetInteger();
if( nFirstDay < 0 || nFirstDay > 7 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -1731,7 +1732,7 @@ void SbRtl_WeekdayName(StarBASIC *, SbxArray & rPar, bool)
bool bAbbreviate = false;
if( nParCount >= 3 )
{
- SbxVariable* pPar2 = rPar.Get32(2);
+ SbxVariable* pPar2 = rPar.Get(2);
if( !pPar2->IsErr() )
{
bAbbreviate = pPar2->GetBool();
@@ -1742,29 +1743,29 @@ void SbRtl_WeekdayName(StarBASIC *, SbxArray & rPar, bool)
const CalendarItem2& rItem = pCalendarItems[nDay - 1];
OUString aRetStr = ( bAbbreviate ? rItem.AbbrevName : rItem.FullName );
- rPar.Get32(0)->PutString( aRetStr );
+ rPar.Get(0)->PutString(aRetStr);
}
void SbRtl_Weekday(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if ( nParCount < 2 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
}
else
{
- double aDate = rPar.Get32(1)->GetDate();
+ double aDate = rPar.Get(1)->GetDate();
bool bFirstDay = false;
sal_Int16 nFirstDay = 0;
if ( nParCount > 2 )
{
- nFirstDay = rPar.Get32(2)->GetInteger();
+ nFirstDay = rPar.Get(2)->GetInteger();
bFirstDay = true;
}
sal_Int16 nDay = implGetWeekDay( aDate, bFirstDay, nFirstDay );
- rPar.Get32(0)->PutInteger( nDay );
+ rPar.Get(0)->PutInteger(nDay);
}
}
@@ -1851,14 +1852,14 @@ static sal_Int16 limitDate( sal_Int32 n32Year, sal_Int16& rMonth, sal_Int16& rDa
void SbRtl_DateAdd(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if( nParCount != 4 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- OUString aStringCode = rPar.Get32(1)->GetOUString();
+ OUString aStringCode = rPar.Get(1)->GetOUString();
IntervalInfo const * pInfo = getIntervalInfo( aStringCode );
if( !pInfo )
{
@@ -1866,8 +1867,8 @@ void SbRtl_DateAdd(StarBASIC *, SbxArray & rPar, bool)
return;
}
- sal_Int32 lNumber = rPar.Get32(2)->GetLong();
- double dDate = rPar.Get32(3)->GetDate();
+ sal_Int32 lNumber = rPar.Get(2)->GetLong();
+ double dDate = rPar.Get(3)->GetDate();
double dNewDate = 0;
if( pInfo->mbSimple )
{
@@ -1946,7 +1947,7 @@ void SbRtl_DateAdd(StarBASIC *, SbxArray & rPar, bool)
dNewDate += dHoursMinutesSeconds;
}
- rPar.Get32(0)->PutDate( dNewDate );
+ rPar.Get(0)->PutDate(dNewDate);
}
static double RoundImpl( double d )
@@ -1958,14 +1959,14 @@ void SbRtl_DateDiff(StarBASIC *, SbxArray & rPar, bool)
{
// DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if( nParCount < 4 || nParCount > 6 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- OUString aStringCode = rPar.Get32(1)->GetOUString();
+ OUString aStringCode = rPar.Get(1)->GetOUString();
IntervalInfo const * pInfo = getIntervalInfo( aStringCode );
if( !pInfo )
{
@@ -1973,8 +1974,8 @@ void SbRtl_DateDiff(StarBASIC *, SbxArray & rPar, bool)
return;
}
- double dDate1 = rPar.Get32(2)->GetDate();
- double dDate2 = rPar.Get32(3)->GetDate();
+ double dDate1 = rPar.Get(2)->GetDate();
+ double dDate2 = rPar.Get(3)->GetDate();
double dRet = 0.0;
switch( pInfo->meInterval )
@@ -2026,7 +2027,7 @@ void SbRtl_DateDiff(StarBASIC *, SbxArray & rPar, bool)
sal_Int16 nFirstDay = 1; // Default
if( nParCount >= 5 )
{
- nFirstDay = rPar.Get32(4)->GetInteger();
+ nFirstDay = rPar.Get(4)->GetInteger();
if( nFirstDay < 0 || nFirstDay > 7 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -2076,7 +2077,7 @@ void SbRtl_DateDiff(StarBASIC *, SbxArray & rPar, bool)
break;
}
}
- rPar.Get32(0)->PutDouble( dRet );
+ rPar.Get(0)->PutDouble(dRet);
}
static double implGetDateOfFirstDayInFirstWeek
@@ -2149,14 +2150,14 @@ void SbRtl_DatePart(StarBASIC *, SbxArray & rPar, bool)
{
// DatePart(interval, date[,firstdayofweek[, firstweekofyear]])
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if( nParCount < 3 || nParCount > 5 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- OUString aStringCode = rPar.Get32(1)->GetOUString();
+ OUString aStringCode = rPar.Get(1)->GetOUString();
IntervalInfo const * pInfo = getIntervalInfo( aStringCode );
if( !pInfo )
{
@@ -2164,7 +2165,7 @@ void SbRtl_DatePart(StarBASIC *, SbxArray & rPar, bool)
return;
}
- double dDate = rPar.Get32(2)->GetDate();
+ double dDate = rPar.Get(2)->GetDate();
sal_Int32 nRet = 0;
switch( pInfo->meInterval )
@@ -2203,7 +2204,7 @@ void SbRtl_DatePart(StarBASIC *, SbxArray & rPar, bool)
sal_Int16 nFirstDay = 1; // Default
if( nParCount >= 4 )
{
- nFirstDay = rPar.Get32(3)->GetInteger();
+ nFirstDay = rPar.Get(3)->GetInteger();
bFirstDay = true;
}
nRet = implGetWeekDay( dDate, bFirstDay, nFirstDay );
@@ -2213,11 +2214,11 @@ void SbRtl_DatePart(StarBASIC *, SbxArray & rPar, bool)
{
sal_Int16 nFirstDay = 1; // Default
if( nParCount >= 4 )
- nFirstDay = rPar.Get32(3)->GetInteger();
+ nFirstDay = rPar.Get(3)->GetInteger();
sal_Int16 nFirstWeek = 1; // Default
if( nParCount == 5 )
- nFirstWeek = rPar.Get32(4)->GetInteger();
+ nFirstWeek = rPar.Get(4)->GetInteger();
sal_Int16 nYear = implGetDateYear( dDate );
bool bError = false;
@@ -2259,24 +2260,24 @@ void SbRtl_DatePart(StarBASIC *, SbxArray & rPar, bool)
break;
}
}
- rPar.Get32(0)->PutLong( nRet );
+ rPar.Get(0)->PutLong(nRet);
}
// FormatDateTime(Date[,NamedFormat])
void SbRtl_FormatDateTime(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if( nParCount < 2 || nParCount > 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- double dDate = rPar.Get32(1)->GetDate();
+ double dDate = rPar.Get(1)->GetDate();
sal_Int16 nNamedFormat = 0;
if( nParCount > 2 )
{
- nNamedFormat = rPar.Get32(2)->GetInteger();
+ nNamedFormat = rPar.Get(2)->GetInteger();
if( nNamedFormat < 0 || nNamedFormat > 4 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -2360,36 +2361,36 @@ void SbRtl_FormatDateTime(StarBASIC *, SbxArray & rPar, bool)
break;
}
- rPar.Get32(0)->PutString( aRetStr );
+ rPar.Get(0)->PutString(aRetStr);
}
void SbRtl_Frac(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if( nParCount != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
double dVal = pSbxVariable->GetDouble();
if(dVal >= 0)
- rPar.Get32(0)->PutDouble(dVal - ::rtl::math::approxFloor(dVal));
+ rPar.Get(0)->PutDouble(dVal - ::rtl::math::approxFloor(dVal));
else
- rPar.Get32(0)->PutDouble(dVal - ::rtl::math::approxCeil(dVal));
+ rPar.Get(0)->PutDouble(dVal - ::rtl::math::approxCeil(dVal));
}
void SbRtl_Round(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nParCount = rPar.Count32();
+ sal_uInt32 nParCount = rPar.Count();
if( nParCount != 2 && nParCount != 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
double dVal = pSbxVariable->GetDouble();
double dRes = 0.0;
if( dVal != 0.0 )
@@ -2404,7 +2405,7 @@ void SbRtl_Round(StarBASIC *, SbxArray & rPar, bool)
sal_Int16 numdecimalplaces = 0;
if( nParCount == 3 )
{
- numdecimalplaces = rPar.Get32(2)->GetInteger();
+ numdecimalplaces = rPar.Get(2)->GetInteger();
if( numdecimalplaces < 0 || numdecimalplaces > 22 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -2427,7 +2428,7 @@ void SbRtl_Round(StarBASIC *, SbxArray & rPar, bool)
if( bNeg )
dRes = -dRes;
}
- rPar.Get32(0)->PutDouble( dRes );
+ rPar.Get(0)->PutDouble(dRes);
}
static void CallFunctionAccessFunction( const Sequence< Any >& aArgs, const OUString& sFuncName, SbxVariable* pRet )
@@ -2456,7 +2457,7 @@ static void CallFunctionAccessFunction( const Sequence< Any >& aArgs, const OUSt
void SbRtl_SYD(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 4 )
{
@@ -2467,17 +2468,17 @@ void SbRtl_SYD(StarBASIC *, SbxArray & rPar, bool)
// retrieve non-optional params
Sequence< Any > aParams( 4 );
- aParams[ 0 ] <<= rPar.Get32(1)->GetDouble();
- aParams[ 1 ] <<= rPar.Get32(2)->GetDouble();
- aParams[ 2 ] <<= rPar.Get32(3)->GetDouble();
- aParams[ 3 ] <<= rPar.Get32(4)->GetDouble();
+ aParams[0] <<= rPar.Get(1)->GetDouble();
+ aParams[1] <<= rPar.Get(2)->GetDouble();
+ aParams[2] <<= rPar.Get(3)->GetDouble();
+ aParams[3] <<= rPar.Get(4)->GetDouble();
- CallFunctionAccessFunction( aParams, "SYD", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "SYD", rPar.Get(0));
}
void SbRtl_SLN(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 3 )
{
@@ -2488,16 +2489,16 @@ void SbRtl_SLN(StarBASIC *, SbxArray & rPar, bool)
// retrieve non-optional params
Sequence< Any > aParams( 3 );
- aParams[ 0 ] <<= rPar.Get32(1)->GetDouble();
- aParams[ 1 ] <<= rPar.Get32(2)->GetDouble();
- aParams[ 2 ] <<= rPar.Get32(3)->GetDouble();
+ aParams[0] <<= rPar.Get(1)->GetDouble();
+ aParams[1] <<= rPar.Get(2)->GetDouble();
+ aParams[2] <<= rPar.Get(3)->GetDouble();
- CallFunctionAccessFunction( aParams, "SLN", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "SLN", rPar.Get(0));
}
void SbRtl_Pmt(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 3 || nArgCount > 5 )
{
@@ -2506,9 +2507,9 @@ void SbRtl_Pmt(StarBASIC *, SbxArray & rPar, bool)
}
// retrieve non-optional params
- double rate = rPar.Get32(1)->GetDouble();
- double nper = rPar.Get32(2)->GetDouble();
- double pmt = rPar.Get32(3)->GetDouble();
+ double rate = rPar.Get(1)->GetDouble();
+ double nper = rPar.Get(2)->GetDouble();
+ double pmt = rPar.Get(3)->GetDouble();
// set default values for Optional args
double fv = 0;
@@ -2517,14 +2518,14 @@ void SbRtl_Pmt(StarBASIC *, SbxArray & rPar, bool)
// fv
if ( nArgCount >= 4 )
{
- if( rPar.Get32(4)->GetType() != SbxEMPTY )
- fv = rPar.Get32(4)->GetDouble();
+ if (rPar.Get(4)->GetType() != SbxEMPTY)
+ fv = rPar.Get(4)->GetDouble();
}
// type
if ( nArgCount >= 5 )
{
- if( rPar.Get32(5)->GetType() != SbxEMPTY )
- type = rPar.Get32(5)->GetDouble();
+ if (rPar.Get(5)->GetType() != SbxEMPTY)
+ type = rPar.Get(5)->GetDouble();
}
Sequence< Any > aParams( 5 );
@@ -2534,12 +2535,12 @@ void SbRtl_Pmt(StarBASIC *, SbxArray & rPar, bool)
aParams[ 3 ] <<= fv;
aParams[ 4 ] <<= type;
- CallFunctionAccessFunction( aParams, "Pmt", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "Pmt", rPar.Get(0));
}
void SbRtl_PPmt(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 4 || nArgCount > 6 )
{
@@ -2548,10 +2549,10 @@ void SbRtl_PPmt(StarBASIC *, SbxArray & rPar, bool)
}
// retrieve non-optional params
- double rate = rPar.Get32(1)->GetDouble();
- double per = rPar.Get32(2)->GetDouble();
- double nper = rPar.Get32(3)->GetDouble();
- double pv = rPar.Get32(4)->GetDouble();
+ double rate = rPar.Get(1)->GetDouble();
+ double per = rPar.Get(2)->GetDouble();
+ double nper = rPar.Get(3)->GetDouble();
+ double pv = rPar.Get(4)->GetDouble();
// set default values for Optional args
double fv = 0;
@@ -2560,14 +2561,14 @@ void SbRtl_PPmt(StarBASIC *, SbxArray & rPar, bool)
// fv
if ( nArgCount >= 5 )
{
- if( rPar.Get32(5)->GetType() != SbxEMPTY )
- fv = rPar.Get32(5)->GetDouble();
+ if (rPar.Get(5)->GetType() != SbxEMPTY)
+ fv = rPar.Get(5)->GetDouble();
}
// type
if ( nArgCount >= 6 )
{
- if( rPar.Get32(6)->GetType() != SbxEMPTY )
- type = rPar.Get32(6)->GetDouble();
+ if (rPar.Get(6)->GetType() != SbxEMPTY)
+ type = rPar.Get(6)->GetDouble();
}
Sequence< Any > aParams( 6 );
@@ -2578,12 +2579,12 @@ void SbRtl_PPmt(StarBASIC *, SbxArray & rPar, bool)
aParams[ 4 ] <<= fv;
aParams[ 5 ] <<= type;
- CallFunctionAccessFunction( aParams, "PPmt", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "PPmt", rPar.Get(0));
}
void SbRtl_PV(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 3 || nArgCount > 5 )
{
@@ -2592,9 +2593,9 @@ void SbRtl_PV(StarBASIC *, SbxArray & rPar, bool)
}
// retrieve non-optional params
- double rate = rPar.Get32(1)->GetDouble();
- double nper = rPar.Get32(2)->GetDouble();
- double pmt = rPar.Get32(3)->GetDouble();
+ double rate = rPar.Get(1)->GetDouble();
+ double nper = rPar.Get(2)->GetDouble();
+ double pmt = rPar.Get(3)->GetDouble();
// set default values for Optional args
double fv = 0;
@@ -2603,14 +2604,14 @@ void SbRtl_PV(StarBASIC *, SbxArray & rPar, bool)
// fv
if ( nArgCount >= 4 )
{
- if( rPar.Get32(4)->GetType() != SbxEMPTY )
- fv = rPar.Get32(4)->GetDouble();
+ if (rPar.Get(4)->GetType() != SbxEMPTY)
+ fv = rPar.Get(4)->GetDouble();
}
// type
if ( nArgCount >= 5 )
{
- if( rPar.Get32(5)->GetType() != SbxEMPTY )
- type = rPar.Get32(5)->GetDouble();
+ if (rPar.Get(5)->GetType() != SbxEMPTY)
+ type = rPar.Get(5)->GetDouble();
}
Sequence< Any > aParams( 5 );
@@ -2620,12 +2621,12 @@ void SbRtl_PV(StarBASIC *, SbxArray & rPar, bool)
aParams[ 3 ] <<= fv;
aParams[ 4 ] <<= type;
- CallFunctionAccessFunction( aParams, "PV", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "PV", rPar.Get(0));
}
void SbRtl_NPV(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 1 || nArgCount > 2 )
{
@@ -2634,8 +2635,8 @@ void SbRtl_NPV(StarBASIC *, SbxArray & rPar, bool)
}
Sequence< Any > aParams( 2 );
- aParams[ 0 ] <<= rPar.Get32(1)->GetDouble();
- Any aValues = sbxToUnoValue( rPar.Get32(2),
+ aParams[0] <<= rPar.Get(1)->GetDouble();
+ Any aValues = sbxToUnoValue(rPar.Get(2),
cppu::UnoType<Sequence<double>>::get() );
// convert for calc functions
@@ -2645,12 +2646,12 @@ void SbRtl_NPV(StarBASIC *, SbxArray & rPar, bool)
aParams[ 1 ] = aValues;
- CallFunctionAccessFunction( aParams, "NPV", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "NPV", rPar.Get(0));
}
void SbRtl_NPer(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 3 || nArgCount > 5 )
{
@@ -2659,9 +2660,9 @@ void SbRtl_NPer(StarBASIC *, SbxArray & rPar, bool)
}
// retrieve non-optional params
- double rate = rPar.Get32(1)->GetDouble();
- double pmt = rPar.Get32(2)->GetDouble();
- double pv = rPar.Get32(3)->GetDouble();
+ double rate = rPar.Get(1)->GetDouble();
+ double pmt = rPar.Get(2)->GetDouble();
+ double pv = rPar.Get(3)->GetDouble();
// set default values for Optional args
double fv = 0;
@@ -2670,14 +2671,14 @@ void SbRtl_NPer(StarBASIC *, SbxArray & rPar, bool)
// fv
if ( nArgCount >= 4 )
{
- if( rPar.Get32(4)->GetType() != SbxEMPTY )
- fv = rPar.Get32(4)->GetDouble();
+ if (rPar.Get(4)->GetType() != SbxEMPTY)
+ fv = rPar.Get(4)->GetDouble();
}
// type
if ( nArgCount >= 5 )
{
- if( rPar.Get32(5)->GetType() != SbxEMPTY )
- type = rPar.Get32(5)->GetDouble();
+ if (rPar.Get(5)->GetType() != SbxEMPTY)
+ type = rPar.Get(5)->GetDouble();
}
Sequence< Any > aParams( 5 );
@@ -2687,12 +2688,12 @@ void SbRtl_NPer(StarBASIC *, SbxArray & rPar, bool)
aParams[ 3 ] <<= fv;
aParams[ 4 ] <<= type;
- CallFunctionAccessFunction( aParams, "NPer", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "NPer", rPar.Get(0));
}
void SbRtl_MIRR(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 3 )
{
@@ -2703,7 +2704,7 @@ void SbRtl_MIRR(StarBASIC *, SbxArray & rPar, bool)
// retrieve non-optional params
Sequence< Any > aParams( 3 );
- Any aValues = sbxToUnoValue( rPar.Get32(1),
+ Any aValues = sbxToUnoValue(rPar.Get(1),
cppu::UnoType<Sequence<double>>::get() );
// convert for calc functions
@@ -2712,15 +2713,15 @@ void SbRtl_MIRR(StarBASIC *, SbxArray & rPar, bool)
aValues <<= sValues;
aParams[ 0 ] = aValues;
- aParams[ 1 ] <<= rPar.Get32(2)->GetDouble();
- aParams[ 2 ] <<= rPar.Get32(3)->GetDouble();
+ aParams[1] <<= rPar.Get(2)->GetDouble();
+ aParams[2] <<= rPar.Get(3)->GetDouble();
- CallFunctionAccessFunction( aParams, "MIRR", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "MIRR", rPar.Get(0));
}
void SbRtl_IRR(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 1 || nArgCount > 2 )
{
@@ -2728,7 +2729,7 @@ void SbRtl_IRR(StarBASIC *, SbxArray & rPar, bool)
return;
}
// retrieve non-optional params
- Any aValues = sbxToUnoValue( rPar.Get32(1),
+ Any aValues = sbxToUnoValue(rPar.Get(1),
cppu::UnoType<Sequence<double>>::get() );
// convert for calc functions
@@ -2741,20 +2742,20 @@ void SbRtl_IRR(StarBASIC *, SbxArray & rPar, bool)
// guess
if ( nArgCount >= 2 )
{
- if( rPar.Get32(2)->GetType() != SbxEMPTY )
- guess = rPar.Get32(2)->GetDouble();
+ if (rPar.Get(2)->GetType() != SbxEMPTY)
+ guess = rPar.Get(2)->GetDouble();
}
Sequence< Any > aParams( 2 );
aParams[ 0 ] = aValues;
aParams[ 1 ] <<= guess;
- CallFunctionAccessFunction( aParams, "IRR", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "IRR", rPar.Get(0));
}
void SbRtl_IPmt(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 4 || nArgCount > 6 )
{
@@ -2763,10 +2764,10 @@ void SbRtl_IPmt(StarBASIC *, SbxArray & rPar, bool)
}
// retrieve non-optional params
- double rate = rPar.Get32(1)->GetDouble();
- double per = rPar.Get32(2)->GetInteger();
- double nper = rPar.Get32(3)->GetDouble();
- double pv = rPar.Get32(4)->GetDouble();
+ double rate = rPar.Get(1)->GetDouble();
+ double per = rPar.Get(2)->GetInteger();
+ double nper = rPar.Get(3)->GetDouble();
+ double pv = rPar.Get(4)->GetDouble();
// set default values for Optional args
double fv = 0;
@@ -2775,14 +2776,14 @@ void SbRtl_IPmt(StarBASIC *, SbxArray & rPar, bool)
// fv
if ( nArgCount >= 5 )
{
- if( rPar.Get32(5)->GetType() != SbxEMPTY )
- fv = rPar.Get32(5)->GetDouble();
+ if (rPar.Get(5)->GetType() != SbxEMPTY)
+ fv = rPar.Get(5)->GetDouble();
}
// type
if ( nArgCount >= 6 )
{
- if( rPar.Get32(6)->GetType() != SbxEMPTY )
- type = rPar.Get32(6)->GetDouble();
+ if (rPar.Get(6)->GetType() != SbxEMPTY)
+ type = rPar.Get(6)->GetDouble();
}
Sequence< Any > aParams( 6 );
@@ -2793,12 +2794,12 @@ void SbRtl_IPmt(StarBASIC *, SbxArray & rPar, bool)
aParams[ 4 ] <<= fv;
aParams[ 5 ] <<= type;
- CallFunctionAccessFunction( aParams, "IPmt", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "IPmt", rPar.Get(0));
}
void SbRtl_FV(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 3 || nArgCount > 5 )
{
@@ -2807,9 +2808,9 @@ void SbRtl_FV(StarBASIC *, SbxArray & rPar, bool)
}
// retrieve non-optional params
- double rate = rPar.Get32(1)->GetDouble();
- double nper = rPar.Get32(2)->GetDouble();
- double pmt = rPar.Get32(3)->GetDouble();
+ double rate = rPar.Get(1)->GetDouble();
+ double nper = rPar.Get(2)->GetDouble();
+ double pmt = rPar.Get(3)->GetDouble();
// set default values for Optional args
double pv = 0;
@@ -2818,14 +2819,14 @@ void SbRtl_FV(StarBASIC *, SbxArray & rPar, bool)
// pv
if ( nArgCount >= 4 )
{
- if( rPar.Get32(4)->GetType() != SbxEMPTY )
- pv = rPar.Get32(4)->GetDouble();
+ if (rPar.Get(4)->GetType() != SbxEMPTY)
+ pv = rPar.Get(4)->GetDouble();
}
// type
if ( nArgCount >= 5 )
{
- if( rPar.Get32(5)->GetType() != SbxEMPTY )
- type = rPar.Get32(5)->GetDouble();
+ if (rPar.Get(5)->GetType() != SbxEMPTY)
+ type = rPar.Get(5)->GetDouble();
}
Sequence< Any > aParams( 5 );
@@ -2835,12 +2836,12 @@ void SbRtl_FV(StarBASIC *, SbxArray & rPar, bool)
aParams[ 3 ] <<= pv;
aParams[ 4 ] <<= type;
- CallFunctionAccessFunction( aParams, "FV", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "FV", rPar.Get(0));
}
void SbRtl_DDB(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 4 || nArgCount > 5 )
{
@@ -2849,10 +2850,10 @@ void SbRtl_DDB(StarBASIC *, SbxArray & rPar, bool)
}
// retrieve non-optional params
- double cost = rPar.Get32(1)->GetDouble();
- double salvage = rPar.Get32(2)->GetDouble();
- double life = rPar.Get32(3)->GetDouble();
- double period = rPar.Get32(4)->GetDouble();
+ double cost = rPar.Get(1)->GetDouble();
+ double salvage = rPar.Get(2)->GetDouble();
+ double life = rPar.Get(3)->GetDouble();
+ double period = rPar.Get(4)->GetDouble();
// set default values for Optional args
double factor = 2;
@@ -2860,8 +2861,8 @@ void SbRtl_DDB(StarBASIC *, SbxArray & rPar, bool)
// factor
if ( nArgCount >= 5 )
{
- if( rPar.Get32(5)->GetType() != SbxEMPTY )
- factor = rPar.Get32(5)->GetDouble();
+ if (rPar.Get(5)->GetType() != SbxEMPTY)
+ factor = rPar.Get(5)->GetDouble();
}
Sequence< Any > aParams( 5 );
@@ -2871,12 +2872,12 @@ void SbRtl_DDB(StarBASIC *, SbxArray & rPar, bool)
aParams[ 3 ] <<= period;
aParams[ 4 ] <<= factor;
- CallFunctionAccessFunction( aParams, "DDB", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "DDB", rPar.Get(0));
}
void SbRtl_Rate(StarBASIC *, SbxArray & rPar, bool)
{
- sal_uInt32 nArgCount = rPar.Count32()-1;
+ sal_uInt32 nArgCount = rPar.Count() - 1;
if ( nArgCount < 3 || nArgCount > 6 )
{
@@ -2889,9 +2890,9 @@ void SbRtl_Rate(StarBASIC *, SbxArray & rPar, bool)
double pmt = 0;
double pv = 0;
- nper = rPar.Get32(1)->GetDouble();
- pmt = rPar.Get32(2)->GetDouble();
- pv = rPar.Get32(3)->GetDouble();
+ nper = rPar.Get(1)->GetDouble();
+ pmt = rPar.Get(2)->GetDouble();
+ pv = rPar.Get(3)->GetDouble();
// set default values for Optional args
double fv = 0;
@@ -2901,22 +2902,22 @@ void SbRtl_Rate(StarBASIC *, SbxArray & rPar, bool)
// fv
if ( nArgCount >= 4 )
{
- if( rPar.Get32(4)->GetType() != SbxEMPTY )
- fv = rPar.Get32(4)->GetDouble();
+ if (rPar.Get(4)->GetType() != SbxEMPTY)
+ fv = rPar.Get(4)->GetDouble();
}
// type
if ( nArgCount >= 5 )
{
- if( rPar.Get32(5)->GetType() != SbxEMPTY )
- type = rPar.Get32(5)->GetDouble();
+ if (rPar.Get(5)->GetType() != SbxEMPTY)
+ type = rPar.Get(5)->GetDouble();
}
// guess
if ( nArgCount >= 6 )
{
- if( rPar.Get32(6)->GetType() != SbxEMPTY )
- guess = rPar.Get32(6)->GetDouble();
+ if (rPar.Get(6)->GetType() != SbxEMPTY)
+ guess = rPar.Get(6)->GetDouble();
}
Sequence< Any > aParams( 6 );
@@ -2927,18 +2928,18 @@ void SbRtl_Rate(StarBASIC *, SbxArray & rPar, bool)
aParams[ 4 ] <<= type;
aParams[ 5 ] <<= guess;
- CallFunctionAccessFunction( aParams, "Rate", rPar.Get32( 0 ) );
+ CallFunctionAccessFunction(aParams, "Rate", rPar.Get(0));
}
void SbRtl_StrReverse(StarBASIC *, SbxArray & rPar, bool)
{
- if ( rPar.Count32() != 2 )
+ if (rPar.Count() != 2)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- SbxVariable *pSbxVariable = rPar.Get32(1);
+ SbxVariable* pSbxVariable = rPar.Get(1);
if( pSbxVariable->IsNull() )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -2946,13 +2947,13 @@ void SbRtl_StrReverse(StarBASIC *, SbxArray & rPar, bool)
}
OUString aStr = comphelper::string::reverseString(pSbxVariable->GetOUString());
- rPar.Get32(0)->PutString( aStr );
+ rPar.Get(0)->PutString(aStr);
}
void SbRtl_CompatibilityMode(StarBASIC *, SbxArray & rPar, bool)
{
bool bEnabled = false;
- sal_uInt32 nCount = rPar.Count32();
+ sal_uInt32 nCount = rPar.Count();
if ( nCount != 1 && nCount != 2 )
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -2961,24 +2962,24 @@ void SbRtl_CompatibilityMode(StarBASIC *, SbxArray & rPar, bool)
{
if ( nCount == 2 )
{
- pInst->EnableCompatibility( rPar.Get32(1)->GetBool() );
+ pInst->EnableCompatibility(rPar.Get(1)->GetBool());
}
bEnabled = pInst->IsCompatibility();
}
- rPar.Get32(0)->PutBool( bEnabled );
+ rPar.Get(0)->PutBool(bEnabled);
}
void SbRtl_Input(StarBASIC *, SbxArray & rPar, bool)
{
// 2 parameters needed
- if ( rPar.Count32() < 3 )
+ if (rPar.Count() < 3)
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
- sal_uInt16 nByteCount = rPar.Get32(1)->GetUShort();
- sal_Int16 nFileNumber = rPar.Get32(2)->GetInteger();
+ sal_uInt16 nByteCount = rPar.Get(1)->GetUShort();
+ sal_Int16 nFileNumber = rPar.Get(2)->GetInteger();
SbiIoSystem* pIosys = GetSbData()->pInst->GetIoSystem();
SbiStream* pSbStrm = pIosys->GetStream( nFileNumber );
@@ -2998,14 +2999,14 @@ void SbRtl_Input(StarBASIC *, SbxArray & rPar, bool)
StarBASIC::Error( err );
return;
}
- rPar.Get32(0)->PutString(OStringToOUString(aByteBuffer, osl_getThreadTextEncoding()));
+ rPar.Get(0)->PutString(OStringToOUString(aByteBuffer, osl_getThreadTextEncoding()));
}
void SbRtl_Me(StarBASIC *, SbxArray & rPar, bool)
{
SbModule* pActiveModule = GetSbData()->pInst->GetActiveModule();
SbClassModuleObject* pClassModuleObject = dynamic_cast<SbClassModuleObject*>( pActiveModule );
- SbxVariableRef refVar = rPar.Get32(0);
+ SbxVariableRef refVar = rPar.Get(0);
if( pClassModuleObject == nullptr )
{
SbObjModule* pMod = dynamic_cast<SbObjModule*>( pActiveModule );
diff --git a/basic/source/runtime/props.cxx b/basic/source/runtime/props.cxx
index 1d81ee7279fc..838f6e569772 100644
--- a/basic/source/runtime/props.cxx
+++ b/basic/source/runtime/props.cxx
@@ -28,421 +28,145 @@
// at the element 0 of the Argv; at Put (bWrite = sal_True) the value from
// element 0 is stored.
-void SbRtl_Erl(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutLong( StarBASIC::GetErl() );
-}
+void SbRtl_Erl(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutLong(StarBASIC::GetErl()); }
void SbRtl_Err(StarBASIC *, SbxArray & rPar, bool bWrite)
{
if( SbiRuntime::isVBAEnabled() )
{
- rPar.Get32(0)->PutObject( SbxErrObject::getErrObject().get() );
+ rPar.Get(0)->PutObject(SbxErrObject::getErrObject().get());
}
else
{
if( bWrite )
{
- sal_Int32 nVal = rPar.Get32(0)->GetLong();
+ sal_Int32 nVal = rPar.Get(0)->GetLong();
if( nVal <= 65535 )
StarBASIC::Error( StarBASIC::GetSfxFromVBError( static_cast<sal_uInt16>(nVal) ) );
}
else
- rPar.Get32(0)->PutLong( StarBASIC::GetVBErrorCode( StarBASIC::GetErrBasic() ) );
+ rPar.Get(0)->PutLong(StarBASIC::GetVBErrorCode(StarBASIC::GetErrBasic()));
}
}
-void SbRtl_False(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutBool( false );
-}
+void SbRtl_False(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutBool(false); }
void SbRtl_Empty(StarBASIC *, SbxArray &, bool) {}
void SbRtl_Nothing(StarBASIC *, SbxArray & rPar, bool)
{
// return an empty object
- rPar.Get32(0)->PutObject( nullptr );
+ rPar.Get(0)->PutObject(nullptr);
}
void SbRtl_Null(StarBASIC *, SbxArray & rPar, bool)
{
// returns an empty object-variable
- rPar.Get32(0)->PutNull();
-}
-
-void SbRtl_PI(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutDouble( F_PI );
-}
-
-void SbRtl_True(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutBool( true );
-}
-
-void SbRtl_ATTR_NORMAL(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(0);
-}
-void SbRtl_ATTR_READONLY(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(1);
-}
-void SbRtl_ATTR_HIDDEN(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(2);
-}
-void SbRtl_ATTR_SYSTEM(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(4);
-}
-void SbRtl_ATTR_VOLUME(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(8);
-}
-void SbRtl_ATTR_DIRECTORY(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(16);
-}
-void SbRtl_ATTR_ARCHIVE(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(32);
-}
-
-void SbRtl_V_EMPTY(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(0);
-}
-void SbRtl_V_NULL(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(1);
-}
-void SbRtl_V_INTEGER(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(2);
-}
-void SbRtl_V_LONG(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(3);
-}
-void SbRtl_V_SINGLE(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(4);
-}
-void SbRtl_V_DOUBLE(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(5);
-}
-void SbRtl_V_CURRENCY(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(6);
-}
-void SbRtl_V_DATE(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(7);
-}
-void SbRtl_V_STRING(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(8);
-}
-
-void SbRtl_MB_OK(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(0);
-}
-void SbRtl_MB_OKCANCEL(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(1);
-}
-void SbRtl_MB_ABORTRETRYIGNORE(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(2);
-}
-void SbRtl_MB_YESNOCANCEL(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(3);
-}
-void SbRtl_MB_YESNO(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(4);
-}
-void SbRtl_MB_RETRYCANCEL(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(5);
-}
-void SbRtl_MB_ICONSTOP(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(16);
-}
-void SbRtl_MB_ICONQUESTION(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(32);
-}
-void SbRtl_MB_ICONEXCLAMATION(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(48);
-}
-void SbRtl_MB_ICONINFORMATION(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(64);
-}
-void SbRtl_MB_DEFBUTTON1(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(0);
-}
-void SbRtl_MB_DEFBUTTON2(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(256);
-}
-void SbRtl_MB_DEFBUTTON3(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(512);
-}
-void SbRtl_MB_APPLMODAL(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(0);
-}
-void SbRtl_MB_SYSTEMMODAL(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(4096);
-}
-
-void SbRtl_IDOK(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(1);
-}
-
-void SbRtl_IDCANCEL(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(2);
-}
-void SbRtl_IDABORT(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(3);
-}
-void SbRtl_IDRETRY(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(4);
-}
-void SbRtl_IDYES(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(6);
-}
-void SbRtl_IDNO(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(7);
-}
-
-void SbRtl_CF_TEXT(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(1);
-}
-void SbRtl_CF_BITMAP(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(2);
-}
-void SbRtl_CF_METAFILEPICT(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(3);
-}
-
-void SbRtl_TYP_AUTHORFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(7);
-}
-void SbRtl_TYP_CHAPTERFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(4);
-}
-void SbRtl_TYP_CONDTXTFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(27);
-}
-void SbRtl_TYP_DATEFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(0);
-}
-void SbRtl_TYP_DBFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(19);
-}
-void SbRtl_TYP_DBNAMEFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(3);
-}
-void SbRtl_TYP_DBNEXTSETFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(24);
-}
-void SbRtl_TYP_DBNUMSETFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(25);
-}
-void SbRtl_TYP_DBSETNUMBERFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(26);
-}
-void SbRtl_TYP_DDEFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(14);
-}
-void SbRtl_TYP_DOCINFOFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(18);
-}
-void SbRtl_TYP_DOCSTATFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(6);
-}
-void SbRtl_TYP_EXTUSERFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(30);
-}
-void SbRtl_TYP_FILENAMEFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(2);
-}
-void SbRtl_TYP_FIXDATEFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(31);
-}
-void SbRtl_TYP_FIXTIMEFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(32);
-}
-void SbRtl_TYP_FORMELFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(10);
-}
-void SbRtl_TYP_GETFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(9);
-}
-void SbRtl_TYP_GETREFFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(13);
-}
-void SbRtl_TYP_HIDDENPARAFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(17);
-}
-void SbRtl_TYP_HIDDENTXTFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(11);
-}
-void SbRtl_TYP_INPUTFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(16);
-}
-void SbRtl_TYP_MACROFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(15);
-}
-void SbRtl_TYP_NEXTPAGEFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(28);
-}
-void SbRtl_TYP_PAGENUMBERFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(5);
-}
-void SbRtl_TYP_POSTITFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(21);
-}
-void SbRtl_TYP_PREVPAGEFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(29);
-}
-void SbRtl_TYP_SEQFLD(StarBASIC * , SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(23);
-}
-void SbRtl_TYP_SETFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(8);
-}
-void SbRtl_TYP_SETINPFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(33);
-}
-void SbRtl_TYP_SETREFFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(12);
-}
-void SbRtl_TYP_TEMPLNAMEFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(22);
-}
-void SbRtl_TYP_TIMEFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(1);
-}
-void SbRtl_TYP_USERFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(20);
-}
-void SbRtl_TYP_USRINPFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(34);
-}
-void SbRtl_TYP_SETREFPAGEFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(35);
-}
-void SbRtl_TYP_GETREFPAGEFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(36);
-}
-void SbRtl_TYP_INTERNETFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(37);
-}
-
-void SbRtl_SET_ON(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(1);
-}
-void SbRtl_SET_OFF(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(0);
-}
-void SbRtl_TOGGLE(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(2);
-}
-
-void SbRtl_FRAMEANCHORPAGE(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(1);
-}
-void SbRtl_FRAMEANCHORPARA(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(14);
-}
-void SbRtl_FRAMEANCHORCHAR(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(15);
-}
-
-void SbRtl_CLEAR_ALLTABS(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(2);
-}
-void SbRtl_CLEAR_TAB(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(1);
-}
-void SbRtl_SET_TAB(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(0);
-}
-
-void SbRtl_TYP_JUMPEDITFLD(StarBASIC *, SbxArray & rPar, bool)
-{
- rPar.Get32(0)->PutInteger(38);
-}
+ rPar.Get(0)->PutNull();
+}
+
+void SbRtl_PI(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutDouble(F_PI); }
+
+void SbRtl_True(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutBool(true); }
+
+void SbRtl_ATTR_NORMAL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
+void SbRtl_ATTR_READONLY(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
+void SbRtl_ATTR_HIDDEN(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
+void SbRtl_ATTR_SYSTEM(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(4); }
+void SbRtl_ATTR_VOLUME(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(8); }
+void SbRtl_ATTR_DIRECTORY(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(16); }
+void SbRtl_ATTR_ARCHIVE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(32); }
+
+void SbRtl_V_EMPTY(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
+void SbRtl_V_NULL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
+void SbRtl_V_INTEGER(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
+void SbRtl_V_LONG(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(3); }
+void SbRtl_V_SINGLE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(4); }
+void SbRtl_V_DOUBLE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(5); }
+void SbRtl_V_CURRENCY(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(6); }
+void SbRtl_V_DATE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(7); }
+void SbRtl_V_STRING(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(8); }
+
+void SbRtl_MB_OK(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
+void SbRtl_MB_OKCANCEL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
+void SbRtl_MB_ABORTRETRYIGNORE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
+void SbRtl_MB_YESNOCANCEL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(3); }
+void SbRtl_MB_YESNO(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(4); }
+void SbRtl_MB_RETRYCANCEL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(5); }
+void SbRtl_MB_ICONSTOP(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(16); }
+void SbRtl_MB_ICONQUESTION(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(32); }
+void SbRtl_MB_ICONEXCLAMATION(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(48); }
+void SbRtl_MB_ICONINFORMATION(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(64); }
+void SbRtl_MB_DEFBUTTON1(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
+void SbRtl_MB_DEFBUTTON2(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(256); }
+void SbRtl_MB_DEFBUTTON3(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(512); }
+void SbRtl_MB_APPLMODAL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
+void SbRtl_MB_SYSTEMMODAL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(4096); }
+
+void SbRtl_IDOK(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
+
+void SbRtl_IDCANCEL(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
+void SbRtl_IDABORT(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(3); }
+void SbRtl_IDRETRY(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(4); }
+void SbRtl_IDYES(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(6); }
+void SbRtl_IDNO(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(7); }
+
+void SbRtl_CF_TEXT(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
+void SbRtl_CF_BITMAP(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
+void SbRtl_CF_METAFILEPICT(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(3); }
+
+void SbRtl_TYP_AUTHORFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(7); }
+void SbRtl_TYP_CHAPTERFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(4); }
+void SbRtl_TYP_CONDTXTFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(27); }
+void SbRtl_TYP_DATEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
+void SbRtl_TYP_DBFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(19); }
+void SbRtl_TYP_DBNAMEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(3); }
+void SbRtl_TYP_DBNEXTSETFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(24); }
+void SbRtl_TYP_DBNUMSETFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(25); }
+void SbRtl_TYP_DBSETNUMBERFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(26); }
+void SbRtl_TYP_DDEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(14); }
+void SbRtl_TYP_DOCINFOFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(18); }
+void SbRtl_TYP_DOCSTATFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(6); }
+void SbRtl_TYP_EXTUSERFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(30); }
+void SbRtl_TYP_FILENAMEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
+void SbRtl_TYP_FIXDATEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(31); }
+void SbRtl_TYP_FIXTIMEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(32); }
+void SbRtl_TYP_FORMELFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(10); }
+void SbRtl_TYP_GETFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(9); }
+void SbRtl_TYP_GETREFFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(13); }
+void SbRtl_TYP_HIDDENPARAFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(17); }
+void SbRtl_TYP_HIDDENTXTFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(11); }
+void SbRtl_TYP_INPUTFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(16); }
+void SbRtl_TYP_MACROFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(15); }
+void SbRtl_TYP_NEXTPAGEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(28); }
+void SbRtl_TYP_PAGENUMBERFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(5); }
+void SbRtl_TYP_POSTITFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(21); }
+void SbRtl_TYP_PREVPAGEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(29); }
+void SbRtl_TYP_SEQFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(23); }
+void SbRtl_TYP_SETFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(8); }
+void SbRtl_TYP_SETINPFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(33); }
+void SbRtl_TYP_SETREFFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(12); }
+void SbRtl_TYP_TEMPLNAMEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(22); }
+void SbRtl_TYP_TIMEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
+void SbRtl_TYP_USERFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(20); }
+void SbRtl_TYP_USRINPFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(34); }
+void SbRtl_TYP_SETREFPAGEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(35); }
+void SbRtl_TYP_GETREFPAGEFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(36); }
+void SbRtl_TYP_INTERNETFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(37); }
+
+void SbRtl_SET_ON(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
+void SbRtl_SET_OFF(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
+void SbRtl_TOGGLE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
+
+void SbRtl_FRAMEANCHORPAGE(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
+void SbRtl_FRAMEANCHORPARA(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(14); }
+void SbRtl_FRAMEANCHORCHAR(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(15); }
+
+void SbRtl_CLEAR_ALLTABS(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(2); }
+void SbRtl_CLEAR_TAB(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(1); }
+void SbRtl_SET_TAB(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(0); }
+
+void SbRtl_TYP_JUMPEDITFLD(StarBASIC*, SbxArray& rPar, bool) { rPar.Get(0)->PutInteger(38); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index bacd02a2c0e2..9de5da64d5f2 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -671,10 +671,10 @@ void SbiRuntime::SetParameters( SbxArray* pParams )
{
refParams = new SbxArray;
// for the return value
- refParams->Put32( pMeth, 0 );
+ refParams->Put(pMeth, 0);
SbxInfo* pInfo = pMeth ? pMeth->GetInfo() : nullptr;
- sal_uInt32 nParamCount = pParams ? pParams->Count32() : 1;
+ sal_uInt32 nParamCount = pParams ? pParams->Count() : 1;
assert(nParamCount <= std::numeric_limits<sal_uInt16>::max());
if( nParamCount > 1 )
{
@@ -687,25 +687,25 @@ void SbiRuntime::SetParameters( SbxArray* pParams )
{
SbxDimArray* pArray = new SbxDimArray( SbxVARIANT );
sal_uInt32 nParamArrayParamCount = nParamCount - i;
- pArray->unoAddDim32( 0, nParamArrayParamCount - 1 );
+ pArray->unoAddDim(0, nParamArrayParamCount - 1);
for (sal_uInt32 j = i; j < nParamCount ; ++j)
{
- SbxVariable* v = pParams->Get32( j );
+ SbxVariable* v = pParams->Get(j);
sal_Int32 aDimIndex[1];
aDimIndex[0] = j - i;
- pArray->Put32(v, aDimIndex);
+ pArray->Put(v, aDimIndex);
}
SbxVariable* pArrayVar = new SbxVariable( SbxVARIANT );
pArrayVar->SetFlag( SbxFlagBits::ReadWrite );
pArrayVar->PutObject( pArray );
- refParams->Put32( pArrayVar, i );
+ refParams->Put(pArrayVar, i);
// Block ParamArray for missing parameter
pInfo = nullptr;
break;
}
- SbxVariable* v = pParams->Get32( i );
+ SbxVariable* v = pParams->Get(i);
// methods are always byval!
bool bByVal = dynamic_cast<const SbxMethod *>(v) != nullptr;
SbxDataType t = v->GetType();
@@ -742,7 +742,7 @@ void SbiRuntime::SetParameters( SbxArray* pParams )
SetIsMissing( v2 );
}
*v2 = *v;
- refParams->Put32( v2, i );
+ refParams->Put(v2, i);
}
else
{
@@ -758,11 +758,11 @@ void SbiRuntime::SetParameters( SbxArray* pParams )
v->Convert( t );
}
}
- refParams->Put32( v, i );
+ refParams->Put(v, i);
}
if( p )
{
- refParams->PutAlias32( p->aName, i );
+ refParams->PutAlias(p->aName, i);
}
}
}
@@ -776,11 +776,11 @@ void SbiRuntime::SetParameters( SbxArray* pParams )
if( p && (p->nUserData & PARAM_INFO_PARAMARRAY) != 0 )
{
SbxDimArray* pArray = new SbxDimArray( SbxVARIANT );
- pArray->unoAddDim32( 0, -1 );
+ pArray->unoAddDim(0, -1);
SbxVariable* pArrayVar = new SbxVariable( SbxVARIANT );
pArrayVar->SetFlag( SbxFlagBits::ReadWrite );
pArrayVar->PutObject( pArray );
- refParams->Put32( pArrayVar, nParamCount );
+ refParams->Put(pArrayVar, nParamCount);
}
}
@@ -1015,7 +1015,7 @@ void SbiRuntime::PushVar( SbxVariable* pVar )
{
if( pVar )
{
- refExprStk->Put32( pVar, nExprLvl++ );
+ refExprStk->Put(pVar, nExprLvl++);
}
}
@@ -1028,7 +1028,7 @@ SbxVariableRef SbiRuntime::PopVar()
return new SbxVariable;
}
#endif
- SbxVariableRef xVar = refExprStk->Get32( --nExprLvl );
+ SbxVariableRef xVar = refExprStk->Get(--nExprLvl);
SAL_INFO_IF( xVar->GetName() == "Cells", "basic", "PopVar: Name equals 'Cells'" );
// methods hold themselves in parameter 0
if( dynamic_cast<const SbxMethod *>(xVar.get()) != nullptr )
@@ -1061,13 +1061,13 @@ SbxVariable* SbiRuntime::GetTOS()
return new SbxVariable;
}
#endif
- return refExprStk->Get32( static_cast<sal_uInt32>(n) );
+ return refExprStk->Get(static_cast<sal_uInt32>(n));
}
void SbiRuntime::TOSMakeTemp()
{
- SbxVariable* p = refExprStk->Get32( nExprLvl - 1 );
+ SbxVariable* p = refExprStk->Get(nExprLvl - 1);
if ( p->GetType() == SbxEMPTY )
{
p->Broadcast( SfxHintId::BasicDataWanted );
@@ -1084,13 +1084,13 @@ void SbiRuntime::TOSMakeTemp()
pDflt->SetParent( nullptr );
p = new SbxVariable( *pDflt );
p->SetFlag( SbxFlagBits::ReadWrite );
- refExprStk->Put32( p, nExprLvl - 1 );
+ refExprStk->Put(p, nExprLvl - 1);
}
else if( p->GetRefCount() != 1 )
{
SbxVariable* pNew = new SbxVariable( *p );
pNew->SetFlag( SbxFlagBits::ReadWrite );
- refExprStk->Put32( pNew, nExprLvl - 1 );
+ refExprStk->Put(pNew, nExprLvl - 1);
}
}
@@ -1181,14 +1181,14 @@ void SbiRuntime::PushForEach()
{
p->refEnd = reinterpret_cast<SbxVariable*>(pArray);
- sal_Int32 nDims = pArray->GetDims32();
+ sal_Int32 nDims = pArray->GetDims();
p->pArrayLowerBounds.reset( new sal_Int32[nDims] );
p->pArrayUpperBounds.reset( new sal_Int32[nDims] );
p->pArrayCurIndices.reset( new sal_Int32[nDims] );
sal_Int32 lBound, uBound;
for( sal_Int32 i = 0 ; i < nDims ; i++ )
{
- pArray->GetDim32( i+1, lBound, uBound );
+ pArray->GetDim(i + 1, lBound, uBound);
p->pArrayCurIndices[i] = p->pArrayLowerBounds[i] = lBound;
p->pArrayUpperBounds[i] = uBound;
}
@@ -2139,7 +2139,7 @@ void SbiRuntime::DimImpl(const SbxVariableRef& refVar)
SbxArray* pDims = refVar->GetParameters();
// must have an even number of arguments
// have in mind that Arg[0] does not count!
- if( pDims && !( pDims->Count32() & 1 ) )
+ if (pDims && !(pDims->Count() & 1))
{
StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR );
}
@@ -2152,16 +2152,16 @@ void SbiRuntime::DimImpl(const SbxVariableRef& refVar)
{
refVar->ResetFlag( SbxFlagBits::VarToDim );
- for( sal_uInt32 i = 1; i < pDims->Count32(); )
+ for (sal_uInt32 i = 1; i < pDims->Count();)
{
- sal_Int32 lb = pDims->Get32( i++ )->GetLong();
- sal_Int32 ub = pDims->Get32( i++ )->GetLong();
+ sal_Int32 lb = pDims->Get(i++)->GetLong();
+ sal_Int32 ub = pDims->Get(i++)->GetLong();
if( ub < lb )
{
Error( ERRCODE_BASIC_OUT_OF_RANGE );
ub = lb;
}
- pArray->AddDim32( lb, ub );
+ pArray->AddDim(lb, ub);
if ( lb != ub )
{
pArray->setHasFixedSize( true );
@@ -2172,7 +2172,7 @@ void SbiRuntime::DimImpl(const SbxVariableRef& refVar)
{
// #62867 On creating an array of the length 0, create
// a dimension (like for Uno-Sequences of the length 0)
- pArray->unoAddDim32( 0, -1 );
+ pArray->unoAddDim(0, -1);
}
SbxFlagBits nSavFlags = refVar->GetFlags();
refVar->ResetFlag( SbxFlagBits::Fixed );
@@ -2208,11 +2208,11 @@ static void implCopyDimArray( SbxDimArray* pNewArray, SbxDimArray* pOldArray, sa
}
else
{
- SbxVariable* pSource = pOldArray->Get32( pActualIndices );
+ SbxVariable* pSource = pOldArray->Get(pActualIndices);
if (pSource && pOldArray->GetRefCount() > 1)
// tdf#134692: old array will stay alive after the redim - we need to copy deep
pSource = new SbxVariable(*pSource);
- pNewArray->Put32(pSource, pActualIndices);
+ pNewArray->Put(pSource, pActualIndices);
}
}
}
@@ -2227,8 +2227,8 @@ static bool implRestorePreservedArray(SbxDimArray* pNewArray, SbxArrayRef& rrefR
if (rrefRedimpArray)
{
SbxDimArray* pOldArray = static_cast<SbxDimArray*>(rrefRedimpArray.get());
- const sal_Int32 nDimsNew = pNewArray->GetDims32();
- const sal_Int32 nDimsOld = pOldArray->GetDims32();
+ const sal_Int32 nDimsNew = pNewArray->GetDims();
+ const sal_Int32 nDimsOld = pOldArray->GetDims();
if (nDimsOld != nDimsNew)
{
@@ -2249,8 +2249,8 @@ static bool implRestorePreservedArray(SbxDimArray* pNewArray, SbxArrayRef& rrefR
{
sal_Int32 lBoundNew, uBoundNew;
sal_Int32 lBoundOld, uBoundOld;
- pNewArray->GetDim32(i, lBoundNew, uBoundNew);
- pOldArray->GetDim32(i, lBoundOld, uBoundOld);
+ pNewArray->GetDim(i, lBoundNew, uBoundNew);
+ pOldArray->GetDim(i, lBoundOld, uBoundOld);
lBoundNew = std::max(lBoundNew, lBoundOld);
uBoundNew = std::min(uBoundNew, uBoundOld);
sal_Int32 j = i - 1;
@@ -2262,7 +2262,7 @@ static bool implRestorePreservedArray(SbxDimArray* pNewArray, SbxArrayRef& rrefR
// Optimization: pre-allocate underlying container
if (bNeedsPreallocation)
- pNewArray->Put32(nullptr, pUpperBounds.get());
+ pNewArray->Put(nullptr, pUpperBounds.get());
// Copy data from old array by going recursively through all dimensions
// (It would be faster to work on the flat internal data array of an
@@ -2452,7 +2452,7 @@ void SbiRuntime::StepARGV()
SbxVariable* pRes = new SbxVariable( *pVal );
pVal = pRes;
}
- refArgv->Put32( pVal.get(), nArgc++ );
+ refArgv->Put(pVal.get(), nArgc++);
}
}
@@ -2629,20 +2629,20 @@ void SbiRuntime::StepCASE()
refCaseStk = new SbxArray;
}
SbxVariableRef xVar = PopVar();
- refCaseStk->Put32( xVar.get(), refCaseStk->Count32() );
+ refCaseStk->Put(xVar.get(), refCaseStk->Count());
}
// end CASE: free variable
void SbiRuntime::StepENDCASE()
{
- if( !refCaseStk.is() || !refCaseStk->Count32() )
+ if (!refCaseStk.is() || !refCaseStk->Count())
{
StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR );
}
else
{
- refCaseStk->Remove( refCaseStk->Count32() - 1 );
+ refCaseStk->Remove(refCaseStk->Count() - 1);
}
}
@@ -2890,8 +2890,8 @@ void SbiRuntime::StepARGN( sal_uInt32 nOp1 )
SbxVariable* pRes = new SbxVariable( *pVal );
pVal = pRes;
}
- refArgv->Put32( pVal.get(), nArgc );
- refArgv->PutAlias32( aAlias, nArgc++ );
+ refArgv->Put(pVal.get(), nArgc);
+ refArgv->PutAlias(aAlias, nArgc++);
}
}
@@ -2905,7 +2905,7 @@ void SbiRuntime::StepARGTYP( sal_uInt32 nOp1 )
{
bool bByVal = (nOp1 & 0x8000) != 0; // Is BYVAL requested?
SbxDataType t = static_cast<SbxDataType>(nOp1 & 0x7FFF);
- SbxVariable* pVar = refArgv->Get32( refArgv->Count32() - 1 ); // last Arg
+ SbxVariable* pVar = refArgv->Get(refArgv->Count() - 1); // last Arg
// check BYVAL
if( pVar->GetRefCount() > 2 ) // 2 is normal for BYVAL
@@ -2916,7 +2916,7 @@ void SbiRuntime::StepARGTYP( sal_uInt32 nOp1 )
// Call by Value is requested -> create a copy
pVar = new SbxVariable( *pVar );
pVar->SetFlag( SbxFlagBits::ReadWrite );
- refExprStk->Put32( pVar, refArgv->Count32() - 1 );
+ refExprStk->Put(pVar, refArgv->Count() - 1);
}
else
pVar->SetFlag( SbxFlagBits::Reference ); // Ref-Flag for DllMgr
@@ -3074,7 +3074,7 @@ void SbiRuntime::StepTESTFOR( sal_uInt32 nOp1 )
else
{
SbxDimArray* pArray = reinterpret_cast<SbxDimArray*>(p->refEnd.get());
- sal_Int32 nDims = pArray->GetDims32();
+ sal_Int32 nDims = pArray->GetDims();
// Empty array?
if( nDims == 1 && p->pArrayLowerBounds[0] > p->pArrayUpperBounds[0] )
@@ -3082,7 +3082,7 @@ void SbiRuntime::StepTESTFOR( sal_uInt32 nOp1 )
bEndLoop = true;
break;
}
- SbxVariable* pVal = pArray->Get32( p->pArrayCurIndices.get() );
+ SbxVariable* pVal = pArray->Get(p->pArrayCurIndices.get());
*(p->refVar) = *pVal;
bool bFoundNext = false;
@@ -3115,10 +3115,10 @@ void SbiRuntime::StepTESTFOR( sal_uInt32 nOp1 )
BasicCollection* pCollection = static_cast<BasicCollection*>(pForStk->refEnd.get());
SbxArrayRef xItemArray = pCollection->xItemArray;
- sal_Int32 nCount = xItemArray->Count32();
+ sal_Int32 nCount = xItemArray->Count();
if( pForStk->nCurCollectionIndex < nCount )
{
- SbxVariable* pRes = xItemArray->Get32( pForStk->nCurCollectionIndex );
+ SbxVariable* pRes = xItemArray->Get(pForStk->nCurCollectionIndex);
pForStk->nCurCollectionIndex++;
(*pForStk->refVar) = *pRes;
}
@@ -3168,13 +3168,13 @@ void SbiRuntime::StepTESTFOR( sal_uInt32 nOp1 )
void SbiRuntime::StepCASETO( sal_uInt32 nOp1 )
{
- if( !refCaseStk.is() || !refCaseStk->Count32() )
+ if (!refCaseStk.is() || !refCaseStk->Count())
StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR );
else
{
SbxVariableRef xTo = PopVar();
SbxVariableRef xFrom = PopVar();
- SbxVariableRef xCase = refCaseStk->Get32( refCaseStk->Count32() - 1 );
+ SbxVariableRef xCase = refCaseStk->Get(refCaseStk->Count() - 1);
if( *xCase >= *xFrom && *xCase <= *xTo )
StepJUMP( nOp1 );
}
@@ -3531,7 +3531,7 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
{
pElem->SetName( aName );
}
- refLocals->Put32( pElem, refLocals->Count32() );
+ refLocals->Put(pElem, refLocals->Count());
}
}
@@ -3583,7 +3583,7 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt
pElem->SetFlag( SbxFlagBits::Fixed );
}
pElem->SetName( aName );
- refLocals->Put32( pElem, refLocals->Count32() );
+ refLocals->Put(pElem, refLocals->Count());
}
}
}
@@ -3679,7 +3679,7 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& rName )
SbxInfo* pInfo = pMeth->GetInfo();
if( pInfo && refParams.is() )
{
- sal_uInt32 nParamCount = refParams->Count32();
+ sal_uInt32 nParamCount = refParams->Count();
assert(nParamCount <= std::numeric_limits<sal_uInt16>::max());
sal_uInt16 j = 1;
const SbxParamInfo* pParam = pInfo->GetParam( j );
@@ -3695,7 +3695,7 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& rName )
}
else
{
- pElem = refParams->Get32( j );
+ pElem = refParams->Get(j);
}
break;
}
@@ -3726,10 +3726,10 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
}
bool bHasNamed = false;
sal_uInt32 i;
- sal_uInt32 nArgCount = refArgv->Count32();
+ sal_uInt32 nArgCount = refArgv->Count();
for( i = 1 ; i < nArgCount ; i++ )
{
- if( !refArgv->GetAlias32(i).isEmpty() )
+ if (!refArgv->GetAlias(i).isEmpty())
{
bHasNamed = true; break;
}
@@ -3761,13 +3761,13 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
OUString* pNames = pArg->getNames().getArray();
for( i = 1 ; i < nArgCount ; i++ )
{
- SbxVariable* pVar = refArgv->Get32( i );
- OUString aName = refArgv->GetAlias32(i);
+ SbxVariable* pVar = refArgv->Get(i);
+ OUString aName = refArgv->GetAlias(i);
if (!aName.isEmpty())
{
pNames[i] = aName;
}
- pArg->Put32( pVar, nCurPar++ );
+ pArg->Put(pVar, nCurPar++);
}
refArgv = pArg;
}
@@ -3816,8 +3816,8 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
SbxArray* pArg = new SbxArray;
for( i = 1 ; i < nArgCount ; i++ )
{
- SbxVariable* pVar = refArgv->Get32( i );
- OUString aName = refArgv->GetAlias32(i);
+ SbxVariable* pVar = refArgv->Get(i);
+ OUString aName = refArgv->GetAlias(i);
if (!aName.isEmpty())
{
// nCurPar is set to the found parameter
@@ -3837,13 +3837,13 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
Error( ERRCODE_BASIC_NAMED_NOT_FOUND ); break;
}
}
- pArg->Put32( pVar, nCurPar++ );
+ pArg->Put(pVar, nCurPar++);
}
refArgv = pArg;
}
}
// own var as parameter 0
- refArgv->Put32( p, 0 );
+ refArgv->Put(p, 0);
p->SetParameters( refArgv.get() );
PopArgv();
}
@@ -3882,7 +3882,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
}
else
{
- pElem = pArray->Get32( pPar->Get32( 1 )->GetInteger() );
+ pElem = pArray->Get(pPar->Get(1)->GetInteger());
}
}
}
@@ -3890,7 +3890,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
// #42940, set parameter 0 to NULL so that var doesn't contain itself
if( pPar )
{
- pPar->Put32( nullptr, 0 );
+ pPar->Put(nullptr, 0);
}
}
// consider index-access for UnoObjects
@@ -3916,7 +3916,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
{
if( xIndexAccess.is() )
{
- sal_uInt32 nParamCount = pPar->Count32() - 1;
+ sal_uInt32 nParamCount = pPar->Count() - 1;
if( nParamCount != 1 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -3924,7 +3924,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
}
// get index
- sal_Int32 nIndex = pPar->Get32( 1 )->GetLong();
+ sal_Int32 nIndex = pPar->Get(1)->GetLong();
Reference< XInterface > xRet;
try
{
@@ -4008,12 +4008,12 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
}
// #42940, set parameter 0 to NULL so that var doesn't contain itself
- pPar->Put32( nullptr, 0 );
+ pPar->Put(nullptr, 0);
}
else if (BasicCollection* pCol = dynamic_cast<BasicCollection*>(pObj.get()))
{
pElem = new SbxVariable( SbxVARIANT );
- pPar->Put32( pElem, 0 );
+ pPar->Put(pElem, 0);
pCol->CollItem( pPar );
}
}
@@ -4120,7 +4120,7 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
SbxVariable* pVar;
// #57915 solve missing in a cleaner way
- sal_uInt32 nParamCount = refParams->Count32();
+ sal_uInt32 nParamCount = refParams->Count();
if( nIdx >= nParamCount )
{
sal_uInt16 iLoop = nIdx;
@@ -4130,11 +4130,11 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
pVar->PutErr( 448 ); // like in VB: Error-Code 448 (ERRCODE_BASIC_NAMED_NOT_FOUND)
// tdf#79426, tdf#125180 - add additional information about a missing parameter
SetIsMissing( pVar );
- refParams->Put32( pVar, iLoop );
+ refParams->Put(pVar, iLoop);
iLoop--;
}
}
- pVar = refParams->Get32( nIdx );
+ pVar = refParams->Get(nIdx);
// tdf#79426, tdf#125180 - check for optionals only if the parameter is actually missing
if( pVar->GetType() == SbxERROR && IsMissing( pVar, 1 ) && nIdx )
@@ -4158,13 +4158,13 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
OUString aDefaultStr = pImg->GetString( nDefaultId );
pVar = new SbxVariable(pParam-> eType);
pVar->PutString( aDefaultStr );
- refParams->Put32( pVar, nIdx );
+ refParams->Put(pVar, nIdx);
}
else if ( SbiRuntime::isVBAEnabled() && eType != SbxVARIANT )
{
// tdf#36737 - initialize the parameter with the default value of its type
pVar = new SbxVariable( pParam->eType );
- refParams->Put32( pVar, nIdx );
+ refParams->Put(pVar, nIdx);
}
bOpt = true;
}
@@ -4188,14 +4188,14 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 )
void SbiRuntime::StepCASEIS( sal_uInt32 nOp1, sal_uInt32 nOp2 )
{
- if( !refCaseStk.is() || !refCaseStk->Count32() )
+ if (!refCaseStk.is() || !refCaseStk->Count())
{
StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR );
}
else
{
SbxVariableRef xComp = PopVar();
- SbxVariableRef xCase = refCaseStk->Get32( refCaseStk->Count32() - 1 );
+ SbxVariableRef xCase = refCaseStk->Get(refCaseStk->Count() - 1);
if( xCase->Compare( static_cast<SbxOperator>(nOp2), *xComp ) )
{
StepJUMP( nOp1 );
@@ -4255,7 +4255,7 @@ void SbiRuntime::StepSTMNT( sal_uInt32 nOp1, sal_uInt32 nOp2 )
}
else if( nExprLvl )
{
- SbxVariable* p = refExprStk->Get32( 0 );
+ SbxVariable* p = refExprStk->Get(0);
if( p->GetRefCount() > 1 &&
refLocals.is() && refLocals->Find( p->GetName(), p->GetClass() ) )
{
@@ -4406,21 +4406,21 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
if (!pArray)
return;
- const sal_Int32 nDims = pArray->GetDims32();
+ const sal_Int32 nDims = pArray->GetDims();
sal_Int32 nTotalSize = nDims > 0 ? 1 : 0;
// must be a one-dimensional array
sal_Int32 nLower, nUpper;
for( sal_Int32 i = 0 ; i < nDims ; ++i )
{
- pArray->GetDim32( i+1, nLower, nUpper );
+ pArray->GetDim(i + 1, nLower, nUpper);
const sal_Int32 nSize = nUpper - nLower + 1;
nTotalSize *= nSize;
}
// Optimization: pre-allocate underlying container
if (nTotalSize > 0)
- pArray->SbxArray::GetRef32(nTotalSize - 1);
+ pArray->SbxArray::GetRef(nTotalSize - 1);
// First, fill those parts of the array that are preserved
bool bWasError = false;
@@ -4433,7 +4433,7 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
OUString aName;
for( sal_Int32 i = 0 ; i < nTotalSize ; ++i )
{
- if (!bRestored || !pArray->SbxArray::GetRef32(i)) // For those left unset after preserve
+ if (!bRestored || !pArray->SbxArray::GetRef(i)) // For those left unset after preserve
{
SbxObject* pClassObj = SbxBase::CreateObject(aClass);
if (!pClassObj)
@@ -4448,7 +4448,7 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
pClassObj->SetName(aName);
// the object must be able to call the basic
pClassObj->SetParent(&rBasic);
- pArray->SbxArray::Put32(pClassObj, i);
+ pArray->SbxArray::Put(pClassObj, i);
}
}
}
@@ -4513,7 +4513,7 @@ void SbiRuntime::StepLOCAL( sal_uInt32 nOp1, sal_uInt32 nOp2 )
SbxVariable* p = new SbxVariable( t );
p->SetName( aName );
implHandleSbxFlags( p, t, nOp2 );
- refLocals->Put32( p, refLocals->Count32() );
+ refLocals->Put(p, refLocals->Count());
}
}
@@ -4658,7 +4658,7 @@ SbxVariable* SbiRuntime::StepSTATIC_Impl(
}
p->SetName( aName );
implHandleSbxFlags( p, t, nOp2 );
- pStatics->Put32( p, pStatics->Count32() );
+ pStatics->Put(p, pStatics->Count());
}
}
return p;
diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index 3b835a921be0..40fd9c25b799 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -1053,7 +1053,7 @@ void SbiStdObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( !pPar_ )
{
rPar = pPar_ = new SbxArray;
- pPar_->Put32( pVar, 0 );
+ pPar_->Put(pVar, 0);
}
p( static_cast<StarBASIC*>(GetParent()), *pPar_, bWrite );
return;
diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx
index a5ace17b4941..d5237b6f9e8c 100644
--- a/basic/source/runtime/stdobj1.cxx
+++ b/basic/source/runtime/stdobj1.cxx
@@ -272,7 +272,7 @@ void SbStdFont::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
void SbStdClipboard::MethClear( SbxArray const * pPar_ )
{
- if( pPar_ && (pPar_->Count32() > 1) )
+ if (pPar_ && (pPar_->Count() > 1))
{
StarBASIC::Error( ERRCODE_BASIC_BAD_NUMBER_OF_ARGS );
return;
@@ -282,13 +282,13 @@ void SbStdClipboard::MethClear( SbxArray const * pPar_ )
void SbStdClipboard::MethGetData( SbxArray* pPar_ )
{
- if( !pPar_ || (pPar_->Count32() != 2) )
+ if (!pPar_ || (pPar_->Count() != 2))
{
StarBASIC::Error( ERRCODE_BASIC_BAD_NUMBER_OF_ARGS );
return;
}
- sal_Int16 nFormat = pPar_->Get32(1)->GetInteger();
+ sal_Int16 nFormat = pPar_->Get(1)->GetInteger();
if( nFormat <= 0 || nFormat > 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -299,13 +299,13 @@ void SbStdClipboard::MethGetData( SbxArray* pPar_ )
void SbStdClipboard::MethGetFormat( SbxVariable* pVar, SbxArray* pPar_ )
{
- if( !pPar_ || (pPar_->Count32() != 2) )
+ if (!pPar_ || (pPar_->Count() != 2))
{
StarBASIC::Error( ERRCODE_BASIC_BAD_NUMBER_OF_ARGS );
return;
}
- sal_Int16 nFormat = pPar_->Get32(1)->GetInteger();
+ sal_Int16 nFormat = pPar_->Get(1)->GetInteger();
if( nFormat <= 0 || nFormat > 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -317,7 +317,7 @@ void SbStdClipboard::MethGetFormat( SbxVariable* pVar, SbxArray* pPar_ )
void SbStdClipboard::MethGetText( SbxVariable* pVar, SbxArray const * pPar_ )
{
- if( pPar_ && (pPar_->Count32() > 1) )
+ if (pPar_ && (pPar_->Count() > 1))
{
StarBASIC::Error( ERRCODE_BASIC_BAD_NUMBER_OF_ARGS );
return;
@@ -328,13 +328,13 @@ void SbStdClipboard::MethGetText( SbxVariable* pVar, SbxArray const * pPar_ )
void SbStdClipboard::MethSetData( SbxArray* pPar_ )
{
- if( !pPar_ || (pPar_->Count32() != 3) )
+ if (!pPar_ || (pPar_->Count() != 3))
{
StarBASIC::Error( ERRCODE_BASIC_BAD_NUMBER_OF_ARGS );
return;
}
- sal_Int16 nFormat = pPar_->Get32(2)->GetInteger();
+ sal_Int16 nFormat = pPar_->Get(2)->GetInteger();
if( nFormat <= 0 || nFormat > 3 )
{
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -345,7 +345,7 @@ void SbStdClipboard::MethSetData( SbxArray* pPar_ )
void SbStdClipboard::MethSetText( SbxArray const * pPar_ )
{
- if( !pPar_ || (pPar_->Count32() != 2) )
+ if (!pPar_ || (pPar_->Count() != 2))
{
StarBASIC::Error( ERRCODE_BASIC_BAD_NUMBER_OF_ARGS );
return;
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index 2a4942aca4c7..f531803f617a 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -82,12 +82,12 @@ void SbxArray::Clear()
mVarEntries.clear();
}
-sal_uInt32 SbxArray::Count32() const
+sal_uInt32 SbxArray::Count() const
{
return mVarEntries.size();
}
-SbxVariableRef& SbxArray::GetRef32( sal_uInt32 nIdx )
+SbxVariableRef& SbxArray::GetRef( sal_uInt32 nIdx )
{
// If necessary extend the array
DBG_ASSERT( nIdx <= SBX_MAXINDEX32, "SBX: Array-Index > SBX_MAXINDEX32" );
@@ -103,14 +103,14 @@ SbxVariableRef& SbxArray::GetRef32( sal_uInt32 nIdx )
return mVarEntries[nIdx].mpVar;
}
-SbxVariable* SbxArray::Get32( sal_uInt32 nIdx )
+SbxVariable* SbxArray::Get( sal_uInt32 nIdx )
{
if( !CanRead() )
{
SetError( ERRCODE_BASIC_PROP_WRITEONLY );
return nullptr;
}
- SbxVariableRef& rRef = GetRef32( nIdx );
+ SbxVariableRef& rRef = GetRef( nIdx );
if ( !rRef.is() )
rRef = new SbxVariable( eType );
@@ -118,7 +118,7 @@ SbxVariable* SbxArray::Get32( sal_uInt32 nIdx )
return rRef.get();
}
-void SbxArray::Put32( SbxVariable* pVar, sal_uInt32 nIdx )
+void SbxArray::Put( SbxVariable* pVar, sal_uInt32 nIdx )
{
if( !CanWrite() )
SetError( ERRCODE_BASIC_PROP_READONLY );
@@ -129,7 +129,7 @@ void SbxArray::Put32( SbxVariable* pVar, sal_uInt32 nIdx )
// Convert no objects
if( eType != SbxOBJECT || pVar->GetClass() != SbxClassType::Object )
pVar->Convert( eType );
- SbxVariableRef& rRef = GetRef32( nIdx );
+ SbxVariableRef& rRef = GetRef( nIdx );
// tdf#122250. It is possible that I hold the last reference to myself, so check, otherwise I might
// call SetFlag on myself after I have died.
bool removingMyself = rRef && rRef->GetParameters() == this && GetRefCount() == 1;
@@ -142,14 +142,14 @@ void SbxArray::Put32( SbxVariable* pVar, sal_uInt32 nIdx )
}
}
-OUString SbxArray::GetAlias32( sal_uInt32 nIdx )
+OUString SbxArray::GetAlias( sal_uInt32 nIdx )
{
if( !CanRead() )
{
SetError( ERRCODE_BASIC_PROP_WRITEONLY );
return OUString();
}
- SbxVarEntry& rRef = reinterpret_cast<SbxVarEntry&>(GetRef32( nIdx ));
+ SbxVarEntry& rRef = reinterpret_cast<SbxVarEntry&>(GetRef( nIdx ));
if (!rRef.maAlias)
return OUString();
@@ -157,7 +157,7 @@ OUString SbxArray::GetAlias32( sal_uInt32 nIdx )
return *rRef.maAlias;
}
-void SbxArray::PutAlias32( const OUString& rAlias, sal_uInt32 nIdx )
+void SbxArray::PutAlias( const OUString& rAlias, sal_uInt32 nIdx )
{
if( !CanWrite() )
{
@@ -165,12 +165,12 @@ void SbxArray::PutAlias32( const OUString& rAlias, sal_uInt32 nIdx )
}
else
{
- SbxVarEntry& rRef = reinterpret_cast<SbxVarEntry&>( GetRef32( nIdx ) );
+ SbxVarEntry& rRef = reinterpret_cast<SbxVarEntry&>( GetRef( nIdx ) );
rRef.maAlias = rAlias;
}
}
-void SbxArray::Insert32( SbxVariable* pVar, sal_uInt32 nIdx )
+void SbxArray::Insert( SbxVariable* pVar, sal_uInt32 nIdx )
{
DBG_ASSERT( mVarEntries.size() <= SBX_MAXINDEX32, "SBX: Array gets too big" );
if( mVarEntries.size() > SBX_MAXINDEX32 )
@@ -341,7 +341,7 @@ bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 /*nVer*/ )
SbxVariable* pVar = static_cast<SbxVariable*>(Load( rStrm ));
if( pVar )
{
- SbxVariableRef& rRef = GetRef32( nIdx );
+ SbxVariableRef& rRef = GetRef( nIdx );
rRef = pVar;
}
else
@@ -380,7 +380,7 @@ bool SbxArray::StoreData( SvStream& rStrm ) const
// #100883 Method to set method directly to parameter array
void SbxArray::PutDirect( SbxVariable* pVar, sal_uInt32 nIdx )
{
- SbxVariableRef& rRef = GetRef32( nIdx );
+ SbxVariableRef& rRef = GetRef( nIdx );
rRef = pVar;
}
@@ -414,7 +414,7 @@ void SbxDimArray::Clear()
// Add a dimension
-void SbxDimArray::AddDimImpl32( sal_Int32 lb, sal_Int32 ub, bool bAllowSize0 )
+void SbxDimArray::AddDimImpl( sal_Int32 lb, sal_Int32 ub, bool bAllowSize0 )
{
ErrCode eRes = ERRCODE_NONE;
if( ub < lb && !bAllowSize0 )
@@ -431,20 +431,20 @@ void SbxDimArray::AddDimImpl32( sal_Int32 lb, sal_Int32 ub, bool bAllowSize0 )
SetError( eRes );
}
-void SbxDimArray::AddDim32( sal_Int32 lb, sal_Int32 ub )
+void SbxDimArray::AddDim( sal_Int32 lb, sal_Int32 ub )
{
- AddDimImpl32( lb, ub, false );
+ AddDimImpl( lb, ub, false );
}
-void SbxDimArray::unoAddDim32( sal_Int32 lb, sal_Int32 ub )
+void SbxDimArray::unoAddDim( sal_Int32 lb, sal_Int32 ub )
{
- AddDimImpl32( lb, ub, true );
+ AddDimImpl( lb, ub, true );
}
// Readout dimension data
-bool SbxDimArray::GetDim32( sal_Int32 n, sal_Int32& rlb, sal_Int32& rub ) const
+bool SbxDimArray::GetDim( sal_Int32 n, sal_Int32& rlb, sal_Int32& rub ) const
{
if( n < 1 || n > static_cast<sal_Int32>(m_vDimensions.size()) )
{
@@ -460,7 +460,7 @@ bool SbxDimArray::GetDim32( sal_Int32 n, sal_Int32& rlb, sal_Int32& rub ) const
// Element-Ptr with the help of an index list
-sal_uInt32 SbxDimArray::Offset32( const sal_Int32* pIdx )
+sal_uInt32 SbxDimArray::Offset( const sal_Int32* pIdx )
{
sal_uInt32 nPos = 0;
for( const auto& rDimension : m_vDimensions )
@@ -480,22 +480,22 @@ sal_uInt32 SbxDimArray::Offset32( const sal_Int32* pIdx )
return nPos;
}
-SbxVariable* SbxDimArray::Get32( const sal_Int32* pIdx )
+SbxVariable* SbxDimArray::Get( const sal_Int32* pIdx )
{
- return SbxArray::Get32( Offset32( pIdx ) );
+ return SbxArray::Get( Offset( pIdx ) );
}
-void SbxDimArray::Put32( SbxVariable* p, const sal_Int32* pIdx )
+void SbxDimArray::Put( SbxVariable* p, const sal_Int32* pIdx )
{
- SbxArray::Put32( p, Offset32( pIdx ) );
+ SbxArray::Put( p, Offset( pIdx ) );
}
// Element-Number with the help of Parameter-Array
-sal_uInt32 SbxDimArray::Offset32( SbxArray* pPar )
+sal_uInt32 SbxDimArray::Offset( SbxArray* pPar )
{
#if HAVE_FEATURE_SCRIPTING
if (m_vDimensions.empty() || !pPar ||
- ((m_vDimensions.size() != sal::static_int_cast<size_t>(pPar->Count32() - 1))
+ ((m_vDimensions.size() != sal::static_int_cast<size_t>(pPar->Count() - 1))
&& SbiRuntime::isVBAEnabled()))
{
SetError( ERRCODE_BASIC_OUT_OF_RANGE );
@@ -506,7 +506,7 @@ sal_uInt32 SbxDimArray::Offset32( SbxArray* pPar )
sal_uInt32 nOff = 1; // Non element 0!
for (auto const& vDimension : m_vDimensions)
{
- sal_Int32 nIdx = pPar->Get32( nOff++ )->GetLong();
+ sal_Int32 nIdx = pPar->Get( nOff++ )->GetLong();
if( nIdx < vDimension.nLbound || nIdx > vDimension.nUbound )
{
nPos = sal_uInt32(SBX_MAXINDEX32)+1;
@@ -526,7 +526,7 @@ sal_uInt32 SbxDimArray::Offset32( SbxArray* pPar )
SbxVariable* SbxDimArray::Get( SbxArray* pPar )
{
- return SbxArray::Get32( Offset32( pPar ) );
+ return SbxArray::Get( Offset( pPar ) );
}
bool SbxDimArray::LoadData( SvStream& rStrm, sal_uInt16 nVer )
@@ -537,7 +537,7 @@ bool SbxDimArray::LoadData( SvStream& rStrm, sal_uInt16 nVer )
{
sal_Int16 lb(0), ub(0);
rStrm.ReadInt16( lb ).ReadInt16( ub );
- AddDim32( lb, ub );
+ AddDim( lb, ub );
}
return SbxArray::LoadData( rStrm, nVer );
}
@@ -549,7 +549,7 @@ bool SbxDimArray::StoreData( SvStream& rStrm ) const
for( sal_Int32 i = 1; i <= static_cast<sal_Int32>(m_vDimensions.size()); i++ )
{
sal_Int32 lb32, ub32;
- GetDim32(i, lb32, ub32);
+ GetDim(i, lb32, ub32);
assert(lb32 >= -SBX_MAXINDEX && ub32 <= SBX_MAXINDEX);
rStrm.WriteInt16(lb32).WriteInt16(ub32);
}
diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx
index 7c186b4767aa..ea4eb4cdea14 100644
--- a/basic/source/sbx/sbxcoll.cxx
+++ b/basic/source/sbx/sbxcoll.cxx
@@ -120,7 +120,7 @@ void SbxCollection::Notify( SfxBroadcaster& rCst, const SfxHint& rHint )
else if( pVar->GetHashCode() == nCountHash
&& aVarName.equalsIgnoreAsciiCase( pCount ) )
{
- pVar->PutLong( sal::static_int_cast<sal_Int32>(pObjs->Count32()) );
+ pVar->PutLong(sal::static_int_cast<sal_Int32>(pObjs->Count()));
}
else if( pVar->GetHashCode() == nAddHash
&& aVarName.equalsIgnoreAsciiCase( pAdd ) )
@@ -151,13 +151,13 @@ void SbxCollection::Notify( SfxBroadcaster& rCst, const SfxHint& rHint )
void SbxCollection::CollAdd( SbxArray* pPar_ )
{
- if( pPar_->Count32() != 2 )
+ if (pPar_->Count() != 2)
{
SetError( ERRCODE_BASIC_WRONG_ARGS );
}
else
{
- SbxBase* pObj = pPar_->Get32( 1 )->GetObject();
+ SbxBase* pObj = pPar_->Get(1)->GetObject();
if( !pObj || dynamic_cast<const SbxObject*>(pObj) == nullptr )
{
SetError( ERRCODE_BASIC_BAD_ARGUMENT );
@@ -173,14 +173,14 @@ void SbxCollection::CollAdd( SbxArray* pPar_ )
void SbxCollection::CollItem( SbxArray* pPar_ )
{
- if( pPar_->Count32() != 2 )
+ if (pPar_->Count() != 2)
{
SetError( ERRCODE_BASIC_WRONG_ARGS );
}
else
{
SbxVariable* pRes = nullptr;
- SbxVariable* p = pPar_->Get32( 1 );
+ SbxVariable* p = pPar_->Get(1);
if( p->GetType() == SbxSTRING )
{
pRes = Find( p->GetOUString(), SbxClassType::Object );
@@ -188,16 +188,16 @@ void SbxCollection::CollItem( SbxArray* pPar_ )
else
{
short n = p->GetInteger();
- if( n >= 1 && n <= static_cast<sal_Int32>(pObjs->Count32()) )
+ if (n >= 1 && n <= static_cast<sal_Int32>(pObjs->Count()))
{
- pRes = pObjs->Get32( static_cast<sal_uInt32>(n) - 1 );
+ pRes = pObjs->Get(static_cast<sal_uInt32>(n) - 1);
}
}
if( !pRes )
{
SetError( ERRCODE_BASIC_BAD_INDEX );
}
- pPar_->Get32( 0 )->PutObject( pRes );
+ pPar_->Get(0)->PutObject(pRes);
}
}
@@ -205,15 +205,15 @@ void SbxCollection::CollItem( SbxArray* pPar_ )
void SbxCollection::CollRemove( SbxArray* pPar_ )
{
- if( pPar_->Count32() != 2 )
+ if (pPar_->Count() != 2)
SetError( ERRCODE_BASIC_WRONG_ARGS );
else
{
- short n = pPar_->Get32( 1 )->GetInteger();
- if( n < 1 || n > static_cast<sal_Int32>(pObjs->Count32()) )
+ short n = pPar_->Get(1)->GetInteger();
+ if (n < 1 || n > static_cast<sal_Int32>(pObjs->Count()))
SetError( ERRCODE_BASIC_BAD_INDEX );
else
- Remove( pObjs->Get32( static_cast<sal_uInt32>(n) - 1 ) );
+ Remove(pObjs->Get(static_cast<sal_uInt32>(n) - 1));
}
}
diff --git a/basic/source/sbx/sbxexec.cxx b/basic/source/sbx/sbxexec.cxx
index 63f54b19d119..d830061f071d 100644
--- a/basic/source/sbx/sbxexec.cxx
+++ b/basic/source/sbx/sbxexec.cxx
@@ -310,7 +310,7 @@ static SbxVariableRef Element
// One copies the parameter, so that
// one have the current status (triggers also
// the call per access)
- refPar->Put32( new SbxVariable( *refArg ), ++nArg );
+ refPar->Put(new SbxVariable(*refArg), ++nArg);
}
p = SkipWhitespace( p );
if( *p == ',' )
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 58056dd39acd..6beae9ac7ffe 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -84,9 +84,9 @@ SbxObject& SbxObject::operator=( const SbxObject& r )
static void CheckParentsOnDelete( SbxObject* pObj, SbxArray* p )
{
- for( sal_uInt32 i = 0; i < p->Count32(); i++ )
+ for (sal_uInt32 i = 0; i < p->Count(); i++)
{
- SbxVariableRef& rRef = p->GetRef32( i );
+ SbxVariableRef& rRef = p->GetRef(i);
if( rRef->IsBroadcaster() )
{
pObj->EndListening( rRef->GetBroadcaster(), true );
@@ -317,15 +317,15 @@ SbxArray* SbxObject::FindVar( SbxVariable const * pVar, sal_uInt32& nArrayIdx )
}
if( pArray )
{
- nArrayIdx = pArray->Count32();
+ nArrayIdx = pArray->Count();
// Is the variable per name available?
pArray->ResetFlag( SbxFlagBits::ExtSearch );
SbxVariable* pOld = pArray->Find( pVar->GetName(), pVar->GetClass() );
if( pOld )
{
- for( sal_uInt32 i = 0; i < pArray->Count32(); i++ )
+ for (sal_uInt32 i = 0; i < pArray->Count(); i++)
{
- SbxVariableRef& rRef = pArray->GetRef32( i );
+ SbxVariableRef& rRef = pArray->GetRef(i);
if( rRef.get() == pOld )
{
nArrayIdx = i; break;
@@ -381,7 +381,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp
break;
}
pVar->SetParent( this );
- pArray->Put32( pVar, pArray->Count32() );
+ pArray->Put(pVar, pArray->Count());
SetModified( true );
// The object listen always
StartListening(pVar->GetBroadcaster(), DuplicateHandling::Prevent);
@@ -396,17 +396,17 @@ void SbxObject::Insert( SbxVariable* pVar )
return;
// Into with it. But you should pay attention at the Pointer!
- if( nIdx < pArray->Count32() )
+ if (nIdx < pArray->Count())
{
// Then this element exists already
// There are objects of the same name allowed at collections
if( pArray == pObjs.get() && dynamic_cast<const SbxCollection*>( this ) != nullptr )
{
- nIdx = pArray->Count32();
+ nIdx = pArray->Count();
}
else
{
- SbxVariable* pOld = pArray->Get32( nIdx );
+ SbxVariable* pOld = pArray->Get(nIdx);
// already inside: overwrite
if( pOld == pVar )
{
@@ -423,7 +423,7 @@ void SbxObject::Insert( SbxVariable* pVar )
}
}
StartListening(pVar->GetBroadcaster(), DuplicateHandling::Prevent);
- pArray->Put32( pVar, nIdx );
+ pArray->Put(pVar, nIdx);
if( pVar->GetParent() != this )
{
pVar->SetParent( this );
@@ -467,7 +467,7 @@ void SbxObject::QuickInsert( SbxVariable* pVar )
return;
StartListening(pVar->GetBroadcaster(), DuplicateHandling::Prevent);
- pArray->Put32( pVar, pArray->Count32() );
+ pArray->Put(pVar, pArray->Count());
if( pVar->GetParent() != this )
{
pVar->SetParent( this );
@@ -500,7 +500,7 @@ void SbxObject::Remove( SbxVariable* pVar )
{
sal_uInt32 nIdx;
SbxArray* pArray = FindVar( pVar, nIdx );
- if( !(pArray && nIdx < pArray->Count32()) )
+ if (!(pArray && nIdx < pArray->Count()))
return;
#ifdef DBG_UTIL
@@ -513,7 +513,7 @@ void SbxObject::Remove( SbxVariable* pVar )
"basic.sbx",
"remove " << aVarName << " in " << SbxVariable::GetName());
#endif
- SbxVariableRef pVar_ = pArray->Get32( nIdx );
+ SbxVariableRef pVar_ = pArray->Get(nIdx);
if( pVar_->IsBroadcaster() )
{
EndListening( pVar_->GetBroadcaster(), true );
@@ -537,9 +537,9 @@ static bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray )
{
return false;
}
- for( sal_uInt32 i = 0; i < p->Count32(); i++ )
+ for (sal_uInt32 i = 0; i < p->Count(); i++)
{
- SbxVariableRef& r = p->GetRef32( i );
+ SbxVariableRef& r = p->GetRef(i);
SbxVariable* pVar = r.get();
if( pVar )
{
@@ -727,9 +727,9 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill )
// Methods
rStrm.WriteOString( aIndentNameStr ).WriteCharPtr( "- Methods:" ) << endl;
- for( sal_uInt32 i = 0; i < pMethods->Count32(); i++ )
+ for (sal_uInt32 i = 0; i < pMethods->Count(); i++)
{
- SbxVariableRef& r = pMethods->GetRef32( i );
+ SbxVariableRef& r = pMethods->GetRef(i);
SbxVariable* pVar = r.get();
if( pVar )
{
@@ -764,9 +764,9 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill )
// Properties
rStrm.WriteOString( aIndentNameStr ).WriteCharPtr( "- Properties:" ) << endl;
{
- for( sal_uInt32 i = 0; i < pProps->Count32(); i++ )
+ for (sal_uInt32 i = 0; i < pProps->Count(); i++)
{
- SbxVariableRef& r = pProps->GetRef32( i );
+ SbxVariableRef& r = pProps->GetRef(i);
SbxVariable* pVar = r.get();
if( pVar )
{
@@ -802,9 +802,9 @@ void SbxObject::Dump( SvStream& rStrm, bool bFill )
// Objects
rStrm.WriteOString( aIndentNameStr ).WriteCharPtr( "- Objects:" ) << endl;
{
- for( sal_uInt32 i = 0; i < pObjs->Count32(); i++ )
+ for (sal_uInt32 i = 0; i < pObjs->Count(); i++)
{
- SbxVariableRef& r = pObjs->GetRef32( i );
+ SbxVariableRef& r = pObjs->GetRef(i);
SbxVariable* pVar = r.get();
if ( pVar )
{
diff --git a/basic/source/sbx/sbxstr.cxx b/basic/source/sbx/sbxstr.cxx
index 19504ff597d1..0c6fc19d514b 100644
--- a/basic/source/sbx/sbxstr.cxx
+++ b/basic/source/sbx/sbxstr.cxx
@@ -276,13 +276,13 @@ SbxArray* StringToByteArray(const OUString& rStr)
bool bIncIndex = IsBaseIndexOne();
#endif
if( bIncIndex )
- pArray->AddDim32( 1, nArraySize );
+ pArray->AddDim(1, nArraySize);
else
- pArray->AddDim32( 0, nArraySize-1 );
+ pArray->AddDim(0, nArraySize - 1);
}
else
{
- pArray->unoAddDim32( 0, -1 );
+ pArray->unoAddDim(0, -1);
}
for( sal_Int32 i=0; i< nArraySize; i++)
@@ -291,7 +291,7 @@ SbxArray* StringToByteArray(const OUString& rStr)
sal_uInt8 aByte = static_cast< sal_uInt8 >( (i%2) ? ((*pSrc) >> 8) & 0xff : (*pSrc) & 0xff );
pNew->PutByte( aByte );
pNew->SetFlag( SbxFlagBits::Write );
- pArray->Put32( pNew, i );
+ pArray->Put(pNew, i);
if( i%2 )
pSrc++;
}
@@ -301,12 +301,12 @@ SbxArray* StringToByteArray(const OUString& rStr)
// Convert an array of bytes to string (2bytes per character)
OUString ByteArrayToString(SbxArray* pArr)
{
- sal_uInt32 nCount = pArr->Count32();
+ sal_uInt32 nCount = pArr->Count();
OUStringBuffer aStrBuf;
sal_Unicode aChar = 0;
for( sal_uInt32 i = 0 ; i < nCount ; i++ )
{
- sal_Unicode aTempChar = pArr->Get32(i)->GetByte();
+ sal_Unicode aTempChar = pArr->Get(i)->GetByte();
if( i%2 )
{
aChar = (aTempChar << 8 ) | aChar;
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 19ddc1aa2a64..403a7f842554 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -247,7 +247,7 @@ SbxValue* SbxValue::TheRealValue( bool bObjInObjError ) const
if( pDimArray )
p = pDimArray->Get( pPar );
else
- p = pArray->Get32( pPar->Get32( 1 )->GetInteger() );
+ p = pArray->Get(pPar->Get(1)->GetInteger());
break;
}
}
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index a79a617af3dd..77da97900f6c 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -146,7 +146,7 @@ void SbxVariable::Broadcast( SfxHintId nHintId )
if( mpPar.is() )
{
// Register this as element 0, but don't change over the parent!
- mpPar->GetRef32( 0 ) = this;
+ mpPar->GetRef(0) = this;
}
pSave->Broadcast( SbxHint( nHintId, this ) );
mpBroadcaster = std::move(pSave);
@@ -340,9 +340,9 @@ void SbxVariable::SetParent( SbxObject* p )
SbxArray *pChildren = p->GetObjects();
if ( pChildren )
{
- for ( sal_uInt32 nIdx = 0; !bFound && nIdx < pChildren->Count32(); ++nIdx )
+ for (sal_uInt32 nIdx = 0; !bFound && nIdx < pChildren->Count(); ++nIdx)
{
- bFound = ( this == pChildren->Get32(nIdx) );
+ bFound = (this == pChildren->Get(nIdx));
}
}
SAL_INFO_IF(
diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx
index 0390d421c9d1..4283f59a0f9e 100644
--- a/include/basic/sbx.hxx
+++ b/include/basic/sbx.hxx
@@ -114,17 +114,17 @@ public:
SbxArray( const SbxArray& ) = delete;
SbxArray& operator=( const SbxArray& );
virtual void Clear() override;
- sal_uInt32 Count32() const;
+ sal_uInt32 Count() const;
virtual SbxDataType GetType() const override;
- SbxVariableRef& GetRef32( sal_uInt32 );
- SbxVariable* Get32( sal_uInt32 );
- void Put32( SbxVariable*, sal_uInt32 );
- void Insert32( SbxVariable*, sal_uInt32 );
+ SbxVariableRef& GetRef(sal_uInt32);
+ SbxVariable* Get(sal_uInt32);
+ void Put(SbxVariable*, sal_uInt32);
+ void Insert(SbxVariable*, sal_uInt32);
void Remove( sal_uInt32 );
void Remove( SbxVariable const * );
void Merge( SbxArray* );
- OUString GetAlias32( sal_uInt32 );
- void PutAlias32( const OUString&, sal_uInt32 );
+ OUString GetAlias(sal_uInt32);
+ void PutAlias(const OUString&, sal_uInt32);
SbxVariable* Find( const OUString&, SbxClassType );
};
@@ -137,11 +137,11 @@ struct SbxDim { // an array-dimension:
class BASIC_DLLPUBLIC SbxDimArray final : public SbxArray
{
std::vector<SbxDim> m_vDimensions; // Dimension table
- BASIC_DLLPRIVATE void AddDimImpl32( sal_Int32, sal_Int32, bool bAllowSize0 );
+ BASIC_DLLPRIVATE void AddDimImpl(sal_Int32, sal_Int32, bool bAllowSize0);
bool mbHasFixedSize;
- sal_uInt32 Offset32( const sal_Int32* );
- sal_uInt32 Offset32( SbxArray* );
+ sal_uInt32 Offset(const sal_Int32*);
+ sal_uInt32 Offset(SbxArray*);
virtual bool LoadData( SvStream&, sal_uInt16 ) override;
virtual bool StoreData( SvStream& ) const override;
virtual ~SbxDimArray() override;
@@ -153,15 +153,15 @@ public:
virtual void Clear() override;
SbxVariable* Get( SbxArray* );
- using SbxArray::GetRef32;
- using SbxArray::Get32;
- SbxVariable* Get32( const sal_Int32* );
- using SbxArray::Put32;
- void Put32( SbxVariable*, const sal_Int32* );
- sal_Int32 GetDims32() const { return m_vDimensions.size(); }
- void AddDim32( sal_Int32, sal_Int32 );
- void unoAddDim32( sal_Int32, sal_Int32 );
- bool GetDim32( sal_Int32, sal_Int32&, sal_Int32& ) const;
+ using SbxArray::GetRef;
+ using SbxArray::Get;
+ SbxVariable* Get(const sal_Int32*);
+ using SbxArray::Put;
+ void Put(SbxVariable*, const sal_Int32*);
+ sal_Int32 GetDims() const { return m_vDimensions.size(); }
+ void AddDim(sal_Int32, sal_Int32);
+ void unoAddDim(sal_Int32, sal_Int32);
+ bool GetDim(sal_Int32, sal_Int32&, sal_Int32&) const;
bool hasFixedSize() const { return mbHasFixedSize; };
void setHasFixedSize( bool bHasFixedSize ) {mbHasFixedSize = bHasFixedSize; };
};
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 0a79b37612d8..d467db7ccf0f 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -326,13 +326,13 @@ bool ScValidationData::DoMacro( const ScAddress& rPos, const OUString& rInput,
aValStr = pCell->GetString().getString();
}
if ( bIsValue )
- refPar->Get32(1)->PutDouble( nValue );
+ refPar->Get(1)->PutDouble(nValue);
else
- refPar->Get32(1)->PutString( aValStr );
+ refPar->Get(1)->PutString(aValStr);
// 2) Position of the cell
OUString aPosStr(rPos.Format(ScRefFlags::VALID | ScRefFlags::TAB_3D, pDocument, pDocument->GetAddressConvention()));
- refPar->Get32(2)->PutString( aPosStr );
+ refPar->Get(2)->PutString(aPosStr);
// use link-update flag to prevent closing the document
// while the macro is running
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 08c1c218748d..593165275288 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3264,7 +3264,7 @@ void ScInterpreter::ScMacro()
bool bOk = true;
for( sal_uInt32 i = nParamCount; i && bOk ; i-- )
{
- SbxVariable* pPar = refPar->Get32(i);
+ SbxVariable* pPar = refPar->Get(i);
switch( GetStackType() )
{
case svDouble:
@@ -3332,8 +3332,8 @@ void ScInterpreter::ScMacro()
else
{
SbxDimArrayRef refArray = new SbxDimArray;
- refArray->AddDim32( 1, nRow2 - nRow1 + 1 );
- refArray->AddDim32( 1, nCol2 - nCol1 + 1 );
+ refArray->AddDim(1, nRow2 - nRow1 + 1);
+ refArray->AddDim(1, nCol2 - nCol1 + 1);
ScAddress aAdr( nCol1, nRow1, nTab1 );
for( SCROW nRow = nRow1; bOk && nRow <= nRow2; nRow++ )
{
@@ -3344,7 +3344,7 @@ void ScInterpreter::ScMacro()
{
aAdr.SetCol( nCol );
nIdx[ 1 ] = nCol-nCol1+1;
- SbxVariable* p = refArray->Get32( nIdx );
+ SbxVariable* p = refArray->Get(nIdx);
bOk = SetSbxVariable( p, aAdr );
}
}
@@ -3362,8 +3362,8 @@ void ScInterpreter::ScMacro()
{
pMat->GetDimensions(nC, nR);
SbxDimArrayRef refArray = new SbxDimArray;
- refArray->AddDim32( 1, static_cast<sal_Int32>(nR) );
- refArray->AddDim32( 1, static_cast<sal_Int32>(nC) );
+ refArray->AddDim(1, static_cast<sal_Int32>(nR));
+ refArray->AddDim(1, static_cast<sal_Int32>(nC));
for( SCSIZE nMatRow = 0; nMatRow < nR; nMatRow++ )
{
sal_Int32 nIdx[ 2 ];
@@ -3371,7 +3371,7 @@ void ScInterpreter::ScMacro()
for( SCSIZE nMatCol = 0; nMatCol < nC; nMatCol++ )
{
nIdx[ 1 ] = static_cast<sal_Int32>(nMatCol+1);
- SbxVariable* p = refArray->Get32( nIdx );
+ SbxVariable* p = refArray->Get(nIdx);
if (pMat->IsStringOrEmpty(nMatCol, nMatRow))
{
p->PutString( pMat->GetString(nMatCol, nMatRow).getString() );
@@ -3441,7 +3441,7 @@ void ScInterpreter::ScMacro()
{
SbxBase* pElemObj = refRes->GetObject();
SbxDimArray* pDimArray = dynamic_cast<SbxDimArray*>(pElemObj);
- sal_Int32 nDim = pDimArray ? pDimArray->GetDims32() : 0;
+ sal_Int32 nDim = pDimArray ? pDimArray->GetDims() : 0;
if ( 1 <= nDim && nDim <= 2 )
{
sal_Int32 nCs, nCe, nRs;
@@ -3450,7 +3450,7 @@ void ScInterpreter::ScMacro()
SCROW nRowIdx;
if ( nDim == 1 )
{ // array( cols ) one line, several columns
- pDimArray->GetDim32( 1, nCs, nCe );
+ pDimArray->GetDim(1, nCs, nCe);
nC = static_cast<SCSIZE>(nCe - nCs + 1);
nRs = 0;
nR = 1;
@@ -3460,9 +3460,9 @@ void ScInterpreter::ScMacro()
else
{ // array( rows, cols )
sal_Int32 nRe;
- pDimArray->GetDim32( 1, nRs, nRe );
+ pDimArray->GetDim(1, nRs, nRe);
nR = static_cast<SCSIZE>(nRe - nRs + 1);
- pDimArray->GetDim32( 2, nCs, nCe );
+ pDimArray->GetDim(2, nCs, nCe);
nC = static_cast<SCSIZE>(nCe - nCs + 1);
nColIdx = 1;
nRowIdx = 0;
@@ -3480,7 +3480,7 @@ void ScInterpreter::ScMacro()
for ( SCSIZE i=0; i < nC; i++ )
{
nIdx[ nColIdx ] = nCs + static_cast<sal_Int32>(i);
- pV = pDimArray->Get32( nIdx );
+ pV = pDimArray->Get(nIdx);
if ( lcl_isNumericResult( fVal, pV) )
{
pMat->PutDouble( fVal, i, j );
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 4d94fe494478..7c6e56dbf529 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -519,7 +519,7 @@ ScVbaApplication::wait( double time )
SbxArrayRef aArgs = new SbxArray;
SbxVariableRef aRef = new SbxVariable;
aRef->PutDouble( time );
- aArgs->Put32( aRef.get(), 1 );
+ aArgs->Put(aRef.get(), 1);
SbMethod* pMeth = static_cast<SbMethod*>(pBasic->GetRtl()->Find( "WaitUntil", SbxClassType::Method ));
if ( pMeth )
diff --git a/scripting/source/basprov/basmodnode.cxx b/scripting/source/basprov/basmodnode.cxx
index b5c3cf1a08e4..58d3ec65728d 100644
--- a/scripting/source/basprov/basmodnode.cxx
+++ b/scripting/source/basprov/basmodnode.cxx
@@ -80,11 +80,11 @@ namespace basprov
SbxArray* pMethods = m_pModule->GetMethods().get();
if ( pMethods )
{
- sal_uInt32 nCount = pMethods->Count32();
+ sal_uInt32 nCount = pMethods->Count();
sal_Int32 nRealCount = 0;
for ( sal_uInt32 i = 0; i < nCount; ++i )
{
- SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Get32( i ) );
+ SbMethod* pMethod = static_cast<SbMethod*>(pMethods->Get(i));
if ( pMethod && !pMethod->IsHidden() )
++nRealCount;
}
@@ -94,7 +94,7 @@ namespace basprov
sal_Int32 iTarget = 0;
for ( sal_uInt32 i = 0; i < nCount; ++i )
{
- SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Get32( i ) );
+ SbMethod* pMethod = static_cast<SbMethod*>(pMethods->Get(i));
if ( pMethod && !pMethod->IsHidden() )
pChildNodes[iTarget++] = new BasicMethodNodeImpl(
m_xContext, m_sScriptingContext, pMethod, m_bIsAppScript);
@@ -114,7 +114,7 @@ namespace basprov
if ( m_pModule )
{
SbxArray* pMethods = m_pModule->GetMethods().get();
- if ( pMethods && pMethods->Count32() > 0 )
+ if (pMethods && pMethods->Count() > 0)
bReturn = true;
}
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index 4d6f2477ed92..a22cd82f343e 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -203,7 +203,7 @@ namespace basprov
{
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);
if (pInfo)
{
@@ -268,13 +268,13 @@ namespace basprov
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(nCount <= 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;
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index e0d62e645644..723cd0881f74 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -40,7 +40,7 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs )
{
Sequence<Any> *pRet = nullptr;
- sal_uInt32 nCount = rArgs.Count32();
+ sal_uInt32 nCount = rArgs.Count();
if( nCount > 1 )
{
nCount--;
@@ -48,7 +48,7 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs )
Any *pUnoArgs = pRet->getArray();
for( sal_uInt32 i=0; i<nCount; i++ )
{
- SbxVariable *pVar = rArgs.Get32( i+1 );
+ SbxVariable* pVar = rArgs.Get(i + 1);
switch( pVar->GetType() )
{
case SbxSTRING:
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 9cdd4c9236af..05595d9a23ff 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -1561,14 +1561,14 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
SbxArrayRef xArgs = new SbxArray;
SbxVariableRef xVar = new SbxVariable;
xVar->PutString( pFlyFormat->GetName() );
- xArgs->Put32( xVar.get(), 1 );
+ xArgs->Put(xVar.get(), 1);
xVar = new SbxVariable;
if( SvMacroItemId::SwFrmKeyInputAlpha == nEvent )
xVar->PutChar( aCh );
else
xVar->PutUShort( rKeyCode.GetModifier() | rKeyCode.GetCode() );
- xArgs->Put32( xVar.get(), 2 );
+ xArgs->Put(xVar.get(), 2);
OUString sRet;
rSh.ExecMacro( *pMacro, &sRet, xArgs.get() );
@@ -4208,21 +4208,21 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
SbxArrayRef xArgs = new SbxArray;
SbxVariableRef xVar = new SbxVariable;
xVar->PutString( pFlyFormat->GetName() );
- xArgs->Put32( xVar.get(), ++nPos );
+ xArgs->Put(xVar.get(), ++nPos);
if( SvMacroItemId::SwFrmResize == nEvent )
{
xVar = new SbxVariable;
xVar->PutUShort( static_cast< sal_uInt16 >(g_eSdrMoveHdl) );
- xArgs->Put32( xVar.get(), ++nPos );
+ xArgs->Put(xVar.get(), ++nPos);
}
xVar = new SbxVariable;
xVar->PutLong( aDocPt.X() - aSttPt.X() );
- xArgs->Put32( xVar.get(), ++nPos );
+ xArgs->Put(xVar.get(), ++nPos);
xVar = new SbxVariable;
xVar->PutLong( aDocPt.Y() - aSttPt.Y() );
- xArgs->Put32( xVar.get(), ++nPos );
+ xArgs->Put(xVar.get(), ++nPos);
OUString sRet;
@@ -4668,25 +4668,25 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
SbxArrayRef xArgs = new SbxArray;
SbxVariableRef xVar = new SbxVariable;
xVar->PutString( pFlyFormat->GetName() );
- xArgs->Put32( xVar.get(), ++nPos );
+ xArgs->Put(xVar.get(), ++nPos);
if( SvMacroItemId::SwFrmResize == nEvent )
{
xVar = new SbxVariable;
xVar->PutUShort( static_cast< sal_uInt16 >(eOldSdrMoveHdl) );
- xArgs->Put32( xVar.get(), ++nPos );
+ xArgs->Put(xVar.get(), ++nPos);
}
xVar = new SbxVariable;
xVar->PutLong( aDocPt.X() - aSttPt.X() );
- xArgs->Put32( xVar.get(), ++nPos );
+ xArgs->Put(xVar.get(), ++nPos);
xVar = new SbxVariable;
xVar->PutLong( aDocPt.Y() - aSttPt.Y() );
- xArgs->Put32( xVar.get(), ++nPos );
+ xArgs->Put(xVar.get(), ++nPos);
xVar = new SbxVariable;
xVar->PutUShort( 1 );
- xArgs->Put32( xVar.get(), ++nPos );
+ xArgs->Put(xVar.get(), ++nPos);
ReleaseMouse();