xref: /AOO41X/main/chart2/source/tools/UncachedDataSequence.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
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 
31*cdf0e10cSrcweir #include "UncachedDataSequence.hxx"
32*cdf0e10cSrcweir #include "macros.hxx"
33*cdf0e10cSrcweir #include "PropertyHelper.hxx"
34*cdf0e10cSrcweir #include "CommonFunctors.hxx"
35*cdf0e10cSrcweir #include "ModifyListenerHelper.hxx"
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir #include <algorithm>
38*cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
39*cdf0e10cSrcweir #include <rtl/math.hxx>
40*cdf0e10cSrcweir 
41*cdf0e10cSrcweir using namespace ::com::sun::star;
42*cdf0e10cSrcweir 
43*cdf0e10cSrcweir using ::com::sun::star::uno::Sequence;
44*cdf0e10cSrcweir using ::com::sun::star::uno::Reference;
45*cdf0e10cSrcweir using ::com::sun::star::uno::Any;
46*cdf0e10cSrcweir using ::rtl::OUString;
47*cdf0e10cSrcweir using ::osl::MutexGuard;
48*cdf0e10cSrcweir 
49*cdf0e10cSrcweir // necessary for MS compiler
50*cdf0e10cSrcweir using ::comphelper::OPropertyContainer;
51*cdf0e10cSrcweir using ::chart::impl::UncachedDataSequence_Base;
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir namespace
54*cdf0e10cSrcweir {
55*cdf0e10cSrcweir static const OUString lcl_aServiceName(
56*cdf0e10cSrcweir     RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.UncachedDataSequence" ));
57*cdf0e10cSrcweir 
58*cdf0e10cSrcweir enum
59*cdf0e10cSrcweir {
60*cdf0e10cSrcweir //     PROP_SOURCE_IDENTIFIER,
61*cdf0e10cSrcweir     PROP_NUMBERFORMAT_KEY,
62*cdf0e10cSrcweir     PROP_PROPOSED_ROLE,
63*cdf0e10cSrcweir     PROP_XML_RANGE
64*cdf0e10cSrcweir };
65*cdf0e10cSrcweir }  // anonymous namespace
66*cdf0e10cSrcweir 
67*cdf0e10cSrcweir 
68*cdf0e10cSrcweir // ____________________
69*cdf0e10cSrcweir namespace chart
70*cdf0e10cSrcweir {
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir UncachedDataSequence::UncachedDataSequence(
73*cdf0e10cSrcweir     const Reference< chart2::XInternalDataProvider > & xIntDataProv,
74*cdf0e10cSrcweir     const OUString & rRangeRepresentation )
75*cdf0e10cSrcweir         : OPropertyContainer( GetBroadcastHelper()),
76*cdf0e10cSrcweir           UncachedDataSequence_Base( GetMutex()),
77*cdf0e10cSrcweir           m_nNumberFormatKey(0),
78*cdf0e10cSrcweir           m_xDataProvider( xIntDataProv ),
79*cdf0e10cSrcweir           m_aSourceRepresentation( rRangeRepresentation ),
80*cdf0e10cSrcweir           m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
81*cdf0e10cSrcweir {
82*cdf0e10cSrcweir     registerProperties();
83*cdf0e10cSrcweir }
84*cdf0e10cSrcweir 
85*cdf0e10cSrcweir UncachedDataSequence::UncachedDataSequence(
86*cdf0e10cSrcweir     const Reference< chart2::XInternalDataProvider > & xIntDataProv,
87*cdf0e10cSrcweir     const OUString & rRangeRepresentation,
88*cdf0e10cSrcweir     const OUString & rRole )
89*cdf0e10cSrcweir         : OPropertyContainer( GetBroadcastHelper()),
90*cdf0e10cSrcweir           UncachedDataSequence_Base( GetMutex()),
91*cdf0e10cSrcweir           m_nNumberFormatKey(0),
92*cdf0e10cSrcweir           m_xDataProvider( xIntDataProv ),
93*cdf0e10cSrcweir           m_aSourceRepresentation( rRangeRepresentation ),
94*cdf0e10cSrcweir           m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
95*cdf0e10cSrcweir {
96*cdf0e10cSrcweir     registerProperties();
97*cdf0e10cSrcweir     setFastPropertyValue_NoBroadcast( PROP_PROPOSED_ROLE, uno::makeAny( rRole ));
98*cdf0e10cSrcweir }
99*cdf0e10cSrcweir 
100*cdf0e10cSrcweir UncachedDataSequence::UncachedDataSequence( const UncachedDataSequence & rSource )
101*cdf0e10cSrcweir         : ::comphelper::OMutexAndBroadcastHelper(),
102*cdf0e10cSrcweir           OPropertyContainer( GetBroadcastHelper()),
103*cdf0e10cSrcweir           ::comphelper::OPropertyArrayUsageHelper< UncachedDataSequence >(),
104*cdf0e10cSrcweir           UncachedDataSequence_Base( GetMutex()),
105*cdf0e10cSrcweir           m_nNumberFormatKey( rSource.m_nNumberFormatKey ),
106*cdf0e10cSrcweir           m_sRole( rSource.m_sRole ),
107*cdf0e10cSrcweir           m_xDataProvider( rSource.m_xDataProvider ),
108*cdf0e10cSrcweir           m_aSourceRepresentation( rSource.m_aSourceRepresentation ),
109*cdf0e10cSrcweir           m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder())
110*cdf0e10cSrcweir {
111*cdf0e10cSrcweir     registerProperties();
112*cdf0e10cSrcweir }
113*cdf0e10cSrcweir 
114*cdf0e10cSrcweir UncachedDataSequence::~UncachedDataSequence()
115*cdf0e10cSrcweir {}
116*cdf0e10cSrcweir 
117*cdf0e10cSrcweir void UncachedDataSequence::registerProperties()
118*cdf0e10cSrcweir {
119*cdf0e10cSrcweir     registerProperty( C2U( "NumberFormatKey" ),
120*cdf0e10cSrcweir                       PROP_NUMBERFORMAT_KEY,
121*cdf0e10cSrcweir                       0,   // PropertyAttributes
122*cdf0e10cSrcweir                       & m_nNumberFormatKey,
123*cdf0e10cSrcweir                       ::getCppuType( & m_nNumberFormatKey ) );
124*cdf0e10cSrcweir 
125*cdf0e10cSrcweir     registerProperty( C2U( "Role" ),
126*cdf0e10cSrcweir                       PROP_PROPOSED_ROLE,
127*cdf0e10cSrcweir                       0,   // PropertyAttributes
128*cdf0e10cSrcweir                       & m_sRole,
129*cdf0e10cSrcweir                       ::getCppuType( & m_sRole ) );
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir     registerProperty( C2U( "CachedXMLRange" ),
132*cdf0e10cSrcweir                       PROP_XML_RANGE,
133*cdf0e10cSrcweir                       0,   // PropertyAttributes
134*cdf0e10cSrcweir                       & m_aXMLRange,
135*cdf0e10cSrcweir                       ::getCppuType( & m_aXMLRange ) );
136*cdf0e10cSrcweir }
137*cdf0e10cSrcweir 
138*cdf0e10cSrcweir // ================================================================================
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir Sequence< OUString > UncachedDataSequence::getSupportedServiceNames_Static()
141*cdf0e10cSrcweir {
142*cdf0e10cSrcweir     Sequence< OUString > aServices( 4 );
143*cdf0e10cSrcweir     aServices[ 0 ] = lcl_aServiceName;
144*cdf0e10cSrcweir     aServices[ 1 ] = C2U( "com.sun.star.chart2.data.DataSequence" );
145*cdf0e10cSrcweir     aServices[ 2 ] = C2U( "com.sun.star.chart2.data.NumericalDataSequence" );
146*cdf0e10cSrcweir     aServices[ 3 ] = C2U( "com.sun.star.chart2.data.TextualDataSequence" );
147*cdf0e10cSrcweir     return aServices;
148*cdf0e10cSrcweir }
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir IMPLEMENT_FORWARD_XINTERFACE2( UncachedDataSequence, UncachedDataSequence_Base, OPropertyContainer )
151*cdf0e10cSrcweir IMPLEMENT_FORWARD_XTYPEPROVIDER2( UncachedDataSequence, UncachedDataSequence_Base, OPropertyContainer )
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir // ____ XPropertySet ____
154*cdf0e10cSrcweir Reference< beans::XPropertySetInfo > SAL_CALL UncachedDataSequence::getPropertySetInfo()
155*cdf0e10cSrcweir     throw(uno::RuntimeException)
156*cdf0e10cSrcweir {
157*cdf0e10cSrcweir     return Reference< beans::XPropertySetInfo >( createPropertySetInfo( getInfoHelper() ) );
158*cdf0e10cSrcweir }
159*cdf0e10cSrcweir 
160*cdf0e10cSrcweir // ____ ::comphelper::OPropertySetHelper ____
161*cdf0e10cSrcweir // __________________________________________
162*cdf0e10cSrcweir ::cppu::IPropertyArrayHelper& UncachedDataSequence::getInfoHelper()
163*cdf0e10cSrcweir {
164*cdf0e10cSrcweir 	return *getArrayHelper();
165*cdf0e10cSrcweir }
166*cdf0e10cSrcweir 
167*cdf0e10cSrcweir // ____ ::comphelper::OPropertyArrayHelper ____
168*cdf0e10cSrcweir // ____________________________________________
169*cdf0e10cSrcweir ::cppu::IPropertyArrayHelper* UncachedDataSequence::createArrayHelper() const
170*cdf0e10cSrcweir {
171*cdf0e10cSrcweir 	Sequence< beans::Property > aProps;
172*cdf0e10cSrcweir     // describes all properties which have been registered in the ctor
173*cdf0e10cSrcweir 	describeProperties( aProps );
174*cdf0e10cSrcweir 
175*cdf0e10cSrcweir 	return new ::cppu::OPropertyArrayHelper( aProps );
176*cdf0e10cSrcweir }
177*cdf0e10cSrcweir 
178*cdf0e10cSrcweir // implement XServiceInfo methods basing upon getSupportedServiceNames_Static
179*cdf0e10cSrcweir APPHELPER_XSERVICEINFO_IMPL( UncachedDataSequence, lcl_aServiceName )
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir // ================================================================================
182*cdf0e10cSrcweir 
183*cdf0e10cSrcweir // ________ XNumericalDataSequence ________
184*cdf0e10cSrcweir Sequence< double > SAL_CALL UncachedDataSequence::getNumericalData()
185*cdf0e10cSrcweir     throw (uno::RuntimeException)
186*cdf0e10cSrcweir {
187*cdf0e10cSrcweir     Sequence< double > aResult;
188*cdf0e10cSrcweir     // /--
189*cdf0e10cSrcweir     MutexGuard aGuard( GetMutex() );
190*cdf0e10cSrcweir     if( m_xDataProvider.is())
191*cdf0e10cSrcweir     {
192*cdf0e10cSrcweir         Sequence< uno::Any > aValues( m_xDataProvider->getDataByRangeRepresentation( m_aSourceRepresentation ));
193*cdf0e10cSrcweir         aResult.realloc( aValues.getLength());
194*cdf0e10cSrcweir         ::std::transform( aValues.getConstArray(), aValues.getConstArray() + aValues.getLength(),
195*cdf0e10cSrcweir                           aResult.getArray(), CommonFunctors::AnyToDouble());
196*cdf0e10cSrcweir     }
197*cdf0e10cSrcweir     return aResult;
198*cdf0e10cSrcweir     // \--
199*cdf0e10cSrcweir }
200*cdf0e10cSrcweir 
201*cdf0e10cSrcweir // ________ XTextualDataSequence ________
202*cdf0e10cSrcweir Sequence< OUString > SAL_CALL UncachedDataSequence::getTextualData()
203*cdf0e10cSrcweir     throw (uno::RuntimeException)
204*cdf0e10cSrcweir {
205*cdf0e10cSrcweir     Sequence< OUString > aResult;
206*cdf0e10cSrcweir     // /--
207*cdf0e10cSrcweir     MutexGuard aGuard( GetMutex() );
208*cdf0e10cSrcweir     if( m_xDataProvider.is())
209*cdf0e10cSrcweir     {
210*cdf0e10cSrcweir         Sequence< uno::Any > aValues( m_xDataProvider->getDataByRangeRepresentation( m_aSourceRepresentation ));
211*cdf0e10cSrcweir         aResult.realloc( aValues.getLength());
212*cdf0e10cSrcweir         ::std::transform( aValues.getConstArray(), aValues.getConstArray() + aValues.getLength(),
213*cdf0e10cSrcweir                           aResult.getArray(), CommonFunctors::AnyToString());
214*cdf0e10cSrcweir     }
215*cdf0e10cSrcweir     return aResult;
216*cdf0e10cSrcweir     // \--
217*cdf0e10cSrcweir }
218*cdf0e10cSrcweir 
219*cdf0e10cSrcweir // ________ XDataSequence  ________
220*cdf0e10cSrcweir Sequence< Any > SAL_CALL UncachedDataSequence::getData()
221*cdf0e10cSrcweir     throw (uno::RuntimeException)
222*cdf0e10cSrcweir {
223*cdf0e10cSrcweir     // /--
224*cdf0e10cSrcweir     MutexGuard aGuard( GetMutex() );
225*cdf0e10cSrcweir     if( m_xDataProvider.is())
226*cdf0e10cSrcweir         return m_xDataProvider->getDataByRangeRepresentation( m_aSourceRepresentation );
227*cdf0e10cSrcweir     return Sequence< Any >();
228*cdf0e10cSrcweir     // \--
229*cdf0e10cSrcweir }
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir OUString SAL_CALL UncachedDataSequence::getSourceRangeRepresentation()
232*cdf0e10cSrcweir     throw (uno::RuntimeException)
233*cdf0e10cSrcweir {
234*cdf0e10cSrcweir     return getName();
235*cdf0e10cSrcweir }
236*cdf0e10cSrcweir 
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir Sequence< OUString > SAL_CALL UncachedDataSequence::generateLabel( chart2::data::LabelOrigin )
239*cdf0e10cSrcweir     throw (uno::RuntimeException)
240*cdf0e10cSrcweir {
241*cdf0e10cSrcweir     // auto-generated label is an empty string
242*cdf0e10cSrcweir     static const Sequence< OUString > aOneEmptyString( 1 );
243*cdf0e10cSrcweir     return aOneEmptyString;
244*cdf0e10cSrcweir }
245*cdf0e10cSrcweir 
246*cdf0e10cSrcweir ::sal_Int32 SAL_CALL UncachedDataSequence::getNumberFormatKeyByIndex( ::sal_Int32 )
247*cdf0e10cSrcweir     throw (lang::IndexOutOfBoundsException,
248*cdf0e10cSrcweir            uno::RuntimeException)
249*cdf0e10cSrcweir {
250*cdf0e10cSrcweir     return m_nNumberFormatKey;
251*cdf0e10cSrcweir }
252*cdf0e10cSrcweir 
253*cdf0e10cSrcweir // ____ XIndexReplace ____
254*cdf0e10cSrcweir void SAL_CALL UncachedDataSequence::replaceByIndex( ::sal_Int32 Index, const uno::Any& Element )
255*cdf0e10cSrcweir     throw (lang::IllegalArgumentException,
256*cdf0e10cSrcweir            lang::IndexOutOfBoundsException,
257*cdf0e10cSrcweir            lang::WrappedTargetException,
258*cdf0e10cSrcweir            uno::RuntimeException)
259*cdf0e10cSrcweir {
260*cdf0e10cSrcweir     // /--
261*cdf0e10cSrcweir     MutexGuard aGuard( GetMutex() );
262*cdf0e10cSrcweir     Sequence< Any > aData( getData());
263*cdf0e10cSrcweir     if( Index < aData.getLength() &&
264*cdf0e10cSrcweir         m_xDataProvider.is() )
265*cdf0e10cSrcweir     {
266*cdf0e10cSrcweir         aData[Index] = Element;
267*cdf0e10cSrcweir         m_xDataProvider->setDataByRangeRepresentation( m_aSourceRepresentation, aData );
268*cdf0e10cSrcweir         fireModifyEvent();
269*cdf0e10cSrcweir     }
270*cdf0e10cSrcweir }
271*cdf0e10cSrcweir 
272*cdf0e10cSrcweir // ____ XIndexAccess (base of XIndexReplace) ____
273*cdf0e10cSrcweir ::sal_Int32 SAL_CALL UncachedDataSequence::getCount()
274*cdf0e10cSrcweir     throw (uno::RuntimeException)
275*cdf0e10cSrcweir {
276*cdf0e10cSrcweir     OSL_ENSURE( false, "Implement!" );
277*cdf0e10cSrcweir     return 0;
278*cdf0e10cSrcweir }
279*cdf0e10cSrcweir 
280*cdf0e10cSrcweir uno::Any SAL_CALL UncachedDataSequence::getByIndex( ::sal_Int32 )
281*cdf0e10cSrcweir     throw (lang::IndexOutOfBoundsException,
282*cdf0e10cSrcweir            lang::WrappedTargetException,
283*cdf0e10cSrcweir            uno::RuntimeException)
284*cdf0e10cSrcweir {
285*cdf0e10cSrcweir     OSL_ENSURE( false, "Implement!" );
286*cdf0e10cSrcweir     return uno::Any();
287*cdf0e10cSrcweir }
288*cdf0e10cSrcweir 
289*cdf0e10cSrcweir // ____ XElementAccess (base of XIndexAccess) ____
290*cdf0e10cSrcweir uno::Type SAL_CALL UncachedDataSequence::getElementType()
291*cdf0e10cSrcweir     throw (uno::RuntimeException)
292*cdf0e10cSrcweir {
293*cdf0e10cSrcweir     return ::getCppuType( reinterpret_cast< uno::Any * >(0));
294*cdf0e10cSrcweir }
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir ::sal_Bool SAL_CALL UncachedDataSequence::hasElements()
297*cdf0e10cSrcweir     throw (uno::RuntimeException)
298*cdf0e10cSrcweir {
299*cdf0e10cSrcweir     if( ! m_xDataProvider.is())
300*cdf0e10cSrcweir         return sal_False;
301*cdf0e10cSrcweir     return m_xDataProvider->hasDataByRangeRepresentation( m_aSourceRepresentation );
302*cdf0e10cSrcweir }
303*cdf0e10cSrcweir 
304*cdf0e10cSrcweir // ____ XNamed ____
305*cdf0e10cSrcweir ::rtl::OUString SAL_CALL UncachedDataSequence::getName()
306*cdf0e10cSrcweir     throw (uno::RuntimeException)
307*cdf0e10cSrcweir {
308*cdf0e10cSrcweir     return m_aSourceRepresentation;
309*cdf0e10cSrcweir }
310*cdf0e10cSrcweir 
311*cdf0e10cSrcweir void SAL_CALL UncachedDataSequence::setName( const OUString& aName )
312*cdf0e10cSrcweir     throw (uno::RuntimeException)
313*cdf0e10cSrcweir {
314*cdf0e10cSrcweir     m_aSourceRepresentation = aName;
315*cdf0e10cSrcweir     fireModifyEvent();
316*cdf0e10cSrcweir }
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir 
319*cdf0e10cSrcweir 
320*cdf0e10cSrcweir Reference< util::XCloneable > SAL_CALL UncachedDataSequence::createClone()
321*cdf0e10cSrcweir     throw (uno::RuntimeException)
322*cdf0e10cSrcweir {
323*cdf0e10cSrcweir     UncachedDataSequence * pNewSeq = new UncachedDataSequence( *this );
324*cdf0e10cSrcweir     return Reference< util::XCloneable >( pNewSeq );
325*cdf0e10cSrcweir }
326*cdf0e10cSrcweir 
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir // ____ XModifiable ____
329*cdf0e10cSrcweir ::sal_Bool SAL_CALL UncachedDataSequence::isModified()
330*cdf0e10cSrcweir     throw (uno::RuntimeException)
331*cdf0e10cSrcweir {
332*cdf0e10cSrcweir     return sal_False;
333*cdf0e10cSrcweir }
334*cdf0e10cSrcweir 
335*cdf0e10cSrcweir void SAL_CALL UncachedDataSequence::setModified( ::sal_Bool bModified )
336*cdf0e10cSrcweir     throw (beans::PropertyVetoException,
337*cdf0e10cSrcweir            uno::RuntimeException)
338*cdf0e10cSrcweir {
339*cdf0e10cSrcweir     if( bModified )
340*cdf0e10cSrcweir         fireModifyEvent();
341*cdf0e10cSrcweir }
342*cdf0e10cSrcweir 
343*cdf0e10cSrcweir // ____ XModifyBroadcaster (base of XModifiable) ____
344*cdf0e10cSrcweir void SAL_CALL UncachedDataSequence::addModifyListener( const Reference< util::XModifyListener >& aListener )
345*cdf0e10cSrcweir     throw (uno::RuntimeException)
346*cdf0e10cSrcweir {
347*cdf0e10cSrcweir     try
348*cdf0e10cSrcweir     {
349*cdf0e10cSrcweir         Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW );
350*cdf0e10cSrcweir         xBroadcaster->addModifyListener( aListener );
351*cdf0e10cSrcweir     }
352*cdf0e10cSrcweir     catch( const uno::Exception & ex )
353*cdf0e10cSrcweir     {
354*cdf0e10cSrcweir         ASSERT_EXCEPTION( ex );
355*cdf0e10cSrcweir     }
356*cdf0e10cSrcweir }
357*cdf0e10cSrcweir 
358*cdf0e10cSrcweir void SAL_CALL UncachedDataSequence::removeModifyListener( const Reference< util::XModifyListener >& aListener )
359*cdf0e10cSrcweir     throw (uno::RuntimeException)
360*cdf0e10cSrcweir {
361*cdf0e10cSrcweir     try
362*cdf0e10cSrcweir     {
363*cdf0e10cSrcweir         Reference< util::XModifyBroadcaster > xBroadcaster( m_xModifyEventForwarder, uno::UNO_QUERY_THROW );
364*cdf0e10cSrcweir         xBroadcaster->removeModifyListener( aListener );
365*cdf0e10cSrcweir     }
366*cdf0e10cSrcweir     catch( const uno::Exception & ex )
367*cdf0e10cSrcweir     {
368*cdf0e10cSrcweir         ASSERT_EXCEPTION( ex );
369*cdf0e10cSrcweir     }
370*cdf0e10cSrcweir }
371*cdf0e10cSrcweir 
372*cdf0e10cSrcweir void UncachedDataSequence::fireModifyEvent()
373*cdf0e10cSrcweir {
374*cdf0e10cSrcweir     // @todo: currently never called, as data changes are not yet reported by
375*cdf0e10cSrcweir     // the data provider
376*cdf0e10cSrcweir     m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this )));
377*cdf0e10cSrcweir }
378*cdf0e10cSrcweir 
379*cdf0e10cSrcweir }  // namespace chart
380