LibreOffice Module framework (master) 1
styletoolbarcontroller.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#pragma once
11
13#include <com/sun/star/frame/XDispatchProvider.hpp>
14
15namespace framework {
16
33class StyleDispatcher final : public cppu::WeakImplHelper< css::frame::XDispatch, css::frame::XStatusListener >
34{
35public:
36 StyleDispatcher( const css::uno::Reference< css::frame::XFrame >& rFrame,
37 css::uno::Reference< css::util::XURLTransformer > xUrlTransformer,
38 const css::util::URL& rURL );
39
40 // XDispatch
41 void SAL_CALL dispatch( const css::util::URL& rURL, const css::uno::Sequence< css::beans::PropertyValue >& rArguments ) override;
42 void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& rListener, const css::util::URL& rURL ) override;
43 void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& rListener, const css::util::URL& rURL ) override;
44
45 // XStatusListener
46 void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
47
48 // XEventListener
49 void SAL_CALL disposing( const css::lang::EventObject& rSource ) override;
50
51private:
53 css::uno::Reference< css::util::XURLTransformer > m_xUrlTransformer;
54 css::uno::Reference< css::frame::XDispatchProvider > m_xFrame;
55 css::uno::Reference< css::frame::XDispatch > m_xStatusDispatch;
56 css::uno::Reference< css::frame::XStatusListener > m_xOwner;
57};
58
60{
61public:
62 StyleToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rContext,
63 const css::uno::Reference< css::frame::XFrame >& rFrame,
64 const OUString& rCommand );
65
66 // XUpdatable
67 void SAL_CALL update() override;
68
69 // XStatusListener
70 void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) override;
71
72 // XComponent
73 void SAL_CALL dispose() override;
74};
75
76}
77
78/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
A dispatcher that serves as a proxy for style commands with arguments i.e.
css::uno::Reference< css::util::XURLTransformer > m_xUrlTransformer
css::uno::Reference< css::frame::XStatusListener > m_xOwner
css::uno::Reference< css::frame::XDispatchProvider > m_xFrame
void SAL_CALL dispatch(const css::util::URL &rURL, const css::uno::Sequence< css::beans::PropertyValue > &rArguments) override
void SAL_CALL statusChanged(const css::frame::FeatureStateEvent &rEvent) override
void SAL_CALL disposing(const css::lang::EventObject &rSource) 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
css::uno::Reference< css::frame::XDispatch > m_xStatusDispatch
StyleDispatcher(const css::uno::Reference< css::frame::XFrame > &rFrame, css::uno::Reference< css::util::XURLTransformer > xUrlTransformer, const css::util::URL &rURL)
StyleToolbarController(const css::uno::Reference< css::uno::XComponentContext > &rContext, const css::uno::Reference< css::frame::XFrame > &rFrame, const OUString &rCommand)
void SAL_CALL statusChanged(const css::frame::FeatureStateEvent &rEvent) override