LibreOffice Module sd (master) 1
|
The configuration controller is responsible for maintaining the current configuration. More...
#include <ConfigurationController.hxx>
Classes | |
class | Implementation |
class | Lock |
Use this class instead of calling lock() and unlock() directly in order to be exception safe. More... | |
Public Member Functions | |
ConfigurationController (const rtl::Reference<::sd::DrawController > &rxController) | |
virtual | ~ConfigurationController () noexcept override |
ConfigurationController (const ConfigurationController &)=delete | |
ConfigurationController & | operator= (const ConfigurationController &)=delete |
virtual void SAL_CALL | disposing () override |
void | ProcessEvent () |
void | RequestSynchronousUpdate () |
Normally the requested changes of the configuration are executed asynchronously. More... | |
virtual void SAL_CALL | lock () override |
virtual void SAL_CALL | unlock () override |
virtual void SAL_CALL | requestResourceActivation (const css::uno::Reference< css::drawing::framework::XResourceId > &rxResourceId, css::drawing::framework::ResourceActivationMode eMode) override |
virtual void SAL_CALL | requestResourceDeactivation (const css::uno::Reference< css::drawing::framework::XResourceId > &rxResourceId) override |
virtual css::uno::Reference< css::drawing::framework::XResource > SAL_CALL | getResource (const css::uno::Reference< css::drawing::framework::XResourceId > &rxResourceId) override |
virtual void SAL_CALL | update () override |
virtual css::uno::Reference< css::drawing::framework::XConfiguration > SAL_CALL | getRequestedConfiguration () override |
virtual css::uno::Reference< css::drawing::framework::XConfiguration > SAL_CALL | getCurrentConfiguration () override |
virtual void SAL_CALL | restoreConfiguration (const css::uno::Reference< css::drawing::framework::XConfiguration > &rxConfiguration) override |
The given configuration is restored by generating the appropriate set of activation and deactivation requests. More... | |
virtual void SAL_CALL | addConfigurationChangeListener (const css::uno::Reference< css::drawing::framework::XConfigurationChangeListener > &rxListener, const OUString &rsEventType, const css::uno::Any &rUserData) override |
virtual void SAL_CALL | removeConfigurationChangeListener (const css::uno::Reference< css::drawing::framework::XConfigurationChangeListener > &rxListener) override |
virtual void SAL_CALL | notifyEvent (const css::drawing::framework::ConfigurationChangeEvent &rEvent) override |
virtual sal_Bool SAL_CALL | hasPendingRequests () override |
virtual void SAL_CALL | postChangeRequest (const css::uno::Reference< css::drawing::framework::XConfigurationChangeRequest > &rxRequest) override |
virtual void SAL_CALL | addResourceFactory (const OUString &sResourceURL, const css::uno::Reference< css::drawing::framework::XResourceFactory > &rxResourceFactory) override |
virtual void SAL_CALL | removeResourceFactoryForURL (const OUString &sResourceURL) override |
virtual void SAL_CALL | removeResourceFactoryForReference (const css::uno::Reference< css::drawing::framework::XResourceFactory > &rxResourceFactory) override |
virtual css::uno::Reference< css::drawing::framework::XResourceFactory > SAL_CALL | getResourceFactory (const OUString &sResourceURL) override |
Private Member Functions | |
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< Implementation > | mpImplementation |
bool | mbIsDisposed |
Private Attributes inherited from cppu::BaseMutex | |
mutable::osl::Mutex | m_aMutex |
The configuration controller is responsible for maintaining the current configuration.
Definition at line 51 of file ConfigurationController.hxx.
sd::framework::ConfigurationController::ConfigurationController | ( | const rtl::Reference<::sd::DrawController > & | rxController | ) |
Definition at line 105 of file ConfigurationController.cxx.
References mpImplementation.
|
overridevirtualnoexcept |
Definition at line 116 of file ConfigurationController.cxx.
|
delete |
|
overridevirtual |
Definition at line 173 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
|
overridevirtual |
Definition at line 450 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
|
overridevirtual |
Definition at line 120 of file ConfigurationController.cxx.
References aEvent, mbIsDisposed, mpImplementation, restoreConfiguration(), and SAL_INFO.
|
overridevirtual |
Definition at line 381 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
|
overridevirtual |
Definition at line 369 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
|
overridevirtual |
Definition at line 323 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, sd::framework::ConfigurationControllerResourceManager::ResourceDescriptor::mxResource, and ThrowIfDisposed().
Referenced by sd::ViewShellBase::LateInit().
|
overridevirtual |
Definition at line 475 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
|
overridevirtual |
Definition at line 352 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
Referenced by sd::ViewShellBase::LateInit().
|
overridevirtual |
Definition at line 203 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
|
overridevirtual |
Definition at line 194 of file ConfigurationController.cxx.
References mpImplementation, and ThrowIfDisposed().
|
delete |
|
overridevirtual |
Definition at line 360 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
Referenced by requestResourceActivation(), and requestResourceDeactivation().
void sd::framework::ConfigurationController::ProcessEvent | ( | ) |
Definition at line 152 of file ConfigurationController.cxx.
References mpImplementation.
Referenced by sd::ViewShellBase::LateInit().
|
overridevirtual |
Definition at line 185 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
|
overridevirtual |
Definition at line 467 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
|
overridevirtual |
Definition at line 459 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
|
overridevirtual |
Definition at line 232 of file ConfigurationController.cxx.
References sd::framework::GenericConfigurationChangeRequest::Activation, eMode, cppu::BaseMutex::m_aMutex, mpImplementation, postChangeRequest(), requestResourceDeactivation(), sd::framework::FrameworkHelper::ResourceIdToString(), SAL_INFO, and ThrowIfDisposed().
Referenced by restoreConfiguration().
|
overridevirtual |
Definition at line 288 of file ConfigurationController.cxx.
References sd::framework::GenericConfigurationChangeRequest::Deactivation, cppu::BaseMutex::m_aMutex, mpImplementation, postChangeRequest(), requestResourceDeactivation(), sd::framework::FrameworkHelper::ResourceIdToString(), SAL_INFO, and ThrowIfDisposed().
Referenced by requestResourceActivation(), requestResourceDeactivation(), and restoreConfiguration().
void sd::framework::ConfigurationController::RequestSynchronousUpdate | ( | ) |
Normally the requested changes of the configuration are executed asynchronously.
However, there is at least one situation (searching with the Outliner) where the surrounding code does not cope with this. So, instead of calling Reschedule until the global event loop executes the configuration update, this method does (almost) the same without the reschedules.
Do not use this method until there is absolutely no other way.
Definition at line 162 of file ConfigurationController.cxx.
References mpImplementation.
|
overridevirtual |
The given configuration is restored by generating the appropriate set of activation and deactivation requests.
Definition at line 397 of file ConfigurationController.cxx.
References sd::framework::ConfigurationClassifier::GetC1minusC2(), sd::framework::ConfigurationClassifier::GetC2minusC1(), cppu::BaseMutex::m_aMutex, mpImplementation, sd::framework::ConfigurationClassifier::Partition(), requestResourceActivation(), requestResourceDeactivation(), SAL_INFO, ThrowIfDisposed(), and sd::framework::ConfigurationTracer::TraceConfiguration().
Referenced by disposing().
|
private |
When the called object has already been disposed this method throws an exception and does not return.
css::lang::DisposedException | |
css::uno::RuntimeException |
Definition at line 484 of file ConfigurationController.cxx.
References mbIsDisposed, and mpImplementation.
Referenced by addConfigurationChangeListener(), addResourceFactory(), getCurrentConfiguration(), getRequestedConfiguration(), getResource(), getResourceFactory(), hasPendingRequests(), lock(), notifyEvent(), postChangeRequest(), removeConfigurationChangeListener(), removeResourceFactoryForReference(), removeResourceFactoryForURL(), requestResourceActivation(), requestResourceDeactivation(), restoreConfiguration(), unlock(), and update().
|
overridevirtual |
Definition at line 217 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
|
overridevirtual |
Definition at line 334 of file ConfigurationController.cxx.
References cppu::BaseMutex::m_aMutex, mpImplementation, and ThrowIfDisposed().
|
private |
Definition at line 164 of file ConfigurationController.hxx.
Referenced by disposing(), and ThrowIfDisposed().
|
private |
Definition at line 163 of file ConfigurationController.hxx.
Referenced by addConfigurationChangeListener(), addResourceFactory(), ConfigurationController(), disposing(), getCurrentConfiguration(), getRequestedConfiguration(), getResource(), getResourceFactory(), hasPendingRequests(), lock(), notifyEvent(), postChangeRequest(), ProcessEvent(), removeConfigurationChangeListener(), removeResourceFactoryForReference(), removeResourceFactoryForURL(), requestResourceActivation(), requestResourceDeactivation(), RequestSynchronousUpdate(), restoreConfiguration(), ThrowIfDisposed(), unlock(), and update().