LibreOffice Module basic (master) 1
|
Static Public Member Functions | |
static ImplRepository & | Instance () |
static BasicManager * | getApplicationBasicManager () |
static void | setApplicationBasicManager (std::unique_ptr< BasicManager > _pBasicManager) |
Private Member Functions | |
ImplRepository () | |
~ImplRepository () | |
BasicManagerStore::iterator | impl_getLocationForModel (const Reference< XModel > &_rxDocumentModel) |
retrieves the location at which the BasicManager for the given model is stored. More... | |
bool | impl_hasLocationForModel (const Reference< XModel > &_rxDocumentModel) const |
tests if there is a location set at which the BasicManager for the given model is stored. More... | |
bool | impl_createManagerForModel (BasicManagerStore::iterator location, const Reference< XModel > &_rxDocumentModel) |
creates a new BasicManager instance for the given model More... | |
BasicManager * | impl_createApplicationBasicManager () |
creates the application-wide BasicManager More... | |
void | impl_notifyCreationListeners (const Reference< XModel > &_rxDocumentModel, BasicManager &_rManager) |
notifies all listeners which expressed interest in the creation of BasicManager instances. More... | |
virtual void | _disposing (const css::lang::EventObject &_rSource) override |
virtual void | Notify (SfxBroadcaster &_rBC, const SfxHint &_rHint) override |
void | impl_removeFromRepository (const BasicManagerStore::iterator &_pos) |
removes the Model/BasicManager pair given by iterator from our store More... | |
StarBASIC * | impl_getDefaultAppBasicLibrary () |
Static Private Member Functions | |
static bool | impl_getDocumentStorage_nothrow (const Reference< XModel > &_rxDocument, Reference< XStorage > &_out_rStorage) |
retrieves the current storage of a given document More... | |
static bool | impl_getDocumentLibraryContainers_nothrow (const Reference< XModel > &_rxDocument, Reference< XPersistentLibraryContainer > &_out_rxBasicLibraries, Reference< XPersistentLibraryContainer > &_out_rxDialogLibraries) |
retrieves the containers for Basic and Dialog libraries for a given document More... | |
static void | impl_initDocLibraryContainers_nothrow (const Reference< XPersistentLibraryContainer > &_rxBasicLibraries, const Reference< XPersistentLibraryContainer > &_rxDialogLibraries) |
initializes the given library containers, which belong to a document More... | |
Private Attributes | |
BasicManagerStore | m_aStore |
CreationListeners | m_aCreationListeners |
Additional Inherited Members | |
Protected Member Functions inherited from utl::OEventListenerAdapter | |
OEventListenerAdapter () | |
virtual | ~OEventListenerAdapter () |
void | startComponentListening (const css::uno::Reference< css::lang::XComponent > &_rxComp) |
void | stopComponentListening (const css::uno::Reference< css::lang::XComponent > &_rxComp) |
void | stopAllComponentListening () |
virtual void | _disposing (const css::lang::EventObject &_rSource)=0 |
Protected Member Functions inherited from SvRefBase | |
virtual | ~SvRefBase () COVERITY_NOEXCEPT_FALSE |
Definition at line 68 of file basicmanagerrepository.cxx.
|
private |
Definition at line 196 of file basicmanagerrepository.cxx.
Referenced by Instance().
|
private |
Definition at line 200 of file basicmanagerrepository.cxx.
References SfxListener::EndListening(), and m_aStore.
|
overrideprivatevirtual |
Implements utl::OEventListenerAdapter.
Definition at line 558 of file basicmanagerrepository.cxx.
References impl_removeFromRepository(), and m_aStore.
|
static |
Definition at line 249 of file basicmanagerrepository.cxx.
References GetSbData().
Referenced by impl_createApplicationBasicManager().
BasicManager * basic::ImplRepository::getDocumentBasicManager | ( | const Reference< XModel > & | _rxDocumentModel | ) |
Definition at line 219 of file basicmanagerrepository.cxx.
References impl_createManagerForModel(), and impl_getLocationForModel().
Referenced by basic::BasicManagerRepository::getDocumentBasicManager().
BasicManager * basic::ImplRepository::getOrCreateApplicationBasicManager | ( | ) |
Definition at line 239 of file basicmanagerrepository.cxx.
References GetSbData(), and impl_createApplicationBasicManager().
Referenced by basic::BasicManagerRepository::getApplicationBasicManager(), and impl_getDefaultAppBasicLibrary().
|
private |
creates the application-wide BasicManager
Definition at line 264 of file basicmanagerrepository.cxx.
References DBG_ASSERT, getApplicationBasicManager(), Application::GetAppName(), SvtPathOptions::GetBasicPath(), INetURLObject::getName(), INetURLObject::GetProtocol(), o3tl::getToken(), impl_notifyCreationListeners(), INetURLObject::insertName(), OUStringToOString(), INetURLObject::PathToFileName(), setApplicationBasicManager(), SvtPathOptions::SetBasicPath(), BasicManager::SetGlobalUNOConstant(), BasicManager::SetLibraryContainerInfo(), and BasicManager::SetStorageName().
Referenced by getOrCreateApplicationBasicManager().
|
private |
creates a new BasicManager instance for the given model
_out_rpBasicManager | reference to the pointer variable that will hold the new BasicManager. |
_rxDocumentModel | the model whose BasicManager will be created. Must not be <NULL>. |
Definition at line 402 of file basicmanagerrepository.cxx.
References ERRCTX_SFX_LOADBASIC, ExtSearch, SvtPathOptions::GetBasicPath(), ErrorHandler::HandleError(), impl_getDefaultAppBasicLibrary(), impl_getDocumentLibraryContainers_nothrow(), impl_getDocumentStorage_nothrow(), impl_hasLocationForModel(), impl_initDocLibraryContainers_nothrow(), impl_notifyCreationListeners(), m_aStore, LibraryContainerInfo::mpOldBasicPassword, SbxBase::SetFlag(), utl::OEventListenerAdapter::startComponentListening(), SfxListener::StartListening(), and u.
Referenced by getDocumentBasicManager().
|
private |
Definition at line 352 of file basicmanagerrepository.cxx.
References DBG_ASSERT, BasicManager::GetLib(), and getOrCreateApplicationBasicManager().
Referenced by impl_createManagerForModel().
|
staticprivate |
retrieves the containers for Basic and Dialog libraries for a given document
_rxDocument | the document whose containers are to be retrieved. |
_out_rxBasicLibraries | takes the basic library container upon successful return |
_out_rxDialogLibraries | takes the dialog library container upon successful return |
Definition at line 521 of file basicmanagerrepository.cxx.
References DBG_UNHANDLED_EXCEPTION, and Exception.
Referenced by impl_createManagerForModel().
|
staticprivate |
retrieves the current storage of a given document
_rxDocument | the document whose storage is to be retrieved. |
_out_rStorage | takes the storage upon successful return. Note that this might be <NULL> even if <TRUE> is returned. In this case, the document has not yet been saved. |
Definition at line 504 of file basicmanagerrepository.cxx.
References DBG_UNHANDLED_EXCEPTION, and Exception.
Referenced by impl_createManagerForModel().
|
private |
retrieves the location at which the BasicManager for the given model is stored.
If previously, the BasicManager for this model has never been requested, then the model is added to the map, with an initial NULL BasicManager.
_rxDocumentModel | the model whose BasicManager's location is to be retrieved. Must not be <NULL>. |
@precond our mutex is locked
Definition at line 361 of file basicmanagerrepository.cxx.
References DBG_ASSERT, and m_aStore.
Referenced by getDocumentBasicManager().
|
private |
tests if there is a location set at which the BasicManager for the given model is stored.
_rxDocumentModel | the model whose BasicManager's location is to be retrieved. Must not be <NULL>. |
@precond our mutex is locked
Definition at line 369 of file basicmanagerrepository.cxx.
References DBG_ASSERT, and m_aStore.
Referenced by impl_createManagerForModel().
|
staticprivate |
initializes the given library containers, which belong to a document
Definition at line 377 of file basicmanagerrepository.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, and u.
Referenced by impl_createManagerForModel().
|
private |
notifies all listeners which expressed interest in the creation of BasicManager instances.
Definition at line 343 of file basicmanagerrepository.cxx.
References m_aCreationListeners.
Referenced by impl_createApplicationBasicManager(), and impl_createManagerForModel().
|
private |
removes the Model/BasicManager pair given by iterator from our store
Definition at line 540 of file basicmanagerrepository.cxx.
References SfxListener::EndListening(), m_aStore, utl::OEventListenerAdapter::stopComponentListening(), and xModel.
Referenced by _disposing().
|
static |
Definition at line 207 of file basicmanagerrepository.cxx.
References aMutex, tools::SvRef< typename T >::get(), GetSbxData_Impl(), ImplRepository(), and SbxAppData::mrImplRepository.
Referenced by basic::BasicManagerRepository::getApplicationBasicManager(), basic::BasicManagerRepository::getDocumentBasicManager(), basic::BasicManagerRepository::registerCreationListener(), and basic::BasicManagerRepository::revokeCreationListener().
|
overrideprivatevirtual |
Reimplemented from SfxListener.
Definition at line 577 of file basicmanagerrepository.cxx.
References SfxHint::GetId(), and m_aStore.
void basic::ImplRepository::registerCreationListener | ( | BasicManagerCreationListener & | _rListener | ) |
Definition at line 322 of file basicmanagerrepository.cxx.
References m_aCreationListeners.
Referenced by basic::BasicManagerRepository::registerCreationListener().
void basic::ImplRepository::revokeCreationListener | ( | BasicManagerCreationListener & | _rListener | ) |
Definition at line 330 of file basicmanagerrepository.cxx.
References m_aCreationListeners, and pos.
Referenced by basic::BasicManagerRepository::revokeCreationListener().
|
static |
Definition at line 256 of file basicmanagerrepository.cxx.
References GetSbData().
Referenced by impl_createApplicationBasicManager(), and basic::BasicManagerRepository::resetApplicationBasicManager().
|
private |
Definition at line 76 of file basicmanagerrepository.cxx.
Referenced by impl_notifyCreationListeners(), registerCreationListener(), and revokeCreationListener().
|
private |
Definition at line 75 of file basicmanagerrepository.cxx.
Referenced by _disposing(), impl_createManagerForModel(), impl_getLocationForModel(), impl_hasLocationForModel(), impl_removeFromRepository(), Notify(), and ~ImplRepository().