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