xref: /aoo41x/main/sc/inc/chart2uno.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
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.
14  *
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).
20  *
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.
25  *
26  ************************************************************************/
27 
28 #ifndef SC_CHART2UNO_HXX
29 #define SC_CHART2UNO_HXX
30 
31 #include "cellsuno.hxx"     // for XModifyListenerArr_Impl / ScLinkListener
32 #include "rangelst.hxx"
33 #include "externalrefmgr.hxx"
34 #include "token.hxx"
35 #include "chartlis.hxx"
36 
37 #include <svl/lstner.hxx>
38 #include <com/sun/star/chart/ChartDataRowSource.hpp>
39 #include <com/sun/star/chart2/data/XDataProvider.hpp>
40 #include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
41 #include <com/sun/star/chart2/data/XDataSource.hpp>
42 #include <com/sun/star/chart2/data/XDataSequence.hpp>
43 #include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
44 #include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
45 #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
46 #include <com/sun/star/chart2/data/DataSequenceRole.hpp>
47 #include <com/sun/star/lang/XServiceInfo.hpp>
48 #include <com/sun/star/beans/XPropertySet.hpp>
49 #include <com/sun/star/util/XCloneable.hpp>
50 #include <com/sun/star/util/XModifyBroadcaster.hpp>
51 // #ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
52 // #include <com/sun/star/lang/XUnoTunnel.hpp>
53 // #endif
54 #include <cppuhelper/implbase2.hxx>
55 #include <cppuhelper/implbase4.hxx>
56 #include <cppuhelper/implbase6.hxx>
57 #include <cppuhelper/implbase7.hxx>
58 #include <rtl/ustring.hxx>
59 #include <svl/itemprop.hxx>
60 
61 #include <hash_set>
62 #include <list>
63 #include <vector>
64 #include <memory>
65 #include <boost/shared_ptr.hpp>
66 
67 #define USE_CHART2_EMPTYDATASEQUENCE 0
68 
69 class ScDocument;
70 
71 // DataProvider ==============================================================
72 
73 class ScChart2DataProvider : public
74                 ::cppu::WeakImplHelper4<
75                     ::com::sun::star::chart2::data::XDataProvider,
76                     ::com::sun::star::chart2::data::XRangeXMLConversion,
77                     ::com::sun::star::beans::XPropertySet,
78                     ::com::sun::star::lang::XServiceInfo>,
79                 SfxListener
80 {
81 public:
82 
83     explicit ScChart2DataProvider( ScDocument* pDoc );
84     virtual ~ScChart2DataProvider();
85     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
86 
87     // XDataProvider ---------------------------------------------------------
88 
89     virtual ::sal_Bool SAL_CALL createDataSourcePossible(
90         const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments )
91         throw (::com::sun::star::uno::RuntimeException);
92 
93     virtual ::com::sun::star::uno::Reference<
94         ::com::sun::star::chart2::data::XDataSource > SAL_CALL createDataSource(
95             const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments )
96             throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
97 
98     virtual ::com::sun::star::uno::Sequence<
99         ::com::sun::star::beans::PropertyValue > SAL_CALL detectArguments(
100             const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSource >& xDataSource )
101             throw (::com::sun::star::uno::RuntimeException);
102 
103     virtual ::sal_Bool SAL_CALL createDataSequenceByRangeRepresentationPossible(
104         const ::rtl::OUString& aRangeRepresentation )
105         throw (::com::sun::star::uno::RuntimeException);
106 
107     virtual ::com::sun::star::uno::Reference<
108         ::com::sun::star::chart2::data::XDataSequence > SAL_CALL createDataSequenceByRangeRepresentation(
109             const ::rtl::OUString& aRangeRepresentation )
110             throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
111 
112     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XRangeSelection > SAL_CALL getRangeSelection()
113         throw (::com::sun::star::uno::RuntimeException);
114 
115 /*    virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > SAL_CALL getNumberFormatsSupplier()
116         throw (::com::sun::star::uno::RuntimeException);*/
117 
118     // XRangeXMLConversion ---------------------------------------------------
119 
120     virtual ::rtl::OUString SAL_CALL convertRangeToXML( const ::rtl::OUString& sRangeRepresentation )
121         throw ( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
122 
123     virtual ::rtl::OUString SAL_CALL convertRangeFromXML( const ::rtl::OUString& sXMLRange )
124         throw ( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
125 
126     // XPropertySet ----------------------------------------------------------
127 
128     virtual ::com::sun::star::uno::Reference<
129         ::com::sun::star::beans::XPropertySetInfo> SAL_CALL
130         getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException);
131 
132     virtual void SAL_CALL setPropertyValue(
133             const ::rtl::OUString& rPropertyName,
134             const ::com::sun::star::uno::Any& rValue)
135         throw( ::com::sun::star::beans::UnknownPropertyException,
136                 ::com::sun::star::beans::PropertyVetoException,
137                 ::com::sun::star::lang::IllegalArgumentException,
138                 ::com::sun::star::lang::WrappedTargetException,
139                 ::com::sun::star::uno::RuntimeException);
140 
141     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
142             const ::rtl::OUString& rPropertyName)
143         throw( ::com::sun::star::beans::UnknownPropertyException,
144                 ::com::sun::star::lang::WrappedTargetException,
145                 ::com::sun::star::uno::RuntimeException);
146 
147     virtual void SAL_CALL addPropertyChangeListener(
148             const ::rtl::OUString& rPropertyName,
149             const ::com::sun::star::uno::Reference<
150             ::com::sun::star::beans::XPropertyChangeListener>& xListener)
151         throw( ::com::sun::star::beans::UnknownPropertyException,
152                 ::com::sun::star::lang::WrappedTargetException,
153                 ::com::sun::star::uno::RuntimeException);
154 
155     virtual void SAL_CALL removePropertyChangeListener(
156             const ::rtl::OUString& rPropertyName,
157             const ::com::sun::star::uno::Reference<
158             ::com::sun::star::beans::XPropertyChangeListener>& rListener)
159         throw( ::com::sun::star::beans::UnknownPropertyException,
160                 ::com::sun::star::lang::WrappedTargetException,
161                 ::com::sun::star::uno::RuntimeException);
162 
163     virtual void SAL_CALL addVetoableChangeListener(
164             const ::rtl::OUString& rPropertyName,
165             const ::com::sun::star::uno::Reference<
166             ::com::sun::star::beans::XVetoableChangeListener>& rListener)
167         throw( ::com::sun::star::beans::UnknownPropertyException,
168                 ::com::sun::star::lang::WrappedTargetException,
169                 ::com::sun::star::uno::RuntimeException);
170 
171     virtual void SAL_CALL removeVetoableChangeListener(
172             const ::rtl::OUString& rPropertyName,
173             const ::com::sun::star::uno::Reference<
174             ::com::sun::star::beans::XVetoableChangeListener>& rListener)
175         throw( ::com::sun::star::beans::UnknownPropertyException,
176                 ::com::sun::star::lang::WrappedTargetException,
177                 ::com::sun::star::uno::RuntimeException);
178 
179     // XServiceInfo ----------------------------------------------------------
180 
181     virtual ::rtl::OUString SAL_CALL getImplementationName() throw(
182             ::com::sun::star::uno::RuntimeException);
183 
184     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString&
185             rServiceName) throw( ::com::sun::star::uno::RuntimeException);
186 
187     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
188         getSupportedServiceNames() throw(
189                 ::com::sun::star::uno::RuntimeException);
190 
191 private:
192 
193     ScDocument*                 m_pDocument;
194     SfxItemPropertySet          m_aPropSet;
195     sal_Bool                    m_bIncludeHiddenCells;
196 };
197 
198 
199 // DataSource ================================================================
200 
201 class ScChart2DataSource : public
202                 ::cppu::WeakImplHelper2<
203                     ::com::sun::star::chart2::data::XDataSource,
204                     ::com::sun::star::lang::XServiceInfo>,
205                 SfxListener
206 {
207 public:
208 
209     explicit ScChart2DataSource( ScDocument* pDoc);
210     virtual ~ScChart2DataSource();
211     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
212 
213     // XDataSource -----------------------------------------------------------
214 
215     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
216             ::com::sun::star::chart2::data::XLabeledDataSequence > > SAL_CALL
217         getDataSequences() throw (::com::sun::star::uno::RuntimeException);
218 
219     // XServiceInfo ----------------------------------------------------------
220 
221     virtual ::rtl::OUString SAL_CALL getImplementationName() throw(
222             ::com::sun::star::uno::RuntimeException);
223 
224     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString&
225             rServiceName) throw( ::com::sun::star::uno::RuntimeException);
226 
227     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
228         getSupportedServiceNames() throw(
229                 ::com::sun::star::uno::RuntimeException);
230 
231     // implementation
232 
233     void AddLabeledSequence(const com::sun::star::uno::Reference < com::sun::star::chart2::data::XLabeledDataSequence >& xNew);
234 
235 private:
236 
237     ScDocument*                 m_pDocument;
238     typedef std::list < com::sun::star::uno::Reference< com::sun::star::chart2::data::XLabeledDataSequence > >  LabeledList;
239     LabeledList                 m_aLabeledSequences;
240 
241 };
242 
243 
244 // DataSequence ==============================================================
245 
246 class ScChart2DataSequence : public
247                 ::cppu::WeakImplHelper7<
248                     ::com::sun::star::chart2::data::XDataSequence,
249                     ::com::sun::star::chart2::data::XTextualDataSequence,
250                     ::com::sun::star::chart2::data::XNumericalDataSequence,
251                     ::com::sun::star::util::XCloneable,
252                     ::com::sun::star::util::XModifyBroadcaster,
253                     ::com::sun::star::beans::XPropertySet,
254 //                     ::com::sun::star::lang::XUnoTunnel,
255                     ::com::sun::star::lang::XServiceInfo>,
256                 SfxListener
257 {
258 public:
259     explicit ScChart2DataSequence( ScDocument* pDoc,
260             const com::sun::star::uno::Reference< com::sun::star::chart2::data::XDataProvider >& xDP,
261             ::std::vector<ScSharedTokenRef>* pTokens, bool bIncludeHiddenCells );
262 
263     virtual ~ScChart2DataSequence();
264     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
265 
266     // XDataSequence ---------------------------------------------------------
267 
268     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
269         SAL_CALL getData() throw (::com::sun::star::uno::RuntimeException);
270     virtual ::rtl::OUString SAL_CALL getSourceRangeRepresentation()
271         throw (::com::sun::star::uno::RuntimeException);
272     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
273         SAL_CALL generateLabel(::com::sun::star::chart2::data::LabelOrigin nOrigin)
274         throw (::com::sun::star::uno::RuntimeException);
275     virtual ::sal_Int32 SAL_CALL getNumberFormatKeyByIndex( ::sal_Int32 nIndex )
276         throw (::com::sun::star::lang::IndexOutOfBoundsException,
277                ::com::sun::star::uno::RuntimeException);
278 
279     // XNumericalDataSequence --------------------------------------------------
280 
281     virtual ::com::sun::star::uno::Sequence< double >
282         SAL_CALL getNumericalData(  ) throw (::com::sun::star::uno::RuntimeException);
283 
284     // XTextualDataSequence --------------------------------------------------
285 
286     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
287         SAL_CALL getTextualData(  ) throw (::com::sun::star::uno::RuntimeException);
288 
289     // XPropertySet ----------------------------------------------------------
290 
291     virtual ::com::sun::star::uno::Reference<
292         ::com::sun::star::beans::XPropertySetInfo> SAL_CALL
293         getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException);
294 
295     virtual void SAL_CALL setPropertyValue(
296             const ::rtl::OUString& rPropertyName,
297             const ::com::sun::star::uno::Any& rValue)
298         throw( ::com::sun::star::beans::UnknownPropertyException,
299                 ::com::sun::star::beans::PropertyVetoException,
300                 ::com::sun::star::lang::IllegalArgumentException,
301                 ::com::sun::star::lang::WrappedTargetException,
302                 ::com::sun::star::uno::RuntimeException);
303 
304     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
305             const ::rtl::OUString& rPropertyName)
306         throw( ::com::sun::star::beans::UnknownPropertyException,
307                 ::com::sun::star::lang::WrappedTargetException,
308                 ::com::sun::star::uno::RuntimeException);
309 
310     virtual void SAL_CALL addPropertyChangeListener(
311             const ::rtl::OUString& rPropertyName,
312             const ::com::sun::star::uno::Reference<
313             ::com::sun::star::beans::XPropertyChangeListener>& xListener)
314         throw( ::com::sun::star::beans::UnknownPropertyException,
315                 ::com::sun::star::lang::WrappedTargetException,
316                 ::com::sun::star::uno::RuntimeException);
317 
318     virtual void SAL_CALL removePropertyChangeListener(
319             const ::rtl::OUString& rPropertyName,
320             const ::com::sun::star::uno::Reference<
321             ::com::sun::star::beans::XPropertyChangeListener>& rListener)
322         throw( ::com::sun::star::beans::UnknownPropertyException,
323                 ::com::sun::star::lang::WrappedTargetException,
324                 ::com::sun::star::uno::RuntimeException);
325 
326     virtual void SAL_CALL addVetoableChangeListener(
327             const ::rtl::OUString& rPropertyName,
328             const ::com::sun::star::uno::Reference<
329             ::com::sun::star::beans::XVetoableChangeListener>& rListener)
330         throw( ::com::sun::star::beans::UnknownPropertyException,
331                 ::com::sun::star::lang::WrappedTargetException,
332                 ::com::sun::star::uno::RuntimeException);
333 
334     virtual void SAL_CALL removeVetoableChangeListener(
335             const ::rtl::OUString& rPropertyName,
336             const ::com::sun::star::uno::Reference<
337             ::com::sun::star::beans::XVetoableChangeListener>& rListener)
338         throw( ::com::sun::star::beans::UnknownPropertyException,
339                 ::com::sun::star::lang::WrappedTargetException,
340                 ::com::sun::star::uno::RuntimeException);
341 
342     // XCloneable ------------------------------------------------------------
343 
344     virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
345         throw (::com::sun::star::uno::RuntimeException);
346 
347     // XModifyBroadcaster ----------------------------------------------------
348 
349     virtual void SAL_CALL addModifyListener(
350         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
351         throw (::com::sun::star::uno::RuntimeException);
352     virtual void SAL_CALL removeModifyListener(
353         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
354         throw (::com::sun::star::uno::RuntimeException);
355 
356     // XServiceInfo ----------------------------------------------------------
357 
358     virtual ::rtl::OUString SAL_CALL getImplementationName() throw(
359             ::com::sun::star::uno::RuntimeException);
360 
361     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString&
362             rServiceName) throw( ::com::sun::star::uno::RuntimeException);
363 
364     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
365         getSupportedServiceNames() throw(
366                 ::com::sun::star::uno::RuntimeException);
367 
368     // XUnoTunnel ------------------------------------------------------------
369 
370 // 	virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
371 // 									sal_Int8 >& aIdentifier )
372 // 								throw(::com::sun::star::uno::RuntimeException);
373 
374 // 	static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
375 // 	static ScChart2DataSequence* getImplementation( const com::sun::star::uno::Reference<
376 // 									com::sun::star::uno::XInterface> xObj );
377 
378 private:
379     void setDataChangedHint(bool b);
380 
381     // Implementation --------------------------------------------------------
382 
383     void    RefChanged();
384     DECL_LINK( ValueListenerHdl, SfxHint* );
385 
386 private:
387     ScChart2DataSequence(); // disabled
388     ScChart2DataSequence(const ScChart2DataSequence& r); // disabled
389 
390     class ExternalRefListener : public ScExternalRefManager::LinkListener
391     {
392     public:
393         ExternalRefListener(ScChart2DataSequence& rParent, ScDocument* pDoc);
394         virtual ~ExternalRefListener();
395         virtual void notify(sal_uInt16 nFileId, ScExternalRefManager::LinkUpdateType eType);
396         void addFileId(sal_uInt16 nFileId);
397         void removeFileId(sal_uInt16 nFileId);
398         const ::std::hash_set<sal_uInt16>& getAllFileIds();
399 
400     private:
401         ExternalRefListener();
402         ExternalRefListener(const ExternalRefListener& r);
403 
404         ScChart2DataSequence&       mrParent;
405         ::std::hash_set<sal_uInt16> maFileIds;
406         ScDocument*                 mpDoc;
407     };
408 
409     /**
410      * Build an internal data array to cache the data ranges, and other
411      * information such as hidden values.
412      */
413     void BuildDataCache();
414 
415     void RebuildDataCache();
416 
417     sal_Int32 FillCacheFromExternalRef(const ScSharedTokenRef& pToken);
418 
419     void UpdateTokensFromRanges(const ScRangeList& rRanges);
420 
421     ExternalRefListener* GetExtRefListener();
422 
423     void StopListeningToAllExternalRefs();
424 
425     void CopyData(const ScChart2DataSequence& r);
426 
427 private:
428 
429     // data array
430     struct Item
431     {
432         double              mfValue;
433         ::rtl::OUString     maString;
434         bool                mbIsValue;
435         Item();
436     };
437 
438     class HiddenRangeListener : public ScChartHiddenRangeListener
439     {
440     public:
441         HiddenRangeListener(ScChart2DataSequence& rParent);
442         virtual ~HiddenRangeListener();
443 
444         virtual void notify();
445 
446     private:
447         ScChart2DataSequence& mrParent;
448     };
449 
450     ::std::list<Item>           m_aDataArray;
451 
452     /**
453      * Cached data for getData.  We may also need to cache data for the
454      * numerical and textural data series if they turn out to be bottlenecks
455      * under certain scenarios.
456      */
457     ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > m_aMixedDataCache;
458 
459     ::com::sun::star::uno::Sequence<sal_Int32>  m_aHiddenValues;
460 
461     // properties
462     ::com::sun::star::chart2::data::DataSequenceRole  m_aRole;
463     sal_Bool                    m_bIncludeHiddenCells;
464 
465     // internals
466     typedef ::std::auto_ptr< ::std::vector<ScSharedTokenRef> >  TokenListPtr;
467     typedef ::std::auto_ptr< ::std::vector<sal_uInt32> >        RangeIndexMapPtr;
468     typedef ::std::auto_ptr<ExternalRefListener>                ExtRefListenerPtr;
469 
470     sal_Int64                   m_nObjectId;
471     ScDocument*                 m_pDocument;
472     TokenListPtr                m_pTokens;
473     RangeIndexMapPtr            m_pRangeIndices;
474     ExtRefListenerPtr           m_pExtRefListener;
475     com::sun::star::uno::Reference < com::sun::star::chart2::data::XDataProvider > m_xDataProvider;
476 	SfxItemPropertySet		    m_aPropSet;
477 
478     ::std::auto_ptr<HiddenRangeListener> m_pHiddenListener;
479     ScLinkListener*             m_pValueListener;
480     XModifyListenerArr_Impl     m_aValueListeners;
481 
482     bool                        m_bGotDataChangedHint;
483     bool                        m_bExtDataRebuildQueued;
484 };
485 
486 #if USE_CHART2_EMPTYDATASEQUENCE
487 // DataSequence ==============================================================
488 
489 class ScChart2EmptyDataSequence : public
490                 ::cppu::WeakImplHelper6<
491                     ::com::sun::star::chart2::data::XDataSequence,
492                     ::com::sun::star::chart2::data::XTextualDataSequence,
493                     ::com::sun::star::util::XCloneable,
494                     ::com::sun::star::util::XModifyBroadcaster,
495                     ::com::sun::star::beans::XPropertySet,
496 //                     ::com::sun::star::lang::XUnoTunnel,
497                     ::com::sun::star::lang::XServiceInfo>,
498                 SfxListener
499 {
500 public:
501 
502     explicit ScChart2EmptyDataSequence( ScDocument* pDoc,
503             const com::sun::star::uno::Reference< com::sun::star::chart2::data::XDataProvider >& xDP,
504             const ScRangeListRef& rRangeList, sal_Bool bColumn );
505     virtual ~ScChart2EmptyDataSequence();
506     virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
507 
508     // XDataSequence ---------------------------------------------------------
509 
510     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
511         SAL_CALL getData() throw (::com::sun::star::uno::RuntimeException);
512     virtual ::rtl::OUString SAL_CALL getSourceRangeRepresentation()
513         throw (::com::sun::star::uno::RuntimeException);
514     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
515         SAL_CALL generateLabel(::com::sun::star::chart2::data::LabelOrigin nOrigin)
516         throw (::com::sun::star::uno::RuntimeException);
517     virtual ::sal_Int32 SAL_CALL getNumberFormatKeyByIndex( ::sal_Int32 nIndex )
518         throw (::com::sun::star::lang::IndexOutOfBoundsException,
519                ::com::sun::star::uno::RuntimeException);
520 
521     // XTextualDataSequence --------------------------------------------------
522 
523     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
524         SAL_CALL getTextualData(  ) throw (::com::sun::star::uno::RuntimeException);
525 
526     // XPropertySet ----------------------------------------------------------
527 
528     virtual ::com::sun::star::uno::Reference<
529         ::com::sun::star::beans::XPropertySetInfo> SAL_CALL
530         getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException);
531 
532     virtual void SAL_CALL setPropertyValue(
533             const ::rtl::OUString& rPropertyName,
534             const ::com::sun::star::uno::Any& rValue)
535         throw( ::com::sun::star::beans::UnknownPropertyException,
536                 ::com::sun::star::beans::PropertyVetoException,
537                 ::com::sun::star::lang::IllegalArgumentException,
538                 ::com::sun::star::lang::WrappedTargetException,
539                 ::com::sun::star::uno::RuntimeException);
540 
541     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
542             const ::rtl::OUString& rPropertyName)
543         throw( ::com::sun::star::beans::UnknownPropertyException,
544                 ::com::sun::star::lang::WrappedTargetException,
545                 ::com::sun::star::uno::RuntimeException);
546 
547     virtual void SAL_CALL addPropertyChangeListener(
548             const ::rtl::OUString& rPropertyName,
549             const ::com::sun::star::uno::Reference<
550             ::com::sun::star::beans::XPropertyChangeListener>& xListener)
551         throw( ::com::sun::star::beans::UnknownPropertyException,
552                 ::com::sun::star::lang::WrappedTargetException,
553                 ::com::sun::star::uno::RuntimeException);
554 
555     virtual void SAL_CALL removePropertyChangeListener(
556             const ::rtl::OUString& rPropertyName,
557             const ::com::sun::star::uno::Reference<
558             ::com::sun::star::beans::XPropertyChangeListener>& rListener)
559         throw( ::com::sun::star::beans::UnknownPropertyException,
560                 ::com::sun::star::lang::WrappedTargetException,
561                 ::com::sun::star::uno::RuntimeException);
562 
563     virtual void SAL_CALL addVetoableChangeListener(
564             const ::rtl::OUString& rPropertyName,
565             const ::com::sun::star::uno::Reference<
566             ::com::sun::star::beans::XVetoableChangeListener>& rListener)
567         throw( ::com::sun::star::beans::UnknownPropertyException,
568                 ::com::sun::star::lang::WrappedTargetException,
569                 ::com::sun::star::uno::RuntimeException);
570 
571     virtual void SAL_CALL removeVetoableChangeListener(
572             const ::rtl::OUString& rPropertyName,
573             const ::com::sun::star::uno::Reference<
574             ::com::sun::star::beans::XVetoableChangeListener>& rListener)
575         throw( ::com::sun::star::beans::UnknownPropertyException,
576                 ::com::sun::star::lang::WrappedTargetException,
577                 ::com::sun::star::uno::RuntimeException);
578 
579     // XCloneable ------------------------------------------------------------
580 
581     virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
582         throw (::com::sun::star::uno::RuntimeException);
583 
584     // XModifyBroadcaster ----------------------------------------------------
585 
586     virtual void SAL_CALL addModifyListener(
587         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
588         throw (::com::sun::star::uno::RuntimeException);
589     virtual void SAL_CALL removeModifyListener(
590         const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
591         throw (::com::sun::star::uno::RuntimeException);
592 
593     // XServiceInfo ----------------------------------------------------------
594 
595     virtual ::rtl::OUString SAL_CALL getImplementationName() throw(
596             ::com::sun::star::uno::RuntimeException);
597 
598     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString&
599             rServiceName) throw( ::com::sun::star::uno::RuntimeException);
600 
601     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL
602         getSupportedServiceNames() throw(
603                 ::com::sun::star::uno::RuntimeException);
604 
605     // XUnoTunnel ------------------------------------------------------------
606 
607 // 	virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
608 // 									sal_Int8 >& aIdentifier )
609 // 								throw(::com::sun::star::uno::RuntimeException);
610 
611 // 	static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
612 // 	static ScChart2DataSequence* getImplementation( const com::sun::star::uno::Reference<
613 // 									com::sun::star::uno::XInterface> xObj );
614 
615     // Implementation --------------------------------------------------------
616 
617     ScRangeListRef GetRangeList() { return m_xRanges; }
618 
619 private:
620 
621     // properties
622     ::com::sun::star::chart2::data::DataSequenceRole  m_aRole;
623     sal_Bool                    m_bIncludeHiddenCells;
624     // internals
625     ScRangeListRef              m_xRanges;
626     ScDocument*                 m_pDocument;
627     com::sun::star::uno::Reference < com::sun::star::chart2::data::XDataProvider > m_xDataProvider;
628 	SfxItemPropertySet		    m_aPropSet;
629     sal_Bool                    m_bColumn; // defines the orientation to create the right labels
630 
631 };
632 #endif
633 
634 #endif // SC_CHART2UNO_HXX
635