diff options
Diffstat (limited to 'basic/source/sbx/sbxobj.cxx')
-rw-r--r-- | basic/source/sbx/sbxobj.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index 6beae9ac7ffe..7f3560a62003 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -364,7 +364,7 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp return pRes; } } - SbxVariable* pVar = nullptr; + SbxVariableRef pVar; switch( ct ) { case SbxClassType::Variable: @@ -375,17 +375,17 @@ SbxVariable* SbxObject::Make( const OUString& rName, SbxClassType ct, SbxDataTyp pVar = new SbxMethod( rName, dt, bIsRuntimeFunction ); break; case SbxClassType::Object: - pVar = CreateObject( rName ); + pVar = CreateObject( rName ).get(); break; default: break; } pVar->SetParent( this ); - pArray->Put(pVar, pArray->Count()); + pArray->Put(pVar.get(), pArray->Count()); SetModified( true ); // The object listen always StartListening(pVar->GetBroadcaster(), DuplicateHandling::Prevent); - return pVar; + return pVar.get(); } void SbxObject::Insert( SbxVariable* pVar ) @@ -532,7 +532,7 @@ void SbxObject::Remove( SbxVariable* pVar ) static bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray ) { - SbxArrayRef p = static_cast<SbxArray*>( SbxBase::Load( rStrm ) ); + SbxArrayRef p = static_cast<SbxArray*>( SbxBase::Load( rStrm ).get() ); if( !p.is() ) { return false; |