diff options
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/basprov/basmodnode.cxx | 4 | ||||
-rw-r--r-- | scripting/source/basprov/basscript.cxx | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/scripting/source/basprov/basmodnode.cxx b/scripting/source/basprov/basmodnode.cxx index a08def174eda..b1ee7d495790 100644 --- a/scripting/source/basprov/basmodnode.cxx +++ b/scripting/source/basprov/basmodnode.cxx @@ -79,7 +79,7 @@ namespace basprov if ( m_pModule ) { - SbxArray* pMethods = m_pModule->GetMethods(); + SbxArray* pMethods = m_pModule->GetMethods().get(); if ( pMethods ) { sal_Int32 nCount = pMethods->Count(); @@ -114,7 +114,7 @@ namespace basprov bool bReturn = false; if ( m_pModule ) { - SbxArray* pMethods = m_pModule->GetMethods(); + SbxArray* pMethods = m_pModule->GetMethods().get(); if ( pMethods && pMethods->Count() > 0 ) bReturn = true; } diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx index 37a2554ac955..6e71cfbd223b 100644 --- a/scripting/source/basprov/basscript.cxx +++ b/scripting/source/basprov/basscript.cxx @@ -163,7 +163,7 @@ namespace basprov Any aReturn; - if ( m_xMethod ) + if ( m_xMethod.Is() ) { // check if compiled SbModule* pModule = static_cast< SbModule* >( m_xMethod->GetParent() ); @@ -206,8 +206,8 @@ namespace basprov for ( sal_Int32 i = 0; i < nParamsCount; ++i ) { SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT ); - unoToSbxValue( static_cast< SbxVariable* >( xSbxVar ), pParams[i] ); - xSbxParams->Put( xSbxVar, static_cast< sal_uInt16 >( i ) + 1 ); + unoToSbxValue( xSbxVar.get(), pParams[i] ); + xSbxParams->Put( xSbxVar.get(), static_cast< sal_uInt16 >( i ) + 1 ); // Enable passing by ref if ( xSbxVar->GetType() != SbxVARIANT ) @@ -215,7 +215,7 @@ namespace basprov } } if ( xSbxParams.Is() ) - m_xMethod->SetParameters( xSbxParams ); + m_xMethod->SetParameters( xSbxParams.get() ); // call method SbxVariableRef xReturn = new SbxVariable; @@ -229,11 +229,11 @@ namespace basprov if ( m_caller.getLength() && m_caller[ 0 ].hasValue() ) { SbxVariableRef xCallerVar = new SbxVariable( SbxVARIANT ); - unoToSbxValue( static_cast< SbxVariable* >( xCallerVar ), m_caller[ 0 ] ); - nErr = m_xMethod->Call( xReturn, xCallerVar ); + unoToSbxValue( xCallerVar.get(), m_caller[ 0 ] ); + nErr = m_xMethod->Call( xReturn.get(), xCallerVar.get() ); } else - nErr = m_xMethod->Call( xReturn ); + nErr = m_xMethod->Call( xReturn.get() ); if ( m_documentBasicManager && m_xDocumentScriptContext.is() ) m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent ); @@ -259,7 +259,7 @@ namespace basprov if ( pVar ) { SbxVariableRef xVar = pVar; - aOutParamMap.insert( OutParamMap::value_type( n - 1, sbxToUnoValue( xVar ) ) ); + aOutParamMap.insert( OutParamMap::value_type( n - 1, sbxToUnoValue( xVar.get() ) ) ); } } } @@ -277,7 +277,7 @@ namespace basprov } // get return value - aReturn = sbxToUnoValue( xReturn ); + aReturn = sbxToUnoValue( xReturn.get() ); // reset parameters m_xMethod->SetParameters( nullptr ); |