xref: /aoo41x/main/chart2/source/tools/ErrorBar.cxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_chart2.hxx"
30*cdf0e10cSrcweir #include "ErrorBar.hxx"
31*cdf0e10cSrcweir #include "macros.hxx"
32*cdf0e10cSrcweir #include "LineProperties.hxx"
33*cdf0e10cSrcweir #include "ContainerHelper.hxx"
34*cdf0e10cSrcweir #include "EventListenerHelper.hxx"
35*cdf0e10cSrcweir #include "PropertyHelper.hxx"
36*cdf0e10cSrcweir #include "CloneHelper.hxx"
37*cdf0e10cSrcweir 
38*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
39*cdf0e10cSrcweir #include <com/sun/star/chart/ErrorBarStyle.hpp>
40*cdf0e10cSrcweir 
41*cdf0e10cSrcweir #include <rtl/math.hxx>
42*cdf0e10cSrcweir #include <rtl/ustrbuf.hxx>
43*cdf0e10cSrcweir 
44*cdf0e10cSrcweir using namespace ::com::sun::star;
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir using ::rtl::OUString;
47*cdf0e10cSrcweir using ::rtl::OUStringBuffer;
48*cdf0e10cSrcweir using ::com::sun::star::beans::Property;
49*cdf0e10cSrcweir using ::osl::MutexGuard;
50*cdf0e10cSrcweir 
51*cdf0e10cSrcweir namespace
52*cdf0e10cSrcweir {
53*cdf0e10cSrcweir static const OUString lcl_aServiceName(
54*cdf0e10cSrcweir     RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.ErrorBar" ));
55*cdf0e10cSrcweir 
56*cdf0e10cSrcweir enum
57*cdf0e10cSrcweir {
58*cdf0e10cSrcweir     PROP_ERROR_BAR_STYLE,
59*cdf0e10cSrcweir     PROP_ERROR_BAR_POS_ERROR,
60*cdf0e10cSrcweir     PROP_ERROR_BAR_NEG_ERROR,
61*cdf0e10cSrcweir     PROP_ERROR_BAR_WEIGHT,
62*cdf0e10cSrcweir     PROP_ERROR_BAR_SHOW_POS_ERROR,
63*cdf0e10cSrcweir     PROP_ERROR_BAR_SHOW_NEG_ERROR
64*cdf0e10cSrcweir };
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir void lcl_AddPropertiesToVector(
67*cdf0e10cSrcweir     ::std::vector< Property > & rOutProperties )
68*cdf0e10cSrcweir {
69*cdf0e10cSrcweir     rOutProperties.push_back(
70*cdf0e10cSrcweir         Property( C2U( "ErrorBarStyle" ),
71*cdf0e10cSrcweir                   PROP_ERROR_BAR_STYLE,
72*cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< sal_Int32 * >(0)),
73*cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
74*cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
75*cdf0e10cSrcweir 
76*cdf0e10cSrcweir     rOutProperties.push_back(
77*cdf0e10cSrcweir         Property( C2U( "PositiveError" ),
78*cdf0e10cSrcweir                   PROP_ERROR_BAR_POS_ERROR,
79*cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const double * >(0)),
80*cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
81*cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
82*cdf0e10cSrcweir     rOutProperties.push_back(
83*cdf0e10cSrcweir         Property( C2U( "NegativeError" ),
84*cdf0e10cSrcweir                   PROP_ERROR_BAR_NEG_ERROR,
85*cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const double * >(0)),
86*cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
87*cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
88*cdf0e10cSrcweir 
89*cdf0e10cSrcweir     rOutProperties.push_back(
90*cdf0e10cSrcweir         Property( C2U( "Weight" ),
91*cdf0e10cSrcweir                   PROP_ERROR_BAR_WEIGHT,
92*cdf0e10cSrcweir                   ::getCppuType( reinterpret_cast< const double * >(0)),
93*cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
94*cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
95*cdf0e10cSrcweir 
96*cdf0e10cSrcweir     rOutProperties.push_back(
97*cdf0e10cSrcweir         Property( C2U( "ShowPositiveError" ),
98*cdf0e10cSrcweir                   PROP_ERROR_BAR_SHOW_POS_ERROR,
99*cdf0e10cSrcweir                   ::getBooleanCppuType(),
100*cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
101*cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
102*cdf0e10cSrcweir     rOutProperties.push_back(
103*cdf0e10cSrcweir         Property( C2U( "ShowNegativeError" ),
104*cdf0e10cSrcweir                   PROP_ERROR_BAR_SHOW_NEG_ERROR,
105*cdf0e10cSrcweir                   ::getBooleanCppuType(),
106*cdf0e10cSrcweir                   beans::PropertyAttribute::BOUND
107*cdf0e10cSrcweir                   | beans::PropertyAttribute::MAYBEDEFAULT ));
108*cdf0e10cSrcweir }
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir struct StaticErrorBarDefaults_Initializer
111*cdf0e10cSrcweir {
112*cdf0e10cSrcweir     ::chart::tPropertyValueMap* operator()()
113*cdf0e10cSrcweir     {
114*cdf0e10cSrcweir         static ::chart::tPropertyValueMap aStaticDefaults;
115*cdf0e10cSrcweir         lcl_AddDefaultsToMap( aStaticDefaults );
116*cdf0e10cSrcweir         return &aStaticDefaults;
117*cdf0e10cSrcweir     }
118*cdf0e10cSrcweir private:
119*cdf0e10cSrcweir     void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
120*cdf0e10cSrcweir     {
121*cdf0e10cSrcweir         ::chart::LineProperties::AddDefaultsToMap( rOutMap );
122*cdf0e10cSrcweir 
123*cdf0e10cSrcweir         ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_ERROR_BAR_STYLE, ::com::sun::star::chart::ErrorBarStyle::NONE );
124*cdf0e10cSrcweir         ::chart::PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_ERROR_BAR_POS_ERROR, 0.0 );
125*cdf0e10cSrcweir         ::chart::PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_ERROR_BAR_NEG_ERROR, 0.0 );
126*cdf0e10cSrcweir         ::chart::PropertyHelper::setPropertyValueDefault< double >( rOutMap, PROP_ERROR_BAR_WEIGHT, 1.0 );
127*cdf0e10cSrcweir         ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_ERROR_BAR_SHOW_POS_ERROR, true );
128*cdf0e10cSrcweir         ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_ERROR_BAR_SHOW_NEG_ERROR, true );
129*cdf0e10cSrcweir     }
130*cdf0e10cSrcweir };
131*cdf0e10cSrcweir 
132*cdf0e10cSrcweir struct StaticErrorBarDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticErrorBarDefaults_Initializer >
133*cdf0e10cSrcweir {
134*cdf0e10cSrcweir };
135*cdf0e10cSrcweir 
136*cdf0e10cSrcweir struct StaticErrorBarInfoHelper_Initializer
137*cdf0e10cSrcweir {
138*cdf0e10cSrcweir     ::cppu::OPropertyArrayHelper* operator()()
139*cdf0e10cSrcweir     {
140*cdf0e10cSrcweir         static ::cppu::OPropertyArrayHelper aPropHelper( lcl_GetPropertySequence() );
141*cdf0e10cSrcweir         return &aPropHelper;
142*cdf0e10cSrcweir     }
143*cdf0e10cSrcweir 
144*cdf0e10cSrcweir private:
145*cdf0e10cSrcweir     uno::Sequence< Property > lcl_GetPropertySequence()
146*cdf0e10cSrcweir     {
147*cdf0e10cSrcweir         ::std::vector< ::com::sun::star::beans::Property > aProperties;
148*cdf0e10cSrcweir         lcl_AddPropertiesToVector( aProperties );
149*cdf0e10cSrcweir         ::chart::LineProperties::AddPropertiesToVector( aProperties );
150*cdf0e10cSrcweir 
151*cdf0e10cSrcweir         ::std::sort( aProperties.begin(), aProperties.end(),
152*cdf0e10cSrcweir                      ::chart::PropertyNameLess() );
153*cdf0e10cSrcweir 
154*cdf0e10cSrcweir         return ::chart::ContainerHelper::ContainerToSequence( aProperties );
155*cdf0e10cSrcweir     }
156*cdf0e10cSrcweir 
157*cdf0e10cSrcweir };
158*cdf0e10cSrcweir 
159*cdf0e10cSrcweir struct StaticErrorBarInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticErrorBarInfoHelper_Initializer >
160*cdf0e10cSrcweir {
161*cdf0e10cSrcweir };
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir struct StaticErrorBarInfo_Initializer
164*cdf0e10cSrcweir {
165*cdf0e10cSrcweir     uno::Reference< beans::XPropertySetInfo >* operator()()
166*cdf0e10cSrcweir     {
167*cdf0e10cSrcweir         static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
168*cdf0e10cSrcweir             ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticErrorBarInfoHelper::get() ) );
169*cdf0e10cSrcweir         return &xPropertySetInfo;
170*cdf0e10cSrcweir     }
171*cdf0e10cSrcweir };
172*cdf0e10cSrcweir 
173*cdf0e10cSrcweir struct StaticErrorBarInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticErrorBarInfo_Initializer >
174*cdf0e10cSrcweir {
175*cdf0e10cSrcweir };
176*cdf0e10cSrcweir 
177*cdf0e10cSrcweir bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq )
178*cdf0e10cSrcweir {
179*cdf0e10cSrcweir     uno::Reference< lang::XServiceInfo > xServiceInfo( xLSeq, uno::UNO_QUERY );
180*cdf0e10cSrcweir     return ( xServiceInfo.is() && xServiceInfo->getImplementationName().equalsAsciiL(
181*cdf0e10cSrcweir                  RTL_CONSTASCII_STRINGPARAM("com.sun.star.comp.chart2.LabeledDataSequence")));
182*cdf0e10cSrcweir }
183*cdf0e10cSrcweir 
184*cdf0e10cSrcweir } // anonymous namespace
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir namespace chart
187*cdf0e10cSrcweir {
188*cdf0e10cSrcweir 
189*cdf0e10cSrcweir uno::Reference< beans::XPropertySet > createErrorBar( const uno::Reference< uno::XComponentContext > & xContext )
190*cdf0e10cSrcweir {
191*cdf0e10cSrcweir     return new ErrorBar( xContext );
192*cdf0e10cSrcweir }
193*cdf0e10cSrcweir 
194*cdf0e10cSrcweir ErrorBar::ErrorBar(
195*cdf0e10cSrcweir     uno::Reference< uno::XComponentContext > const & xContext ) :
196*cdf0e10cSrcweir         ::property::OPropertySet( m_aMutex ),
197*cdf0e10cSrcweir     m_xContext( xContext ),
198*cdf0e10cSrcweir     m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
199*cdf0e10cSrcweir {}
200*cdf0e10cSrcweir 
201*cdf0e10cSrcweir ErrorBar::ErrorBar( const ErrorBar & rOther ) :
202*cdf0e10cSrcweir         MutexContainer(),
203*cdf0e10cSrcweir         impl::ErrorBar_Base(),
204*cdf0e10cSrcweir         ::property::OPropertySet( rOther, m_aMutex ),
205*cdf0e10cSrcweir     m_xContext( rOther.m_xContext ),
206*cdf0e10cSrcweir     m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
207*cdf0e10cSrcweir {
208*cdf0e10cSrcweir     if( ! rOther.m_aDataSequences.empty())
209*cdf0e10cSrcweir     {
210*cdf0e10cSrcweir         if( lcl_isInternalData( rOther.m_aDataSequences.front()))
211*cdf0e10cSrcweir             CloneHelper::CloneRefVector< tDataSequenceContainer::value_type >(
212*cdf0e10cSrcweir                 rOther.m_aDataSequences, m_aDataSequences );
213*cdf0e10cSrcweir         else
214*cdf0e10cSrcweir             m_aDataSequences = rOther.m_aDataSequences;
215*cdf0e10cSrcweir         ModifyListenerHelper::addListenerToAllElements( m_aDataSequences, m_xModifyEventForwarder );
216*cdf0e10cSrcweir     }
217*cdf0e10cSrcweir }
218*cdf0e10cSrcweir 
219*cdf0e10cSrcweir ErrorBar::~ErrorBar()
220*cdf0e10cSrcweir {}
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir uno::Reference< util::XCloneable > SAL_CALL ErrorBar::createClone()
223*cdf0e10cSrcweir     throw (uno::RuntimeException)
224*cdf0e10cSrcweir {
225*cdf0e10cSrcweir     return uno::Reference< util::XCloneable >( new ErrorBar( *this ));
226*cdf0e10cSrcweir }
227*cdf0e10cSrcweir 
228*cdf0e10cSrcweir // ================================================================================
229*cdf0e10cSrcweir 
230*cdf0e10cSrcweir // ____ OPropertySet ____
231*cdf0e10cSrcweir uno::Any ErrorBar::GetDefaultValue( sal_Int32 nHandle ) const
232*cdf0e10cSrcweir     throw(beans::UnknownPropertyException)
233*cdf0e10cSrcweir {
234*cdf0e10cSrcweir     const tPropertyValueMap& rStaticDefaults = *StaticErrorBarDefaults::get();
235*cdf0e10cSrcweir     tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
236*cdf0e10cSrcweir     if( aFound == rStaticDefaults.end() )
237*cdf0e10cSrcweir         return uno::Any();
238*cdf0e10cSrcweir     return (*aFound).second;
239*cdf0e10cSrcweir }
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir ::cppu::IPropertyArrayHelper & SAL_CALL ErrorBar::getInfoHelper()
242*cdf0e10cSrcweir {
243*cdf0e10cSrcweir     return *StaticErrorBarInfoHelper::get();
244*cdf0e10cSrcweir }
245*cdf0e10cSrcweir 
246*cdf0e10cSrcweir // ____ XPropertySet ____
247*cdf0e10cSrcweir uno::Reference< beans::XPropertySetInfo > SAL_CALL ErrorBar::getPropertySetInfo()
248*cdf0e10cSrcweir     throw (uno::RuntimeException)
249*cdf0e10cSrcweir {
250*cdf0e10cSrcweir     return *StaticErrorBarInfo::get();
251*cdf0e10cSrcweir }
252*cdf0e10cSrcweir 
253*cdf0e10cSrcweir // ____ XModifyBroadcaster ____
254*cdf0e10cSrcweir void SAL_CALL ErrorBar::addModifyListener( const uno::Reference< util::XModifyListener >& aListener )
255*cdf0e10cSrcweir     throw (uno::RuntimeException)
256*cdf0e10cSrcweir {
257*cdf0e10cSrcweir     try
258*cdf0e10cSrcweir     {
259*cdf0e10cSrcweir         uno::Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW );
260*cdf0e10cSrcweir         xBroadcaster->addModifyListener( aListener );
261*cdf0e10cSrcweir     }
262*cdf0e10cSrcweir     catch( const uno::Exception & ex )
263*cdf0e10cSrcweir     {
264*cdf0e10cSrcweir         ASSERT_EXCEPTION( ex );
265*cdf0e10cSrcweir     }
266*cdf0e10cSrcweir }
267*cdf0e10cSrcweir 
268*cdf0e10cSrcweir void SAL_CALL ErrorBar::removeModifyListener( const uno::Reference< util::XModifyListener >& aListener )
269*cdf0e10cSrcweir     throw (uno::RuntimeException)
270*cdf0e10cSrcweir {
271*cdf0e10cSrcweir     try
272*cdf0e10cSrcweir     {
273*cdf0e10cSrcweir         uno::Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW );
274*cdf0e10cSrcweir         xBroadcaster->removeModifyListener( aListener );
275*cdf0e10cSrcweir     }
276*cdf0e10cSrcweir     catch( const uno::Exception & ex )
277*cdf0e10cSrcweir     {
278*cdf0e10cSrcweir         ASSERT_EXCEPTION( ex );
279*cdf0e10cSrcweir     }
280*cdf0e10cSrcweir }
281*cdf0e10cSrcweir 
282*cdf0e10cSrcweir // ____ XModifyListener ____
283*cdf0e10cSrcweir void SAL_CALL ErrorBar::modified( const lang::EventObject& aEvent )
284*cdf0e10cSrcweir     throw (uno::RuntimeException)
285*cdf0e10cSrcweir {
286*cdf0e10cSrcweir     m_xModifyEventForwarder->modified( aEvent );
287*cdf0e10cSrcweir }
288*cdf0e10cSrcweir 
289*cdf0e10cSrcweir // ____ XEventListener (base of XModifyListener) ____
290*cdf0e10cSrcweir void SAL_CALL ErrorBar::disposing( const lang::EventObject& /* Source */ )
291*cdf0e10cSrcweir     throw (uno::RuntimeException)
292*cdf0e10cSrcweir {
293*cdf0e10cSrcweir     // nothing
294*cdf0e10cSrcweir }
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir // ____ XDataSink ____
297*cdf0e10cSrcweir void SAL_CALL ErrorBar::setData( const uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > >& aData )
298*cdf0e10cSrcweir     throw (uno::RuntimeException)
299*cdf0e10cSrcweir {
300*cdf0e10cSrcweir     ModifyListenerHelper::removeListenerFromAllElements( m_aDataSequences, m_xModifyEventForwarder );
301*cdf0e10cSrcweir     EventListenerHelper::removeListenerFromAllElements( m_aDataSequences, this );
302*cdf0e10cSrcweir     m_aDataSequences = ContainerHelper::SequenceToVector( aData );
303*cdf0e10cSrcweir     EventListenerHelper::addListenerToAllElements( m_aDataSequences, this );
304*cdf0e10cSrcweir     ModifyListenerHelper::addListenerToAllElements( m_aDataSequences, m_xModifyEventForwarder );
305*cdf0e10cSrcweir }
306*cdf0e10cSrcweir 
307*cdf0e10cSrcweir // ____ XDataSource ____
308*cdf0e10cSrcweir uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > SAL_CALL ErrorBar::getDataSequences()
309*cdf0e10cSrcweir     throw (uno::RuntimeException)
310*cdf0e10cSrcweir {
311*cdf0e10cSrcweir     return ContainerHelper::ContainerToSequence( m_aDataSequences );
312*cdf0e10cSrcweir }
313*cdf0e10cSrcweir 
314*cdf0e10cSrcweir // ____ XChild ____
315*cdf0e10cSrcweir uno::Reference< uno::XInterface > SAL_CALL ErrorBar::getParent()
316*cdf0e10cSrcweir     throw (uno::RuntimeException)
317*cdf0e10cSrcweir {
318*cdf0e10cSrcweir     return m_xParent;
319*cdf0e10cSrcweir }
320*cdf0e10cSrcweir 
321*cdf0e10cSrcweir void SAL_CALL ErrorBar::setParent(
322*cdf0e10cSrcweir     const uno::Reference< uno::XInterface >& Parent )
323*cdf0e10cSrcweir     throw (lang::NoSupportException,
324*cdf0e10cSrcweir            uno::RuntimeException)
325*cdf0e10cSrcweir {
326*cdf0e10cSrcweir     m_xParent.set( Parent );
327*cdf0e10cSrcweir }
328*cdf0e10cSrcweir 
329*cdf0e10cSrcweir // ____ OPropertySet ____
330*cdf0e10cSrcweir void ErrorBar::firePropertyChangeEvent()
331*cdf0e10cSrcweir {
332*cdf0e10cSrcweir     fireModifyEvent();
333*cdf0e10cSrcweir }
334*cdf0e10cSrcweir 
335*cdf0e10cSrcweir void ErrorBar::fireModifyEvent()
336*cdf0e10cSrcweir {
337*cdf0e10cSrcweir     m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this )));
338*cdf0e10cSrcweir }
339*cdf0e10cSrcweir 
340*cdf0e10cSrcweir // ================================================================================
341*cdf0e10cSrcweir 
342*cdf0e10cSrcweir uno::Sequence< ::rtl::OUString > ErrorBar::getSupportedServiceNames_Static()
343*cdf0e10cSrcweir {
344*cdf0e10cSrcweir     uno::Sequence< ::rtl::OUString > aServices( 2 );
345*cdf0e10cSrcweir     aServices[ 0 ] = lcl_aServiceName;
346*cdf0e10cSrcweir     aServices[ 1 ] = C2U( "com.sun.star.chart2.ErrorBar" );
347*cdf0e10cSrcweir     return aServices;
348*cdf0e10cSrcweir }
349*cdf0e10cSrcweir 
350*cdf0e10cSrcweir // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
351*cdf0e10cSrcweir APPHELPER_XSERVICEINFO_IMPL( ErrorBar, lcl_aServiceName );
352*cdf0e10cSrcweir 
353*cdf0e10cSrcweir // needed by MSC compiler
354*cdf0e10cSrcweir using impl::ErrorBar_Base;
355*cdf0e10cSrcweir 
356*cdf0e10cSrcweir IMPLEMENT_FORWARD_XINTERFACE2( ErrorBar, ErrorBar_Base, OPropertySet )
357*cdf0e10cSrcweir IMPLEMENT_FORWARD_XTYPEPROVIDER2( ErrorBar, ErrorBar_Base, OPropertySet )
358*cdf0e10cSrcweir 
359*cdf0e10cSrcweir } //  namespace chart
360