summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/basprov/basmodnode.cxx12
-rw-r--r--scripting/source/basprov/basscript.cxx9
2 files changed, 11 insertions, 10 deletions
diff --git a/scripting/source/basprov/basmodnode.cxx b/scripting/source/basprov/basmodnode.cxx
index 684d5b1c67b1..485b66bd0fa7 100644
--- a/scripting/source/basprov/basmodnode.cxx
+++ b/scripting/source/basprov/basmodnode.cxx
@@ -81,11 +81,11 @@ namespace basprov
SbxArray* pMethods = m_pModule->GetMethods().get();
if ( pMethods )
{
- sal_Int32 nCount = pMethods->Count();
+ sal_uInt32 nCount = pMethods->Count32();
sal_Int32 nRealCount = 0;
- for ( sal_Int32 i = 0; i < nCount; ++i )
+ for ( sal_uInt32 i = 0; i < nCount; ++i )
{
- SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Get( static_cast< sal_uInt16 >( i ) ) );
+ SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Get32( i ) );
if ( pMethod && !pMethod->IsHidden() )
++nRealCount;
}
@@ -93,9 +93,9 @@ namespace basprov
Reference< browse::XBrowseNode >* pChildNodes = aChildNodes.getArray();
sal_Int32 iTarget = 0;
- for ( sal_Int32 i = 0; i < nCount; ++i )
+ for ( sal_uInt32 i = 0; i < nCount; ++i )
{
- SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Get( static_cast< sal_uInt16 >( i ) ) );
+ SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Get32( i ) );
if ( pMethod && !pMethod->IsHidden() )
pChildNodes[iTarget++] = new BasicMethodNodeImpl(
m_xContext, m_sScriptingContext, pMethod, m_bIsAppScript);
@@ -115,7 +115,7 @@ namespace basprov
if ( m_pModule )
{
SbxArray* pMethods = m_pModule->GetMethods().get();
- if ( pMethods && pMethods->Count() > 0 )
+ if ( pMethods && pMethods->Count32() > 0 )
bReturn = true;
}
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index 067765a574e6..0f7a5ec6cc2a 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -205,7 +205,7 @@ namespace basprov
{
SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT );
unoToSbxValue( xSbxVar.get(), pParams[i] );
- xSbxParams->Put( xSbxVar.get(), static_cast< sal_uInt16 >( i ) + 1 );
+ xSbxParams->Put32( xSbxVar.get(), static_cast< sal_uInt32 >( i ) + 1 );
// Enable passing by ref
if ( xSbxVar->GetType() != SbxVARIANT )
@@ -248,12 +248,13 @@ namespace basprov
if ( pInfo_ )
{
OutParamMap aOutParamMap;
- for ( sal_uInt16 n = 1, nCount = xSbxParams->Count(); n < nCount; ++n )
+ for ( sal_uInt32 n = 1, nCount = xSbxParams->Count32(); n < nCount; ++n )
{
- const SbxParamInfo* pParamInfo = pInfo_->GetParam( 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->Get( n );
+ SbxVariable* pVar = xSbxParams->Get32( n );
if ( pVar )
{
SbxVariableRef xVar = pVar;