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 CHART_AREAWRAPPER_HXX 24 #define CHART_AREAWRAPPER_HXX 25 26 #include "WrappedPropertySet.hxx" 27 #include "ServiceMacros.hxx" 28 #include <cppuhelper/implbase3.hxx> 29 #include <comphelper/uno3.hxx> 30 #include <cppuhelper/interfacecontainer.hxx> 31 #include <com/sun/star/drawing/XShape.hpp> 32 #include <com/sun/star/lang/XComponent.hpp> 33 #include <com/sun/star/lang/XServiceInfo.hpp> 34 #include <com/sun/star/chart2/XChartDocument.hpp> 35 #include <com/sun/star/uno/XComponentContext.hpp> 36 37 #include <boost/shared_ptr.hpp> 38 39 namespace chart 40 { 41 42 namespace wrapper 43 { 44 45 class Chart2ModelContact; 46 47 class AreaWrapper : public ::cppu::ImplInheritanceHelper3< 48 WrappedPropertySet 49 , com::sun::star::drawing::XShape 50 , com::sun::star::lang::XComponent 51 , com::sun::star::lang::XServiceInfo 52 > 53 { 54 public: 55 AreaWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact ); 56 virtual ~AreaWrapper(); 57 58 /// XServiceInfo declarations 59 APPHELPER_XSERVICEINFO_DECL() 60 61 // ____ XShape ____ 62 virtual ::com::sun::star::awt::Point SAL_CALL getPosition(); 63 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ); 64 virtual ::com::sun::star::awt::Size SAL_CALL getSize(); 65 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ); 66 67 // ____ XShapeDescriptor (base of XShape) ____ 68 virtual ::rtl::OUString SAL_CALL getShapeType(); 69 70 // ____ XComponent ____ 71 virtual void SAL_CALL dispose(); 72 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< 73 ::com::sun::star::lang::XEventListener >& xListener ); 74 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< 75 ::com::sun::star::lang::XEventListener >& aListener ); 76 77 protected: 78 // ____ WrappedPropertySet ____ 79 virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& getPropertySequence(); 80 virtual const std::vector< WrappedProperty* > createWrappedProperties(); 81 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getInnerPropertySet(); 82 83 private: 84 ::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact; 85 ::cppu::OInterfaceContainerHelper m_aEventListenerContainer; 86 }; 87 88 } // namespace wrapper 89 } // namespace chart 90 91 // CHART_AREAWRAPPER_HXX 92 #endif 93