merged tag ooo/OOO330_m14
[LibreOffice.git] / chart2 / source / model / main / GridProperties.hxx
blob1c0ae0ed849aa5502af7223d9236906d3b856bd6
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_GRIDPROPERTIES_HXX
28 #define CHART_GRIDPROPERTIES_HXX
30 #include "ServiceMacros.hxx"
31 #include <osl/mutex.hxx>
32 #include <cppuhelper/implbase4.hxx>
33 #include <comphelper/uno3.hxx>
34 #include <com/sun/star/lang/XServiceInfo.hpp>
35 #include <com/sun/star/uno/XComponentContext.hpp>
36 #include <com/sun/star/util/XCloneable.hpp>
37 #include <com/sun/star/util/XModifyBroadcaster.hpp>
38 #include <com/sun/star/util/XModifyListener.hpp>
40 #include "OPropertySet.hxx"
41 #include "MutexContainer.hxx"
42 #include "ModifyListenerHelper.hxx"
44 namespace chart
47 namespace impl
49 typedef ::cppu::WeakImplHelper4<
50 ::com::sun::star::lang::XServiceInfo,
51 ::com::sun::star::util::XCloneable,
52 ::com::sun::star::util::XModifyBroadcaster,
53 ::com::sun::star::util::XModifyListener >
54 GridProperties_Base;
57 class GridProperties :
58 public MutexContainer,
59 public impl::GridProperties_Base,
60 public ::property::OPropertySet
62 public:
63 GridProperties( ::com::sun::star::uno::Reference<
64 ::com::sun::star::uno::XComponentContext > const & xContext );
65 explicit GridProperties();
66 virtual ~GridProperties();
68 /// establish methods for factory instatiation
69 APPHELPER_SERVICE_FACTORY_HELPER( GridProperties )
71 /// XServiceInfo declarations
72 APPHELPER_XSERVICEINFO_DECL()
74 /// merge XInterface implementations
75 DECLARE_XINTERFACE()
76 /// merge XTypeProvider implementations
77 DECLARE_XTYPEPROVIDER()
79 protected:
80 explicit GridProperties( const GridProperties & rOther );
82 // ____ OPropertySet ____
83 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
84 throw(::com::sun::star::beans::UnknownPropertyException);
86 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
88 // ____ XPropertySet ____
89 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
90 getPropertySetInfo()
91 throw (::com::sun::star::uno::RuntimeException);
93 // ____ XCloneable ____
94 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
95 throw (::com::sun::star::uno::RuntimeException);
97 // ____ XModifyBroadcaster ____
98 virtual void SAL_CALL addModifyListener(
99 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
100 throw (::com::sun::star::uno::RuntimeException);
101 virtual void SAL_CALL removeModifyListener(
102 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
103 throw (::com::sun::star::uno::RuntimeException);
105 // ____ XModifyListener ____
106 virtual void SAL_CALL modified(
107 const ::com::sun::star::lang::EventObject& aEvent )
108 throw (::com::sun::star::uno::RuntimeException);
110 // ____ XEventListener (base of XModifyListener) ____
111 virtual void SAL_CALL disposing(
112 const ::com::sun::star::lang::EventObject& Source )
113 throw (::com::sun::star::uno::RuntimeException);
115 // ____ OPropertySet ____
116 virtual void firePropertyChangeEvent();
117 using OPropertySet::disposing;
119 void fireModifyEvent();
121 private:
122 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
125 } // namespace chart
127 // CHART_GRIDPROPERTIES_HXX
128 #endif