diff options
Diffstat (limited to 'sw/source/core/doc/docbasic.cxx')
-rw-r--r-- | sw/source/core/doc/docbasic.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx index 8c502cccf2ff..232c0b282908 100644 --- a/sw/source/core/doc/docbasic.cxx +++ b/sw/source/core/doc/docbasic.cxx @@ -60,7 +60,7 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs ) switch( pVar->GetType() ) { case SbxSTRING: - pUnoArgs[i] <<= OUString( pVar->GetString() ); + pUnoArgs[i] <<= OUString( pVar->GetOUString() ); break; case SbxCHAR: pUnoArgs[i] <<= (sal_Int16)pVar->GetChar() ; @@ -81,7 +81,7 @@ static Sequence<Any> *lcl_docbasic_convertArgs( SbxArray& rArgs ) return pRet; } -sal_Bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs ) +bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs ) { ErrCode eErr = 0; switch( rMacro.GetScriptType() ) @@ -97,8 +97,10 @@ sal_Bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs if( pRet && SbxNULL < pRetValue->GetType() && SbxVOID != pRetValue->GetType() ) + { // valid value, so set it - *pRet = pRetValue->GetString(); + *pRet = pRetValue->GetOUString(); + } } break; case JAVASCRIPT: @@ -141,7 +143,7 @@ sal_Bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent, - sal_Bool bCheckPtr, SbxArray* pArgs, const Link* ) + bool bCheckPtr, SbxArray* pArgs, const Link* ) { if( !pDocShell ) // we can't do that without a DocShell! return 0; @@ -159,7 +161,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve if( 0 != (pItem = GetAttrPool().GetItem2( RES_TXTATR_INETFMT, n ) ) && rCallEvent.PTR.pINetAttr == pItem ) { - bCheckPtr = sal_False; // misuse as a flag + bCheckPtr = false; // misuse as a flag break; } } @@ -174,7 +176,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve if( bCheckPtr ) { if ( GetSpzFrmFmts()->Contains( pFmt ) ) - bCheckPtr = sal_False; // misuse as a flag + bCheckPtr = false; // misuse as a flag } if( !bCheckPtr ) pTbl = &pFmt->GetMacro().GetMacroTable(); @@ -194,7 +196,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve for( sal_uInt16 nPos = pIMap->GetIMapObjectCount(); nPos; ) if( pIMapObj == pIMap->GetIMapObject( --nPos )) { - bCheckPtr = sal_False; // misuse as a flag + bCheckPtr = false; // misuse as a flag break; } } |