LibreOffice Module basic (master) 1
Static Public Member Functions | List of all members
basic::BasicManagerRepository Class Reference

#include <basicmanagerrepository.hxx>

Static Public Member Functions

static BasicManagergetDocumentBasicManager (const css::uno::Reference< css::frame::XModel > &_rxDocumentModel)
 returns the BasicManager belonging to the given document More...
 
static BasicManagergetApplicationBasicManager ()
 returns the application-wide BasicManager More...
 
static void resetApplicationBasicManager ()
 resets the application-wide BasicManager to <NULL> More...
 
static void registerCreationListener (BasicManagerCreationListener &_rListener)
 registers a BasicManagerCreationListener instance which is notified whenever the repository creates a BasicManager instance. More...
 
static void revokeCreationListener (BasicManagerCreationListener &_rListener)
 revokes a BasicManagerCreationListener instance which has previously been registered to be notified about created BasicManager instances. More...
 

Detailed Description

Definition at line 65 of file basicmanagerrepository.hxx.

Member Function Documentation

◆ getApplicationBasicManager()

BasicManager * basic::BasicManagerRepository::getApplicationBasicManager ( )
static

returns the application-wide BasicManager

Attention: \n
If the BasicManager is newly created, then it is still owned by the repository. In particular, you are not allowed to delete it. Instead, call resetApplicationBasicManager to release the BasicManager.

Definition at line 603 of file basicmanagerrepository.cxx.

References basic::ImplRepository::getOrCreateApplicationBasicManager(), and basic::ImplRepository::Instance().

◆ getDocumentBasicManager()

BasicManager * basic::BasicManagerRepository::getDocumentBasicManager ( const css::uno::Reference< css::frame::XModel > &  _rxDocumentModel)
static

returns the BasicManager belonging to the given document

If the BasicManager does not yet exist, it is created. In this case, if the application's BasicManager does not yet exist, it is also created. This is necessary since the application's BasicManager acts as parent for all document's BasicManagers.

If you're interested in this case - the implicit creation of the application's BasicManager -, then you need to register as BasicManagerCreationListener.

Parameters
_rxDocumentModeldenotes the document model whose BasicManager is to be retrieved. Must not be <NULL>. The document should support the XDocumentPropertiesSupplier interface, for retrieving its title, which is needed in some error conditions. Also it must support the XStorageBasedDocument interface, since we must be able to retrieve the document's storage. If this interface is not supported, creating a new BasicManager will certainly fail.
Returns
the BasicManager for this model.
Attention: \n
The returned BasicManager instances is owned by the repository. In particular, you are not allowed to delete it. Instead, the given model is observed: As soon as it's closed, the associated BasicManager is deleted.

Definition at line 598 of file basicmanagerrepository.cxx.

References basic::ImplRepository::getDocumentBasicManager(), and basic::ImplRepository::Instance().

Referenced by basic::SfxLibraryContainer::getBasicManager(), and RTL_Impl_CreateUnoDialog().

◆ registerCreationListener()

void basic::BasicManagerRepository::registerCreationListener ( BasicManagerCreationListener _rListener)
static

registers a BasicManagerCreationListener instance which is notified whenever the repository creates a BasicManager instance.

Note that this listener is not called when somebody else creates BasicManager instances.

If the same listener is registered multiple times, it is also notified multiple times, and needs to be revoked once for each registration.

Definition at line 613 of file basicmanagerrepository.cxx.

References basic::ImplRepository::Instance(), and basic::ImplRepository::registerCreationListener().

◆ resetApplicationBasicManager()

void basic::BasicManagerRepository::resetApplicationBasicManager ( )
static

resets the application-wide BasicManager to <NULL>

Definition at line 608 of file basicmanagerrepository.cxx.

References basic::ImplRepository::setApplicationBasicManager().

◆ revokeCreationListener()

void basic::BasicManagerRepository::revokeCreationListener ( BasicManagerCreationListener _rListener)
static

revokes a BasicManagerCreationListener instance which has previously been registered to be notified about created BasicManager instances.

Definition at line 618 of file basicmanagerrepository.cxx.

References basic::ImplRepository::Instance(), and basic::ImplRepository::revokeCreationListener().


The documentation for this class was generated from the following files: