summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-08-22 09:06:55 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-08-22 09:06:55 +0200
commit73b2ea1dfa32566f9f94d5d6e7919ba7d13f6f2c (patch)
treee134b1e2456f8ec72ae50d8b59e711f6bcbd78b6
parent72305ed49d4c9ba968d7bf6d8d5ae564bb92147d (diff)
Remove BasicManagerCleaner
Change-Id: I55eccc6367cf3255af05c075631945f47417d682
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx22
-rw-r--r--include/basic/basmgr.hxx4
2 files changed, 6 insertions, 20 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index 5c102c617a71..a292ccc62c3e 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -72,21 +72,6 @@ namespace basic
typedef ::std::vector< BasicManagerCreationListener* > CreationListeners;
-
- //= BasicManagerCleaner
-
- /// is the only instance which is allowed to delete a BasicManager instance
- class BasicManagerCleaner
- {
- public:
- static void deleteBasicManager( BasicManager*& _rpManager )
- {
- delete _rpManager;
- _rpManager = NULL;
- }
- };
-
-
//= ImplRepository
class ImplRepository : public ::utl::OEventListenerAdapter, public SfxListener
@@ -272,7 +257,7 @@ namespace basic
::osl::MutexGuard aGuard( m_aMutex );
BasicManager* pPreviousManager = getApplicationBasicManager( false );
- BasicManagerCleaner::deleteBasicManager( pPreviousManager );
+ delete pPreviousManager;
GetSbData()->pAppBasMgr = _pBasicManager;
}
@@ -453,7 +438,8 @@ namespace basic
if ( ERRCODE_BUTTON_CANCEL == ErrorHandler::HandleError( i->GetErrorId() ) )
{
// user wants to break loading of BASIC-manager
- BasicManagerCleaner::deleteBasicManager( _out_rpBasicManager );
+ delete _out_rpBasicManager;
+ _out_rpBasicManager = NULL;
xStorage.clear();
break;
}
@@ -550,7 +536,7 @@ namespace basic
// *then* delete the BasicManager
EndListening( *pManager );
- BasicManagerCleaner::deleteBasicManager( pManager );
+ delete pManager;
}
diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx
index 29336da404f9..d6a93d737c65 100644
--- a/include/basic/basmgr.hxx
+++ b/include/basic/basmgr.hxx
@@ -67,7 +67,7 @@ class BasicLibs;
class ErrorManager;
class BasicLibInfo;
-namespace basic { class BasicManagerCleaner; }
+namespace basic { class ImplRepository; }
// Library password handling for 5.0 documents
class BASIC_DLLPUBLIC OldBasicPassword
@@ -115,7 +115,7 @@ class BASIC_DLLPUBLIC BasicManager : public SfxBroadcaster
friend class LibraryContainer_Impl;
friend class StarBasicAccess_Impl;
friend class BasMgrContainerListenerImpl;
- friend class ::basic::BasicManagerCleaner;
+ friend class ::basic::ImplRepository;
private:
BasicLibs* pLibs;