Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / forms / source / richtext / attributedispatcher.hxx
blob358a2df57513db38cec357b28aaef3991277a929
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_FORMS_SOURCE_RICHTEXT_ATTRIBUTEDISPATCHER_HXX
20 #define INCLUDED_FORMS_SOURCE_RICHTEXT_ATTRIBUTEDISPATCHER_HXX
22 #include "featuredispatcher.hxx"
23 #include "rtattributes.hxx"
24 #include "textattributelistener.hxx"
27 namespace frm
30 class OAttributeDispatcher :public ORichTextFeatureDispatcher
31 ,public ITextAttributeListener
33 protected:
34 IMultiAttributeDispatcher* m_pMasterDispatcher;
35 AttributeId m_nAttributeId;
37 public:
38 /** ctor
39 @param _nAttributeId
40 the id of the attribute which this instance is responsible for
41 @param _rURL
42 the URL of the feature which this instance is responsible for
43 @param _pMasterDispatcher
44 the dispatcher which can execute the given attribute
45 @param _pConverter
46 an instance which is able to convert between SfxPoolItems and XDispatch-Parameters
47 If not <NULL/>, the parametrized version of IMultiAttributeDispatcher::executeAttribute
48 will be used.
50 OAttributeDispatcher(
51 EditView& _rView,
52 AttributeId _nAttributeId,
53 const css::util::URL& _rURL,
54 IMultiAttributeDispatcher* _pMasterDispatcher
57 protected:
58 virtual ~OAttributeDispatcher( );
60 // XDispatch
61 virtual void SAL_CALL dispatch( const css::util::URL& URL, const css::uno::Sequence< css::beans::PropertyValue >& Arguments ) throw (css::uno::RuntimeException, std::exception) override;
63 // ITextAttributeListener
64 virtual void onAttributeStateChanged( AttributeId _nAttributeId, const AttributeState& _rState ) override;
66 // ORichTextFeatureDispatcher
67 virtual void disposing( ::osl::ClearableMutexGuard& _rClearBeforeNotify ) override;
69 // ORichTextFeatureDispatcher
70 virtual css::frame::FeatureStateEvent buildStatusEvent() const override;
72 // own overridables
73 virtual void fillFeatureEventFromAttributeState( css::frame::FeatureStateEvent& _rEvent, const AttributeState& _rState ) const;
77 } // namespace frm
80 #endif // INCLUDED_FORMS_SOURCE_RICHTEXT_ATTRIBUTEDISPATCHER_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */