fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / controller / main / DrawCommandDispatch.hxx
blobc1def595af56f24429e1ed737bd1d9a71e1f5caa
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 ::com::sun::star::uno::Reference<
38 ::com::sun::star::uno::XComponentContext >& rxContext, ChartController* pController );
39 virtual ~DrawCommandDispatch();
41 // late initialisation, especially for adding as listener
42 virtual void initialize() SAL_OVERRIDE;
44 virtual bool isFeatureSupported( const OUString& rCommandURL ) SAL_OVERRIDE;
46 void setAttributes( SdrObject* pObj );
47 void setLineEnds( SfxItemSet& rAttr );
49 protected:
50 // WeakComponentImplHelperBase
51 virtual void SAL_CALL disposing() SAL_OVERRIDE;
53 // XEventListener
54 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
55 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
57 // state of a feature
58 virtual FeatureState getState( const OUString& rCommand ) SAL_OVERRIDE;
60 // execute a feature
61 virtual void execute( const OUString& rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs ) SAL_OVERRIDE;
63 // all the features which should be handled by this class
64 virtual void describeSupportedFeatures() SAL_OVERRIDE;
66 private:
67 void setInsertObj( sal_uInt16 eObj );
68 SdrObject* createDefaultObject( const sal_uInt16 nID );
70 bool parseCommandURL( const OUString& rCommandURL, sal_uInt16* pnFeatureId, OUString* pBaseCommand, OUString* pCustomShapeType );
72 ChartController* m_pChartController;
73 OUString m_aCustomShapeType;
76 } // namespace chart
78 // INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_DRAWCOMMANDDISPATCH_HXX
79 #endif
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */