1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef CHART_AREAWRAPPER_HXX
28 #define CHART_AREAWRAPPER_HXX
29 
30 #include "WrappedPropertySet.hxx"
31 #include "ServiceMacros.hxx"
32 #include <cppuhelper/implbase3.hxx>
33 #include <comphelper/uno3.hxx>
34 #include <cppuhelper/interfacecontainer.hxx>
35 #include <com/sun/star/drawing/XShape.hpp>
36 #include <com/sun/star/lang/XComponent.hpp>
37 #include <com/sun/star/lang/XServiceInfo.hpp>
38 #include <com/sun/star/chart2/XChartDocument.hpp>
39 #include <com/sun/star/uno/XComponentContext.hpp>
40 
41 #include <boost/shared_ptr.hpp>
42 
43 namespace chart
44 {
45 
46 namespace wrapper
47 {
48 
49 class Chart2ModelContact;
50 
51 class AreaWrapper : public ::cppu::ImplInheritanceHelper3<
52                       WrappedPropertySet
53                     , com::sun::star::drawing::XShape
54                     , com::sun::star::lang::XComponent
55                     , com::sun::star::lang::XServiceInfo
56                     >
57 {
58 public:
59     AreaWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
60 	virtual ~AreaWrapper();
61 
62     /// XServiceInfo declarations
63     APPHELPER_XSERVICEINFO_DECL()
64 
65     // ____ XShape ____
66     virtual ::com::sun::star::awt::Point SAL_CALL getPosition()
67         throw (::com::sun::star::uno::RuntimeException);
68     virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition )
69         throw (::com::sun::star::uno::RuntimeException);
70     virtual ::com::sun::star::awt::Size SAL_CALL getSize()
71         throw (::com::sun::star::uno::RuntimeException);
72     virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize )
73         throw (::com::sun::star::beans::PropertyVetoException,
74                ::com::sun::star::uno::RuntimeException);
75 
76     // ____ XShapeDescriptor (base of XShape) ____
77     virtual ::rtl::OUString SAL_CALL getShapeType()
78         throw (::com::sun::star::uno::RuntimeException);
79 
80     // ____ XComponent ____
81     virtual void SAL_CALL dispose()
82         throw (::com::sun::star::uno::RuntimeException);
83     virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference<
84                                             ::com::sun::star::lang::XEventListener >& xListener )
85         throw (::com::sun::star::uno::RuntimeException);
86     virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference<
87                                                ::com::sun::star::lang::XEventListener >& aListener )
88         throw (::com::sun::star::uno::RuntimeException);
89 
90 protected:
91     // ____ WrappedPropertySet ____
92     virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& getPropertySequence();
93     virtual const std::vector< WrappedProperty* > createWrappedProperties();
94     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getInnerPropertySet();
95 
96 private:
97     ::boost::shared_ptr< Chart2ModelContact >   m_spChart2ModelContact;
98 	::cppu::OInterfaceContainerHelper           m_aEventListenerContainer;
99 };
100 
101 } //  namespace wrapper
102 } //  namespace chart
103 
104 // CHART_AREAWRAPPER_HXX
105 #endif
106