Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / controller / main / DrawCommandDispatch.hxx
blob7df47171a79e9fccd439b833ed95eef68bb98a6e
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_CHART2_SOURCE_CONTROLLER_MAIN_DRAWCOMMANDDISPATCH_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_DRAWCOMMANDDISPATCH_HXX
22 #include "FeatureCommandDispatchBase.hxx"
24 class SfxItemSet;
25 class SdrObject;
27 namespace chart
30 class ChartController;
32 /** This is a CommandDispatch implementation for drawing objects.
34 class DrawCommandDispatch: public FeatureCommandDispatchBase
36 public:
37 DrawCommandDispatch( const css::uno::Reference< css::uno::XComponentContext >& rxContext, ChartController* pController );
38 virtual ~DrawCommandDispatch() override;
40 virtual bool isFeatureSupported( const OUString& rCommandURL ) override;
42 void setAttributes( SdrObject* pObj );
43 void setLineEnds( SfxItemSet& rAttr );
45 protected:
46 // WeakComponentImplHelperBase
47 virtual void SAL_CALL disposing() override;
49 // XEventListener
50 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
52 // state of a feature
53 virtual FeatureState getState( const OUString& rCommand ) override;
55 // execute a feature
56 virtual void execute( const OUString& rCommand, const css::uno::Sequence< css::beans::PropertyValue>& rArgs ) override;
58 // all the features which should be handled by this class
59 virtual void describeSupportedFeatures() override;
61 private:
62 void setInsertObj( sal_uInt16 eObj );
63 SdrObject* createDefaultObject( const sal_uInt16 nID );
65 bool parseCommandURL( const OUString& rCommandURL, sal_uInt16* pnFeatureId, OUString* pBaseCommand, OUString* pCustomShapeType );
67 ChartController* m_pChartController;
68 OUString m_aCustomShapeType;
71 } // namespace chart
73 // INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_DRAWCOMMANDDISPATCH_HXX
74 #endif
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */