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/basmgr/basicmanagerrepository.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'basic/source/basmgr') diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 01ca8759e145..a70c49eb1149 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -292,15 +292,13 @@ namespace basic pBasicManager->SetStorageName( aAppBasic.PathToFileName() ); // Basic container - SfxScriptLibraryContainer* pBasicCont = new SfxScriptLibraryContainer( Reference< XStorage >() ); - Reference< XPersistentLibraryContainer > xBasicCont( pBasicCont ); + rtl::Reference pBasicCont = new SfxScriptLibraryContainer( Reference< XStorage >() ); pBasicCont->setBasicManager( pBasicManager ); // Dialog container - SfxDialogLibraryContainer* pDialogCont = new SfxDialogLibraryContainer( Reference< XStorage >() ); - Reference< XPersistentLibraryContainer > xDialogCont( pDialogCont ); + rtl::Reference pDialogCont = new SfxDialogLibraryContainer( Reference< XStorage >() ); - LibraryContainerInfo aInfo( xBasicCont, xDialogCont, static_cast< OldBasicPassword* >( pBasicCont ) ); + LibraryContainerInfo aInfo( pBasicCont, pDialogCont, static_cast< OldBasicPassword* >( pBasicCont.get() ) ); pBasicManager->SetLibraryContainerInfo( aInfo ); // global constants -- cgit