diff options
author | Jacek Fraczek <fraczek.jacek@gmail.com> | 2016-10-05 22:00:51 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-10 08:48:30 +0000 |
commit | f004aa99514d385f3ee254bba735f5eaeb7d9ad8 (patch) | |
tree | aacd5792f553b8e9cbf029cc7e0797ed0dd423fe /basic/source/runtime/methods.cxx | |
parent | 728c7327bd97602a38723553ed044ea4c01d13b2 (diff) |
tdf#89307: Removed SvRef::operator T*()
Conditional statements are using SvRef::Is() method.
Changed static_cast<T*>(svRef<T>) occurances to svRef.get().
Added operator == and != to SvRef.
SbxObject::Execute is using SbxVariableRef internally.
SbxObject::FindQualified is using SbxVariableRef internally.
Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395
Reviewed-on: https://gerrit.libreoffice.org/29621
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basic/source/runtime/methods.cxx')
-rw-r--r-- | basic/source/runtime/methods.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 5d0da4276806..335c99a77287 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -185,13 +185,13 @@ RTLFUNC(CreateObject) OUString aClass( rPar.Get( 1 )->GetOUString() ); SbxObjectRef p = SbxBase::CreateObject( aClass ); - if( !p ) + if( !p.Is() ) StarBASIC::Error( ERRCODE_BASIC_CANNOT_LOAD ); else { // Convenience: enter BASIC as parent p->SetParent( pBasic ); - rPar.Get( 0 )->PutObject( p ); + rPar.Get( 0 )->PutObject( p.get() ); } } @@ -633,8 +633,8 @@ RTLFUNC(MkDir) SbxArrayRef pPar = new SbxArray(); SbxVariableRef pResult = new SbxVariable(); SbxVariableRef pParam = new SbxVariable(); - pPar->Insert( pResult, pPar->Count() ); - pPar->Insert( pParam, pPar->Count() ); + pPar->Insert( pResult.get(), pPar->Count() ); + pPar->Insert( pParam.get(), pPar->Count() ); SbRtl_CurDir( pBasic, *pPar, bWrite ); rtl::OUString sCurPathURL; @@ -1461,7 +1461,7 @@ RTLFUNC(RTL) (void)pBasic; (void)bWrite; - rPar.Get( 0 )->PutObject( pBasic->getRTL() ); + rPar.Get( 0 )->PutObject( pBasic->getRTL().get() ); } RTLFUNC(RTrim) @@ -4474,8 +4474,8 @@ RTLFUNC(LoadPicture) Graphic aGraphic(aBmp); SbxObjectRef xRef = new SbStdPicture; - static_cast<SbStdPicture*>(static_cast<SbxObject*>(xRef))->SetGraphic( aGraphic ); - rPar.Get(0)->PutObject( xRef ); + static_cast<SbStdPicture*>(xRef.get())->SetGraphic( aGraphic ); + rPar.Get(0)->PutObject( xRef.get() ); } } |