LibreOffice Module svx (master) 1
fmtextcontrolfeature.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_SVX_SOURCE_INC_FMTEXTCONTROLFEATURE_HXX
21#define INCLUDED_SVX_SOURCE_INC_FMTEXTCONTROLFEATURE_HXX
22
23#include <com/sun/star/beans/PropertyValue.hpp>
24#include <com/sun/star/frame/XDispatch.hpp>
25#include <com/sun/star/frame/XStatusListener.hpp>
26#include <com/sun/star/util/URL.hpp>
28#include "fmslotinvalidator.hxx"
29
30
31namespace svx
32{
33 class FmTextControlShell;
34
35 typedef ::cppu::WeakImplHelper < css::frame::XStatusListener
37
39 {
40 private:
41 css::uno::Reference< css::frame::XDispatch >
43 css::util::URL m_aFeatureURL;
44 css::uno::Any m_aFeatureState;
48
49 public:
57 const css::uno::Reference< css::frame::XDispatch >& _rxDispatcher,
58 css::util::URL _aFeatureURL,
59 SfxSlotId _nId,
60 FmTextControlShell* _pInvalidator
61 );
62
64 bool isFeatureEnabled( ) const { return m_bFeatureEnabled; }
65 const css::uno::Any& getFeatureState( ) const { return m_aFeatureState; }
66
69 void dispatch() const;
70
73 void dispatch( const css::uno::Sequence< css::beans::PropertyValue >& _rArgs ) const;
74
76 void dispose();
77
78 private:
79 virtual ~FmTextControlFeature() override;
80
81 // XStatusListener
82 virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& State ) override;
83 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
84 };
85
86
87}
88
89
90#endif // INCLUDED_SVX_SOURCE_INC_FMTEXTCONTROLFEATURE_HXX
91
92/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void dispatch(const css::uno::Sequence< css::beans::PropertyValue > &_rArgs) const
dispatches the feature URL to the dispatcher, with passing the given arguments
const css::uno::Any & getFeatureState() const
FmTextControlShell * m_pInvalidator
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
bool isFeatureEnabled() const
determines whether the feature we're responsible for is currently enabled
void dispatch() const
dispatches the feature URL to the dispatcher
virtual ~FmTextControlFeature() override
FmTextControlFeature(const css::uno::Reference< css::frame::XDispatch > &_rxDispatcher, css::util::URL _aFeatureURL, SfxSlotId _nId, FmTextControlShell *_pInvalidator)
constructs a FmTextControlFeature object
virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent &State) override
css::uno::Reference< css::frame::XDispatch > m_xDispatcher
void dispose()
releases any resources associated with this instance
::cppu::WeakImplHelper< css::frame::XStatusListener > FmTextControlFeature_Base
sal_uInt16 SfxSlotId
State