diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-10 14:14:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-10 15:14:48 +0200 |
commit | 0afb2b63b38dff138e66f4ac8afed60911cb6aad (patch) | |
tree | 6f0d5e837600a460a57fce6383bc4eef10cdfc7a /basic/source/classes/sbunoobj.cxx | |
parent | b3541dea4889b9d0039554f87bd16e55189cf8b1 (diff) |
fix some leaks in basic
Change-Id: I52c10cdbe9661974c908ee052336c779a40de402
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115323
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/classes/sbunoobj.cxx')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 15c5e3778201..f4dbd35e3b6c 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2848,7 +2848,7 @@ Any SbUnoObject::getUnoAny() } // help method to create a Uno-Struct per CoreReflection -static SbUnoObject* Impl_CreateUnoStruct( const OUString& aClassName ) +static SbUnoObjectRef Impl_CreateUnoStruct( const OUString& aClassName ) { // get CoreReflection Reference< XIdlReflection > xCoreReflection = getCoreReflection_Impl(); @@ -2873,21 +2873,21 @@ static SbUnoObject* Impl_CreateUnoStruct( const OUString& aClassName ) Any aNewAny; xClass->createObject( aNewAny ); // make a SbUnoObject out of it - SbUnoObject* pUnoObj = new SbUnoObject( aClassName, aNewAny ); + SbUnoObjectRef pUnoObj = new SbUnoObject( aClassName, aNewAny ); return pUnoObj; } // Factory-Class to create Uno-Structs per DIM AS NEW -SbxBase* SbUnoFactory::Create( sal_uInt16, sal_uInt32 ) +SbxBaseRef SbUnoFactory::Create( sal_uInt16, sal_uInt32 ) { // Via SbxId nothing works in Uno return nullptr; } -SbxObject* SbUnoFactory::CreateObject( const OUString& rClassName ) +SbxObjectRef SbUnoFactory::CreateObject( const OUString& rClassName ) { - return Impl_CreateUnoStruct( rClassName ); + return Impl_CreateUnoStruct( rClassName ).get(); } |