Remove BasicManagerCleaner
Change-Id: I55eccc6367cf3255af05c075631945f47417d682
This commit is contained in:
@@ -72,21 +72,6 @@ namespace basic
|
|||||||
|
|
||||||
typedef ::std::vector< BasicManagerCreationListener* > CreationListeners;
|
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
|
//= ImplRepository
|
||||||
|
|
||||||
class ImplRepository : public ::utl::OEventListenerAdapter, public SfxListener
|
class ImplRepository : public ::utl::OEventListenerAdapter, public SfxListener
|
||||||
@@ -272,7 +257,7 @@ namespace basic
|
|||||||
::osl::MutexGuard aGuard( m_aMutex );
|
::osl::MutexGuard aGuard( m_aMutex );
|
||||||
|
|
||||||
BasicManager* pPreviousManager = getApplicationBasicManager( false );
|
BasicManager* pPreviousManager = getApplicationBasicManager( false );
|
||||||
BasicManagerCleaner::deleteBasicManager( pPreviousManager );
|
delete pPreviousManager;
|
||||||
|
|
||||||
GetSbData()->pAppBasMgr = _pBasicManager;
|
GetSbData()->pAppBasMgr = _pBasicManager;
|
||||||
}
|
}
|
||||||
@@ -453,7 +438,8 @@ namespace basic
|
|||||||
if ( ERRCODE_BUTTON_CANCEL == ErrorHandler::HandleError( i->GetErrorId() ) )
|
if ( ERRCODE_BUTTON_CANCEL == ErrorHandler::HandleError( i->GetErrorId() ) )
|
||||||
{
|
{
|
||||||
// user wants to break loading of BASIC-manager
|
// user wants to break loading of BASIC-manager
|
||||||
BasicManagerCleaner::deleteBasicManager( _out_rpBasicManager );
|
delete _out_rpBasicManager;
|
||||||
|
_out_rpBasicManager = NULL;
|
||||||
xStorage.clear();
|
xStorage.clear();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -550,7 +536,7 @@ namespace basic
|
|||||||
|
|
||||||
// *then* delete the BasicManager
|
// *then* delete the BasicManager
|
||||||
EndListening( *pManager );
|
EndListening( *pManager );
|
||||||
BasicManagerCleaner::deleteBasicManager( pManager );
|
delete pManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ class BasicLibs;
|
|||||||
class ErrorManager;
|
class ErrorManager;
|
||||||
class BasicLibInfo;
|
class BasicLibInfo;
|
||||||
|
|
||||||
namespace basic { class BasicManagerCleaner; }
|
namespace basic { class ImplRepository; }
|
||||||
|
|
||||||
// Library password handling for 5.0 documents
|
// Library password handling for 5.0 documents
|
||||||
class BASIC_DLLPUBLIC OldBasicPassword
|
class BASIC_DLLPUBLIC OldBasicPassword
|
||||||
@@ -115,7 +115,7 @@ class BASIC_DLLPUBLIC BasicManager : public SfxBroadcaster
|
|||||||
friend class LibraryContainer_Impl;
|
friend class LibraryContainer_Impl;
|
||||||
friend class StarBasicAccess_Impl;
|
friend class StarBasicAccess_Impl;
|
||||||
friend class BasMgrContainerListenerImpl;
|
friend class BasMgrContainerListenerImpl;
|
||||||
friend class ::basic::BasicManagerCleaner;
|
friend class ::basic::ImplRepository;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BasicLibs* pLibs;
|
BasicLibs* pLibs;
|
||||||
|
Reference in New Issue
Block a user