LibreOffice Module sd (master) 1
|
A configuration describes the resources of an application like panes, views, and tool bars and their relationships that are currently active or are requested to be activated. More...
#include <Configuration.hxx>
Classes | |
class | ResourceContainer |
Public Member Functions | |
Configuration (const css::uno::Reference< css::drawing::framework::XConfigurationControllerBroadcaster > &rxBroadcaster, bool bBroadcastRequestEvents) | |
Create a new configuration with a broadcaster that is used to send events about requested configuration changes. More... | |
virtual | ~Configuration () override |
virtual void | disposing (std::unique_lock< std::mutex > &) override |
virtual void SAL_CALL | addResource (const css::uno::Reference< css::drawing::framework::XResourceId > &rxResourceId) override |
virtual void SAL_CALL | removeResource (const css::uno::Reference< css::drawing::framework::XResourceId > &rxResourceId) override |
virtual css::uno::Sequence< css::uno::Reference< css::drawing::framework::XResourceId > > SAL_CALL | getResources (const css::uno::Reference< css::drawing::framework::XResourceId > &rxAnchorId, const OUString &rsResourceURLPrefix, css::drawing::framework::AnchorBindingMode eMode) override |
virtual sal_Bool SAL_CALL | hasResource (const css::uno::Reference< css::drawing::framework::XResourceId > &rxResourceId) override |
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL | createClone () override |
virtual OUString SAL_CALL | getName () override |
Return a human readable string representation. More... | |
virtual void SAL_CALL | setName (const OUString &rName) override |
This call is ignored because the XNamed interface is (mis)used to give access to a human readable name for debugging purposes. More... | |
![]() | |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual void SAL_CALL | dispose () noexcept final override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
![]() | |
virtual | ~WeakComponentImplHelperBase () override |
virtual void SAL_CALL | dispose () override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual void | disposing (std::unique_lock< std::mutex > &) |
![]() | |
virtual | ~UnoImplBase () |
Private Member Functions | |
Configuration (const css::uno::Reference< css::drawing::framework::XConfigurationControllerBroadcaster > &rxBroadcaster, bool bBroadcastRequestEvents, const ResourceContainer &rResourceContainer) | |
This private variant of the constructor is used for cloning a Configuration object. More... | |
void | PostEvent (const css::uno::Reference< css::drawing::framework::XResourceId > &rxResourceId, const bool bActivation) |
Send an event to all interested listeners that a resource has been added or removed. More... | |
void | ThrowIfDisposed () const |
When the called object has already been disposed this method throws an exception and does not return. More... | |
Private Attributes | |
std::unique_ptr< ResourceContainer > | mpResourceContainer |
The resource container holds the URLs of unique resource and of resource linked to unique resources. More... | |
css::uno::Reference< css::drawing::framework::XConfigurationControllerBroadcaster > | mxBroadcaster |
The broadcaster used for notifying listeners of requests for configuration changes. More... | |
bool | mbBroadcastRequestEvents |
Additional Inherited Members | |
![]() | |
void | throwIfDisposed (std::unique_lock< std::mutex > &) |
![]() | |
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > | maEventListeners |
![]() | |
std::mutex | m_aMutex |
bool | m_bDisposed |
A configuration describes the resources of an application like panes, views, and tool bars and their relationships that are currently active or are requested to be activated.
Resources are specified by URLs rather than references so that not only the current configuration but also a requested configuration can be represented.
A resource URL describes the type of a resource, not its actual instance. For resources, like panes, that are unique with respect to an application frame, that does not mean much of a difference. For other resources like views, that may have more than one instance per application frame, this is different. To identify them unambiguously a second URL, one of a unique resource, is necessary. This second URL is called the anchor of the first. The two types of resources are called unique and linked respectively.
Direct manipulation of a configuration object is not advised with the exception of the configuration controller and objects that implement the XConfigurationChangeOperation interface.
Definition at line 58 of file Configuration.hxx.
sd::framework::Configuration::Configuration | ( | const css::uno::Reference< css::drawing::framework::XConfigurationControllerBroadcaster > & | rxBroadcaster, |
bool | bBroadcastRequestEvents | ||
) |
Create a new configuration with a broadcaster that is used to send events about requested configuration changes.
rxBroadcaster | This broadcaster is typically the same as the one used by the ConfigurationController. |
bBroadcastRequestEvents | When this is <TRUE> then modifications to the configuration trigger the broadcasting of "ResourceActivationRequestEvent" and "ResourceDeactivationRequestEvent". When this flag is <FALSE> then events with type "ResourceActivationEvent" and "ResourceDeactivationEvent" are broadcasted. |
Referenced by createClone().
|
overridevirtual |
Definition at line 81 of file Configuration.cxx.
|
private |
This private variant of the constructor is used for cloning a Configuration object.
rResourceContainer | The new Configuration is created with a copy of the elements in this container. |
|
overridevirtual |
Definition at line 93 of file Configuration.cxx.
References mpResourceContainer, PostEvent(), sd::framework::FrameworkHelper::ResourceIdToString(), SAL_INFO, and ThrowIfDisposed().
|
overridevirtual |
Definition at line 177 of file Configuration.cxx.
References Configuration(), comphelper::UnoImplBase::m_aMutex, mbBroadcastRequestEvents, mpResourceContainer, mxBroadcaster, and ThrowIfDisposed().
|
overridevirtual |
Reimplemented from comphelper::WeakComponentImplHelperBase.
Definition at line 85 of file Configuration.cxx.
References mpResourceContainer, and mxBroadcaster.
|
overridevirtual |
Return a human readable string representation.
This is used for debugging purposes.
Definition at line 190 of file Configuration.cxx.
References comphelper::UnoImplBase::m_aMutex, comphelper::UnoImplBase::m_bDisposed, mpResourceContainer, and sd::framework::FrameworkHelper::ResourceIdToString().
|
overridevirtual |
Definition at line 125 of file Configuration.cxx.
References comphelper::containerToSequence(), eMode, comphelper::UnoImplBase::m_aMutex, mpResourceContainer, and ThrowIfDisposed().
|
overridevirtual |
Definition at line 166 of file Configuration.cxx.
References comphelper::UnoImplBase::m_aMutex, mpResourceContainer, and ThrowIfDisposed().
|
private |
Send an event to all interested listeners that a resource has been added or removed.
The event is sent to the listeners via the ConfigurationController.
rxResourceId | The resource that is added to or removed from the configuration. |
bActivation | This specifies whether an activation or deactivation is broadcasted. The mbBroadcastRequestEvents member is also taken into account when the actual event type field is determined. |
Definition at line 218 of file Configuration.cxx.
References aEvent, mbBroadcastRequestEvents, sd::framework::FrameworkHelper::msResourceActivationEvent, sd::framework::FrameworkHelper::msResourceActivationRequestEvent, sd::framework::FrameworkHelper::msResourceDeactivationEvent, sd::framework::FrameworkHelper::msResourceDeactivationRequestEvent, and mxBroadcaster.
Referenced by addResource(), and removeResource().
|
overridevirtual |
Definition at line 108 of file Configuration.cxx.
References mpResourceContainer, PostEvent(), sd::framework::FrameworkHelper::ResourceIdToString(), SAL_INFO, and ThrowIfDisposed().
|
overridevirtual |
This call is ignored because the XNamed interface is (mis)used to give access to a human readable name for debugging purposes.
Definition at line 213 of file Configuration.cxx.
|
private |
When the called object has already been disposed this method throws an exception and does not return.
css::lang::DisposedException |
Definition at line 244 of file Configuration.cxx.
References comphelper::UnoImplBase::m_bDisposed.
Referenced by addResource(), createClone(), getResources(), hasResource(), and removeResource().
|
private |
Definition at line 130 of file Configuration.hxx.
Referenced by createClone(), and PostEvent().
|
private |
The resource container holds the URLs of unique resource and of resource linked to unique resources.
Definition at line 122 of file Configuration.hxx.
Referenced by addResource(), createClone(), disposing(), getName(), getResources(), hasResource(), and removeResource().
|
private |
The broadcaster used for notifying listeners of requests for configuration changes.
Definition at line 128 of file Configuration.hxx.
Referenced by createClone(), disposing(), and PostEvent().