From 1571fd8bfdb1deb07b4d6a4abde4919d24550cea Mon Sep 17 00:00:00 2001 From: Noel Date: Mon, 22 Feb 2021 12:12:37 +0200 Subject: loplugin:refcounting in basic Change-Id: I0c1e41436ddae176695a90c120303727aa3bc2ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111306 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/uno/dlgcont.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'basic/source/uno/dlgcont.cxx') diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index 13055cb130e1..ff89a780c2f5 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -80,19 +80,17 @@ SfxDialogLibraryContainer::SfxDialogLibraryContainer( const uno::Reference< embe } // Methods to get library instances of the correct type -SfxLibrary* SfxDialogLibraryContainer::implCreateLibrary( const OUString& aName ) +rtl::Reference SfxDialogLibraryContainer::implCreateLibrary( const OUString& aName ) { - SfxLibrary* pRet = new SfxDialogLibrary( maModifiable, aName, mxSFI, this ); - return pRet; + return new SfxDialogLibrary( maModifiable, aName, mxSFI, this ); } -SfxLibrary* SfxDialogLibraryContainer::implCreateLibraryLink +rtl::Reference SfxDialogLibraryContainer::implCreateLibraryLink ( const OUString& aName, const OUString& aLibInfoFileURL, const OUString& StorageURL, bool ReadOnly ) { - SfxLibrary* pRet = new SfxDialogLibrary + return new SfxDialogLibrary ( maModifiable, aName, mxSFI, aLibInfoFileURL, StorageURL, ReadOnly, this ); - return pRet; } Any SfxDialogLibraryContainer::createEmptyLibraryElement() -- cgit