Bump for 3.6-28
[LibreOffice.git] / chart2 / source / controller / main / DrawCommandDispatch.hxx
blob6ac74e052c10bc55658f6dc28ae456589b2e1b50
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef CHART2_DRAWCOMMANDDISPATCH_HXX
29 #define CHART2_DRAWCOMMANDDISPATCH_HXX
31 #include "FeatureCommandDispatchBase.hxx"
33 #include <tools/solar.h>
35 class SfxItemSet;
36 class SdrObject;
38 //.............................................................................
39 namespace chart
41 //.............................................................................
43 class ChartController;
45 /** This is a CommandDispatch implementation for drawing objects.
47 class DrawCommandDispatch: public FeatureCommandDispatchBase
49 public:
50 DrawCommandDispatch( const ::com::sun::star::uno::Reference<
51 ::com::sun::star::uno::XComponentContext >& rxContext, ChartController* pController );
52 virtual ~DrawCommandDispatch();
54 // late initialisation, especially for adding as listener
55 virtual void initialize();
57 virtual bool isFeatureSupported( const ::rtl::OUString& rCommandURL );
59 void setAttributes( SdrObject* pObj );
60 void setLineEnds( SfxItemSet& rAttr );
62 protected:
63 // WeakComponentImplHelperBase
64 virtual void SAL_CALL disposing();
66 // XEventListener
67 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
68 throw (::com::sun::star::uno::RuntimeException);
70 // state of a feature
71 virtual FeatureState getState( const ::rtl::OUString& rCommand );
73 // execute a feature
74 virtual void execute( const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs );
76 // all the features which should be handled by this class
77 virtual void describeSupportedFeatures();
79 private:
80 void setInsertObj( sal_uInt16 eObj );
81 SdrObject* createDefaultObject( const sal_uInt16 nID );
83 bool parseCommandURL( const ::rtl::OUString& rCommandURL, sal_uInt16* pnFeatureId, ::rtl::OUString* pBaseCommand, ::rtl::OUString* pCustomShapeType );
85 ChartController* m_pChartController;
86 ::rtl::OUString m_aCustomShapeType;
89 //.............................................................................
90 } // namespace chart
91 //.............................................................................
93 // CHART2_DRAWCOMMANDDISPATCH_HXX
94 #endif
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */