LibreOffice Module chart2 (master) 1
DrawCommandDispatch.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#pragma once
20
21#include <svx/svdobjkind.hxx>
23#include <rtl/ref.hxx>
24
25class SfxItemSet;
26class SdrObject;
27
28namespace chart
29{
30
31class ChartController;
32
36{
37public:
38 DrawCommandDispatch( const css::uno::Reference< css::uno::XComponentContext >& rxContext, ChartController* pController );
39 virtual ~DrawCommandDispatch() override;
40
41 virtual bool isFeatureSupported( const OUString& rCommandURL ) override;
42
43 void setAttributes( SdrObject* pObj );
44 void setLineEnds( SfxItemSet& rAttr );
45
46protected:
47 // WeakComponentImplHelperBase
48 virtual void disposing( std::unique_lock<std::mutex>& rGuard ) override;
49
50 // XEventListener
51 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
52
53 // state of a feature
54 virtual FeatureState getState( const OUString& rCommand ) override;
55
56 // execute a feature
57 virtual void execute( const OUString& rCommand, const css::uno::Sequence< css::beans::PropertyValue>& rArgs ) override;
58
59 // all the features which should be handled by this class
60 virtual void describeSupportedFeatures() override;
61
62private:
63 void setInsertObj(SdrObjKind eObj);
65
66 bool parseCommandURL( const OUString& rCommandURL, ChartCommandID* pnFeatureId, OUString* pBaseCommand, OUString* pCustomShapeType );
67
70};
71
72} // namespace chart
73
74/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This is a CommandDispatch implementation for drawing objects.
virtual ~DrawCommandDispatch() override
virtual FeatureState getState(const OUString &rCommand) override
rtl::Reference< SdrObject > createDefaultObject(const ChartCommandID nID)
virtual void disposing(std::unique_lock< std::mutex > &rGuard) override
is called when this is disposed
DrawCommandDispatch(const css::uno::Reference< css::uno::XComponentContext > &rxContext, ChartController *pController)
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
void setLineEnds(SfxItemSet &rAttr)
ChartController * m_pChartController
void setAttributes(SdrObject *pObj)
void setInsertObj(SdrObjKind eObj)
virtual void describeSupportedFeatures() override
bool parseCommandURL(const OUString &rCommandURL, ChartCommandID *pnFeatureId, OUString *pBaseCommand, OUString *pCustomShapeType)
virtual void execute(const OUString &rCommand, const css::uno::Sequence< css::beans::PropertyValue > &rArgs) override
virtual bool isFeatureSupported(const OUString &rCommandURL) override
This is a base class for CommandDispatch implementations with feature support.
SdrObjKind