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 24 #ifndef _ENHANCED_CUSTOMSHAPE_HANDLE_HXX 25 #define _ENHANCED_CUSTOMSHAPE_HANDLE_HXX 26 27 #include <com/sun/star/uno/RuntimeException.hpp> 28 #include <cppuhelper/implbase2.hxx> 29 #include <com/sun/star/lang/XInitialization.hpp> 30 #include <com/sun/star/lang/XServiceInfo.hpp> 31 #include <com/sun/star/drawing/XShape.hpp> 32 #include <com/sun/star/drawing/XCustomShapeHandle.hpp> 33 #include <com/sun/star/awt/Point.hpp> 34 #include <cppuhelper/weakref.hxx> 35 36 class EnhancedCustomShapeHandle : public cppu::WeakImplHelper2 37 < 38 com::sun::star::drawing::XCustomShapeHandle, 39 com::sun::star::lang::XInitialization 40 > 41 { 42 sal_uInt32 mnIndex; 43 com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxCustomShape; 44 45 public: 46 47 EnhancedCustomShapeHandle( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xCustomShape, sal_uInt32 nIndex ); 48 virtual ~EnhancedCustomShapeHandle(); 49 50 // XInterface 51 virtual void SAL_CALL acquire() throw(); 52 virtual void SAL_CALL release() throw(); 53 54 // XCustomShapeHandle 55 virtual com::sun::star::awt::Point SAL_CALL getPosition() 56 throw ( com::sun::star::uno::RuntimeException ); 57 virtual void SAL_CALL setControllerPosition( const com::sun::star::awt::Point& ) 58 throw ( com::sun::star::uno::RuntimeException ); 59 60 // XInitialization 61 virtual void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments ) 62 throw ( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException ); 63 }; 64 65 #endif 66