update dev300-m58
[ooovba.git] / chart2 / source / inc / ErrorBar.hxx
blob81293a8499c93d4f00cda8e9e538141e72faca60
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: ErrorBar.hxx,v $
10 * $Revision: 1.7 $
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 CHART2_ERRORBAR_HXX
31 #define CHART2_ERRORBAR_HXX
33 #include "MutexContainer.hxx"
34 #include "OPropertySet.hxx"
35 #include "ServiceMacros.hxx"
36 #include "ModifyListenerHelper.hxx"
37 #include "charttoolsdllapi.hxx"
39 #include <cppuhelper/implbase6.hxx>
40 #include <comphelper/uno3.hxx>
42 #include <com/sun/star/uno/XComponentContext.hpp>
43 #include <com/sun/star/lang/XServiceInfo.hpp>
44 #include <com/sun/star/lang/XServiceName.hpp>
45 #include <com/sun/star/util/XCloneable.hpp>
46 #include <com/sun/star/container/XChild.hpp>
47 #include <com/sun/star/chart2/data/XDataSink.hpp>
48 #include <com/sun/star/chart2/data/XDataSource.hpp>
50 namespace chart
53 OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createErrorBar(
54 const ::com::sun::star::uno::Reference<
55 ::com::sun::star::uno::XComponentContext > & xContext );
57 namespace impl
59 typedef ::cppu::WeakImplHelper6<
60 ::com::sun::star::lang::XServiceInfo,
61 ::com::sun::star::util::XCloneable,
62 ::com::sun::star::util::XModifyBroadcaster,
63 ::com::sun::star::util::XModifyListener,
64 ::com::sun::star::chart2::data::XDataSource,
65 ::com::sun::star::chart2::data::XDataSink >
66 ErrorBar_Base;
69 class ErrorBar :
70 public MutexContainer,
71 public impl::ErrorBar_Base,
72 public ::property::OPropertySet
74 public:
75 explicit ErrorBar(
76 const ::com::sun::star::uno::Reference<
77 ::com::sun::star::uno::XComponentContext > & xContext );
78 virtual ~ErrorBar();
80 /// XServiceInfo declarations
81 APPHELPER_XSERVICEINFO_DECL()
82 /// establish methods for factory instatiation
83 APPHELPER_SERVICE_FACTORY_HELPER( ErrorBar )
85 /// merge XInterface implementations
86 DECLARE_XINTERFACE()
87 /// merge XTypeProvider implementations
88 DECLARE_XTYPEPROVIDER()
90 protected:
91 ErrorBar( const ErrorBar & rOther );
93 // ____ OPropertySet ____
94 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
95 throw(::com::sun::star::beans::UnknownPropertyException);
96 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
97 using OPropertySet::disposing;
99 // ____ XPropertySet ____
100 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
101 getPropertySetInfo()
102 throw (::com::sun::star::uno::RuntimeException);
104 // ____ XCloneable ____
105 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
106 throw (::com::sun::star::uno::RuntimeException);
108 // ____ XModifyBroadcaster ____
109 virtual void SAL_CALL addModifyListener(
110 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
111 throw (::com::sun::star::uno::RuntimeException);
112 virtual void SAL_CALL removeModifyListener(
113 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
114 throw (::com::sun::star::uno::RuntimeException);
116 // ____ XModifyListener ____
117 virtual void SAL_CALL modified(
118 const ::com::sun::star::lang::EventObject& aEvent )
119 throw (::com::sun::star::uno::RuntimeException);
121 // ____ XEventListener (base of XModifyListener) ____
122 virtual void SAL_CALL disposing(
123 const ::com::sun::star::lang::EventObject& Source )
124 throw (::com::sun::star::uno::RuntimeException);
126 // ____ XDataSink ____
127 virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > >& aData )
128 throw (::com::sun::star::uno::RuntimeException);
130 // ____ XDataSource ____
131 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences()
132 throw (::com::sun::star::uno::RuntimeException);
134 // ____ XChild ____
135 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent()
136 throw (::com::sun::star::uno::RuntimeException);
137 virtual void SAL_CALL setParent(
138 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent )
139 throw (::com::sun::star::lang::NoSupportException,
140 ::com::sun::star::uno::RuntimeException);
142 // ____ OPropertySet ____
143 virtual void firePropertyChangeEvent();
145 void fireModifyEvent();
147 private:
148 ::com::sun::star::uno::Reference<
149 ::com::sun::star::uno::XComponentContext >
150 m_xContext;
152 typedef ::std::vector< ::com::sun::star::uno::Reference<
153 ::com::sun::star::chart2::data::XLabeledDataSequence > > tDataSequenceContainer;
154 tDataSequenceContainer m_aDataSequences;
156 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
157 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
160 } // namespace chart
162 // CHART2_ERRORBAR_HXX
163 #endif