merge the formfield patch from ooo-build
[ooovba.git] / chart2 / source / model / inc / StockBar.hxx
blobc93ad048bf3bf7d6d8f12c98f1d0cdb3659be69f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: StockBar.hxx,v $
10 * $Revision: 1.4 $
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_STOCKBAR_HXX
31 #define CHART_STOCKBAR_HXX
33 #include <com/sun/star/util/XCloneable.hpp>
34 #include <com/sun/star/util/XModifyBroadcaster.hpp>
35 #include <com/sun/star/util/XModifyListener.hpp>
36 #include "MutexContainer.hxx"
37 #include "OPropertySet.hxx"
39 #include "ServiceMacros.hxx"
40 #include <cppuhelper/implbase3.hxx>
41 #include <comphelper/uno3.hxx>
43 namespace chart
46 namespace impl
48 typedef ::cppu::WeakImplHelper3<
49 ::com::sun::star::util::XCloneable,
50 ::com::sun::star::util::XModifyBroadcaster,
51 ::com::sun::star::util::XModifyListener >
52 StockBar_Base;
55 class StockBar :
56 public MutexContainer,
57 public impl::StockBar_Base,
58 public ::property::OPropertySet
60 public:
61 explicit StockBar( bool bRisingCourse );
62 virtual ~StockBar();
65 /// XServiceInfo declarations
66 APPHELPER_XSERVICEINFO_DECL()
68 /// merge XInterface implementations
69 DECLARE_XINTERFACE()
71 protected:
72 explicit StockBar( const StockBar & rOther );
74 // ____ OPropertySet ____
75 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
76 throw(::com::sun::star::beans::UnknownPropertyException);
78 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
80 // ____ XPropertySet ____
81 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
82 getPropertySetInfo()
83 throw (::com::sun::star::uno::RuntimeException);
86 // ____ XCloneable ____
87 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
88 throw (::com::sun::star::uno::RuntimeException);
90 // ____ XModifyBroadcaster ____
91 virtual void SAL_CALL addModifyListener(
92 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
93 throw (::com::sun::star::uno::RuntimeException);
94 virtual void SAL_CALL removeModifyListener(
95 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
96 throw (::com::sun::star::uno::RuntimeException);
98 // ____ XModifyListener ____
99 virtual void SAL_CALL modified(
100 const ::com::sun::star::lang::EventObject& aEvent )
101 throw (::com::sun::star::uno::RuntimeException);
103 // ____ XEventListener (base of XModifyListener) ____
104 virtual void SAL_CALL disposing(
105 const ::com::sun::star::lang::EventObject& Source )
106 throw (::com::sun::star::uno::RuntimeException);
108 // ____ OPropertySet ____
109 virtual void firePropertyChangeEvent();
110 using OPropertySet::disposing;
112 void fireModifyEvent();
114 private:
115 const bool m_bRisingCourse;
116 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
119 } // namespace chart
121 // CHART_STOCKBAR_HXX
122 #endif