merged tag ooo/OOO330_m14
[LibreOffice.git] / chart2 / source / controller / chartapiwrapper / GridWrapper.hxx
blobc731b6c2266644510e5e8cef57d48915db6e2a79
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef CHART_GRIDWRAPPER_HXX
28 #define CHART_GRIDWRAPPER_HXX
30 #include "WrappedPropertySet.hxx"
31 #include "ServiceMacros.hxx"
32 #include <cppuhelper/implbase2.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/XDiagram.hpp>
39 #include <com/sun/star/uno/XComponentContext.hpp>
41 #include <boost/shared_ptr.hpp>
43 namespace chart
46 namespace wrapper
49 class Chart2ModelContact;
51 class GridWrapper : public ::cppu::ImplInheritanceHelper2<
52 WrappedPropertySet
53 , com::sun::star::lang::XComponent
54 , com::sun::star::lang::XServiceInfo
57 public:
58 enum tGridType
60 X_MAIN_GRID,
61 Y_MAIN_GRID,
62 Z_MAIN_GRID,
63 X_SUB_GRID,
64 Y_SUB_GRID,
65 Z_SUB_GRID
68 GridWrapper( tGridType eType, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
69 virtual ~GridWrapper();
71 static void getDimensionAndSubGridBool( tGridType eType, sal_Int32& rnDimensionIndex, bool& rbSubGrid );
73 /// XServiceInfo declarations
74 APPHELPER_XSERVICEINFO_DECL()
76 // ____ XComponent ____
77 virtual void SAL_CALL dispose()
78 throw (::com::sun::star::uno::RuntimeException);
79 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference<
80 ::com::sun::star::lang::XEventListener >& xListener )
81 throw (::com::sun::star::uno::RuntimeException);
82 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference<
83 ::com::sun::star::lang::XEventListener >& aListener )
84 throw (::com::sun::star::uno::RuntimeException);
86 protected:
87 // ____ WrappedPropertySet ____
88 virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& getPropertySequence();
89 virtual const std::vector< WrappedProperty* > createWrappedProperties();
90 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getInnerPropertySet();
92 private:
93 ::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
94 ::cppu::OInterfaceContainerHelper m_aEventListenerContainer;
96 tGridType m_eType;
99 } // namespace wrapper
100 } // namespace chart
102 // CHART_GRIDWRAPPER_HXX
103 #endif