LibreOffice Module framework (master) 1
|
A dispatcher that serves as a proxy for style commands with arguments i.e. More...
#include <styletoolbarcontroller.hxx>
Public Member Functions | |
StyleDispatcher (const css::uno::Reference< css::frame::XFrame > &rFrame, css::uno::Reference< css::util::XURLTransformer > xUrlTransformer, const css::util::URL &rURL) | |
void SAL_CALL | dispatch (const css::util::URL &rURL, const css::uno::Sequence< css::beans::PropertyValue > &rArguments) override |
void SAL_CALL | addStatusListener (const css::uno::Reference< css::frame::XStatusListener > &rListener, const css::util::URL &rURL) override |
void SAL_CALL | removeStatusListener (const css::uno::Reference< css::frame::XStatusListener > &rListener, const css::util::URL &rURL) override |
void SAL_CALL | statusChanged (const css::frame::FeatureStateEvent &rEvent) override |
void SAL_CALL | disposing (const css::lang::EventObject &rSource) override |
Private Attributes | |
OUString | m_aStyleName |
OUString | m_aCommand |
OUString | m_aStatusCommand |
css::uno::Reference< css::util::XURLTransformer > | m_xUrlTransformer |
css::uno::Reference< css::frame::XDispatchProvider > | m_xFrame |
css::uno::Reference< css::frame::XDispatch > | m_xStatusDispatch |
css::uno::Reference< css::frame::XStatusListener > | m_xOwner |
A dispatcher that serves as a proxy for style commands with arguments i.e.
.uno:StyleApply?... in order to provide useful status updates to generic UI elements such as toolbars or menubar. It listens to special status commands, and computes a boolean status out of them. Then it forwards that boolean status to the listener, as if it was the status of the original command.
Note that the implementation is minimal: Although the UI element appears to be the owner of the dispatcher, it's still responsible, as usual, to call removeStatusListener same amount of times as addStatusListener, otherwise the dispatcher might not be destructed. In addition this implementation might hold a hard reference on the owner, and it's the responsibility of the owner to destroy the dispatcher first, in order to break the cycle.
Definition at line 33 of file styletoolbarcontroller.hxx.
framework::StyleDispatcher::StyleDispatcher | ( | const css::uno::Reference< css::frame::XFrame > & | rFrame, |
css::uno::Reference< css::util::XURLTransformer > | xUrlTransformer, | ||
const css::util::URL & | rURL | ||
) |
Definition at line 84 of file styletoolbarcontroller.cxx.
References Complete, INetURLObject::decode(), o3tl::getToken(), m_aCommand, m_aStatusCommand, m_aStyleName, m_xFrame, m_xFrame, m_xStatusDispatch, m_xUrlTransformer, nIndex, SAL_WARN, SAL_WARN_IF, u, and INetURLObject::WithCharset.
|
override |
Definition at line 147 of file styletoolbarcontroller.cxx.
References m_aStatusCommand, m_xOwner, m_xStatusDispatch, and m_xUrlTransformer.
|
override |
Definition at line 136 of file styletoolbarcontroller.cxx.
|
override |
Definition at line 189 of file styletoolbarcontroller.cxx.
References m_xStatusDispatch.
|
override |
Definition at line 162 of file styletoolbarcontroller.cxx.
References m_aStatusCommand, m_xStatusDispatch, and m_xUrlTransformer.
|
override |
Definition at line 174 of file styletoolbarcontroller.cxx.
References aEvent, m_aCommand, m_aStyleName, m_xOwner, and m_xUrlTransformer.
|
private |
Definition at line 52 of file styletoolbarcontroller.hxx.
Referenced by statusChanged(), and StyleDispatcher().
|
private |
Definition at line 52 of file styletoolbarcontroller.hxx.
Referenced by addStatusListener(), removeStatusListener(), and StyleDispatcher().
|
private |
Definition at line 52 of file styletoolbarcontroller.hxx.
Referenced by statusChanged(), and StyleDispatcher().
|
private |
Definition at line 54 of file styletoolbarcontroller.hxx.
Referenced by dispatch(), and StyleDispatcher().
|
private |
Definition at line 56 of file styletoolbarcontroller.hxx.
Referenced by addStatusListener(), and statusChanged().
|
private |
Definition at line 55 of file styletoolbarcontroller.hxx.
Referenced by addStatusListener(), disposing(), removeStatusListener(), and StyleDispatcher().
|
private |
Definition at line 53 of file styletoolbarcontroller.hxx.
Referenced by addStatusListener(), removeStatusListener(), statusChanged(), and StyleDispatcher().