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 throw (::com::sun::star::uno::RuntimeException); 60 61 // state of a feature 62 virtual FeatureState getState( const ::rtl::OUString& rCommand ); 63 64 // execute a feature 65 virtual void execute( const ::rtl::OUString& rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rArgs ); 66 67 // all the features which should be handled by this class 68 virtual void describeSupportedFeatures(); 69 70 private: 71 DECL_LINK( CheckNameHdl, AbstractSvxNameDialog* ); 72 73 void executeDispatch_FormatLine(); 74 void executeDispatch_FormatArea(); 75 void executeDispatch_TextAttributes(); 76 void executeDispatch_TransformDialog(); 77 void executeDispatch_ObjectTitleDescription(); 78 void executeDispatch_RenameObject(); 79 void executeDispatch_ChangeZOrder( sal_uInt16 nId ); 80 void executeDispatch_FontDialog(); 81 void executeDispatch_ParagraphDialog(); 82 83 SdrObject* getFirstAdditionalShape(); 84 SdrObject* getLastAdditionalShape(); 85 bool isBackwardPossible(); 86 bool isForwardPossible(); 87 88 ChartController* m_pChartController; 89 }; 90 91 //............................................................................. 92 } // namespace chart 93 //............................................................................. 94 95 // CHART2_SHAPECONTROLLER_HXX 96 #endif 97