xref: /trunk/main/chart2/source/controller/main/ShapeController.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef CHART2_SHAPECONTROLLER_HXX
24 #define CHART2_SHAPECONTROLLER_HXX
25 
26 #include "FeatureCommandDispatchBase.hxx"
27 #include <tools/link.hxx>
28 
29 class AbstractSvxNameDialog;
30 class SdrObject;
31 
32 //.............................................................................
33 namespace chart
34 {
35 //.............................................................................
36 
37 class ChartController;
38 
39 /** This is a CommandDispatch implementation for shapes.
40  */
41 class ShapeController: public FeatureCommandDispatchBase
42 {
43     friend class ControllerCommandDispatch;
44 
45 public:
46     ShapeController( const ::com::sun::star::uno::Reference<
47         ::com::sun::star::uno::XComponentContext >& rxContext, ChartController* pController );
48     virtual ~ShapeController();
49 
50     // late initialisation, especially for adding as listener
51     virtual void initialize();
52 
53 protected:
54     // WeakComponentImplHelperBase
55     virtual void SAL_CALL disposing();
56 
57     // XEventListener
58     virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source );
59 
60     // state of a feature
61     virtual FeatureState getState( const ::rtl::OUString& rCommand );
62 
63     // execute a feature
64     virtual void execute( const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs );
65 
66     // all the features which should be handled by this class
67     virtual void describeSupportedFeatures();
68 
69 private:
70     DECL_LINK( CheckNameHdl, AbstractSvxNameDialog* );
71 
72     void executeDispatch_FormatLine();
73     void executeDispatch_FormatArea();
74     void executeDispatch_TextAttributes();
75     void executeDispatch_TransformDialog();
76     void executeDispatch_ObjectTitleDescription();
77     void executeDispatch_RenameObject();
78     void executeDispatch_ChangeZOrder( sal_uInt16 nId );
79     void executeDispatch_FontDialog();
80     void executeDispatch_ParagraphDialog();
81 
82     SdrObject* getFirstAdditionalShape();
83     SdrObject* getLastAdditionalShape();
84     bool       isBackwardPossible();
85     bool       isForwardPossible();
86 
87     ChartController* m_pChartController;
88 };
89 
90 //.............................................................................
91 } //  namespace chart
92 //.............................................................................
93 
94 // CHART2_SHAPECONTROLLER_HXX
95 #endif
96