|
LibreOffice Module svx (master) 1
|
#include <formfeaturedispatcher.hxx>
Public Member Functions | |
| OSingleFeatureDispatcher (css::util::URL _aFeatureURL, const sal_Int16 _nFormFeature, const css::uno::Reference< css::form::runtime::XFormOperations > &_rxFormOperations, ::osl::Mutex &_rMutex) | |
| constructs the dispatcher More... | |
| void | updateAllListeners () |
| notifies all our listeners of the current state More... | |
Private Member Functions | |
| virtual void SAL_CALL | dispatch (const css::util::URL &_rURL, const css::uno::Sequence< css::beans::PropertyValue > &_rArguments) override |
| virtual void SAL_CALL | addStatusListener (const css::uno::Reference< css::frame::XStatusListener > &_rxControl, const css::util::URL &_rURL) override |
| virtual void SAL_CALL | removeStatusListener (const css::uno::Reference< css::frame::XStatusListener > &_rxControl, const css::util::URL &_rURL) override |
| void | notifyStatus (const css::uno::Reference< css::frame::XStatusListener > &_rxListener, ::osl::ClearableMutexGuard &_rFreeForNotification) |
| notifies our current state to one or all listeners More... | |
| void | getUnoState (css::frame::FeatureStateEvent &_rState) const |
| retrieves the current status of our feature, in a format which can be used for UNO notifications More... | |
Private Attributes | |
| ::osl::Mutex & | m_rMutex |
| ::comphelper::OInterfaceContainerHelper3< css::frame::XStatusListener > | m_aStatusListeners |
| css::uno::Reference< css::form::runtime::XFormOperations > | m_xFormOperations |
| const css::util::URL | m_aFeatureURL |
| css::uno::Any | m_aLastKnownState |
| const sal_Int16 | m_nFormFeature |
| bool | m_bLastKnownEnabled |
Definition at line 36 of file formfeaturedispatcher.hxx.
| svx::OSingleFeatureDispatcher::OSingleFeatureDispatcher | ( | css::util::URL | _aFeatureURL, |
| const sal_Int16 | _nFormFeature, | ||
| const css::uno::Reference< css::form::runtime::XFormOperations > & | _rxFormOperations, | ||
| ::osl::Mutex & | _rMutex | ||
| ) |
constructs the dispatcher
| _rFeatureURL | the URL of the feature which this instance is responsible for |
| _nFeatureId | the feature which this instance is responsible for |
| _rController | the controller which is responsible for providing the state of feature of this instance, and for executing it. After disposing the dispatcher instance, the controller will not be accessed anymore |
Definition at line 39 of file formfeaturedispatcher.cxx.
References m_rMutex.
|
overrideprivatevirtual |
Definition at line 163 of file formfeaturedispatcher.cxx.
References comphelper::OInterfaceContainerHelper3< class ListenerT >::addInterface(), m_aFeatureURL, m_aStatusListeners, m_rMutex, and notifyStatus().
|
overrideprivatevirtual |
Definition at line 126 of file formfeaturedispatcher.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, comphelper::NamedValueCollection::getNamedValues(), m_aFeatureURL, m_nFormFeature, m_rMutex, m_xFormOperations, and nFormFeature.
|
private |
retrieves the current status of our feature, in a format which can be used for UNO notifications
@precond our mutex is locked
Definition at line 51 of file formfeaturedispatcher.cxx.
References m_aFeatureURL, m_nFormFeature, and m_xFormOperations.
Referenced by notifyStatus(), and updateAllListeners().
|
private |
notifies our current state to one or all listeners
| _rxListener | the listener to notify. May be NULL, in this case all our listeners will be notified with the current state |
| _rFreeForNotification | a guard which currently locks our mutex, and which is to be cleared for actually doing the notification(s) |
Definition at line 81 of file formfeaturedispatcher.cxx.
References Exception, getUnoState(), comphelper::OInterfaceIteratorHelper3< class ListenerT >::hasMoreElements(), m_aStatusListeners, comphelper::OInterfaceIteratorHelper3< class ListenerT >::next(), comphelper::OInterfaceIteratorHelper3< class ListenerT >::remove(), and TOOLS_WARN_EXCEPTION.
Referenced by addStatusListener(), and updateAllListeners().
|
overrideprivatevirtual |
Definition at line 179 of file formfeaturedispatcher.cxx.
References m_aFeatureURL, m_aStatusListeners, m_rMutex, and comphelper::OInterfaceContainerHelper3< class ListenerT >::removeInterface().
| void svx::OSingleFeatureDispatcher::updateAllListeners | ( | ) |
notifies all our listeners of the current state
Definition at line 64 of file formfeaturedispatcher.cxx.
References getUnoState(), m_aLastKnownState, m_bLastKnownEnabled, m_rMutex, and notifyStatus().
|
private |
Definition at line 98 of file formfeaturedispatcher.hxx.
Referenced by addStatusListener(), dispatch(), getUnoState(), and removeStatusListener().
|
private |
Definition at line 99 of file formfeaturedispatcher.hxx.
Referenced by updateAllListeners().
|
private |
Definition at line 95 of file formfeaturedispatcher.hxx.
Referenced by addStatusListener(), notifyStatus(), and removeStatusListener().
|
private |
Definition at line 101 of file formfeaturedispatcher.hxx.
Referenced by updateAllListeners().
|
private |
Definition at line 100 of file formfeaturedispatcher.hxx.
Referenced by dispatch(), and getUnoState().
|
private |
Definition at line 94 of file formfeaturedispatcher.hxx.
Referenced by addStatusListener(), dispatch(), removeStatusListener(), and updateAllListeners().
|
private |
Definition at line 97 of file formfeaturedispatcher.hxx.
Referenced by dispatch(), and getUnoState().