1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: chart2uno.hxx,v $
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 ************************************************************************/
31 #ifndef SC_CHART2UNO_HXX
32 #define SC_CHART2UNO_HXX
34 #include "cellsuno.hxx" // for XModifyListenerArr_Impl / ScLinkListener
35 #include "rangelst.hxx"
36 #include "externalrefmgr.hxx"
38 #include "chartlis.hxx"
40 #include <svtools/lstner.hxx>
41 #include <com/sun/star/chart/ChartDataRowSource.hpp>
42 #include <com/sun/star/chart2/data/XDataProvider.hpp>
43 #include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
44 #include <com/sun/star/chart2/data/XDataSource.hpp>
45 #include <com/sun/star/chart2/data/XDataSequence.hpp>
46 #include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
47 #include <com/sun/star/chart2/data/XNumericalDataSequence.hpp>
48 #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
49 #include <com/sun/star/chart2/data/DataSequenceRole.hpp>
50 #include <com/sun/star/lang/XServiceInfo.hpp>
51 #include <com/sun/star/beans/XPropertySet.hpp>
52 #include <com/sun/star/util/XCloneable.hpp>
53 #include <com/sun/star/util/XModifyBroadcaster.hpp>
54 // #ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
55 // #include <com/sun/star/lang/XUnoTunnel.hpp>
57 #include <cppuhelper/implbase2.hxx>
58 #include <cppuhelper/implbase4.hxx>
59 #include <cppuhelper/implbase6.hxx>
60 #include <cppuhelper/implbase7.hxx>
61 #include <rtl/ustring.hxx>
62 #include <svtools/itemprop.hxx>
68 #include <boost/shared_ptr.hpp>
70 #define USE_CHART2_EMPTYDATASEQUENCE 0
74 // DataProvider ==============================================================
76 class ScChart2DataProvider
: public
77 ::cppu::WeakImplHelper4
<
78 ::com::sun::star::chart2::data::XDataProvider
,
79 ::com::sun::star::chart2::data::XRangeXMLConversion
,
80 ::com::sun::star::beans::XPropertySet
,
81 ::com::sun::star::lang::XServiceInfo
>,
86 explicit ScChart2DataProvider( ScDocument
* pDoc
);
87 virtual ~ScChart2DataProvider();
88 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
90 // XDataProvider ---------------------------------------------------------
92 virtual ::sal_Bool SAL_CALL
createDataSourcePossible(
93 const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& aArguments
)
94 throw (::com::sun::star::uno::RuntimeException
);
96 virtual ::com::sun::star::uno::Reference
<
97 ::com::sun::star::chart2::data::XDataSource
> SAL_CALL
createDataSource(
98 const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& aArguments
)
99 throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
101 virtual ::com::sun::star::uno::Sequence
<
102 ::com::sun::star::beans::PropertyValue
> SAL_CALL
detectArguments(
103 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataSource
>& xDataSource
)
104 throw (::com::sun::star::uno::RuntimeException
);
106 virtual ::sal_Bool SAL_CALL
createDataSequenceByRangeRepresentationPossible(
107 const ::rtl::OUString
& aRangeRepresentation
)
108 throw (::com::sun::star::uno::RuntimeException
);
110 virtual ::com::sun::star::uno::Reference
<
111 ::com::sun::star::chart2::data::XDataSequence
> SAL_CALL
createDataSequenceByRangeRepresentation(
112 const ::rtl::OUString
& aRangeRepresentation
)
113 throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
115 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sheet::XRangeSelection
> SAL_CALL
getRangeSelection()
116 throw (::com::sun::star::uno::RuntimeException
);
118 /* virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > SAL_CALL getNumberFormatsSupplier()
119 throw (::com::sun::star::uno::RuntimeException);*/
121 // XRangeXMLConversion ---------------------------------------------------
123 virtual ::rtl::OUString SAL_CALL
convertRangeToXML( const ::rtl::OUString
& sRangeRepresentation
)
124 throw ( ::com::sun::star::uno::RuntimeException
, ::com::sun::star::lang::IllegalArgumentException
);
126 virtual ::rtl::OUString SAL_CALL
convertRangeFromXML( const ::rtl::OUString
& sXMLRange
)
127 throw ( ::com::sun::star::uno::RuntimeException
, ::com::sun::star::lang::IllegalArgumentException
);
129 // XPropertySet ----------------------------------------------------------
131 virtual ::com::sun::star::uno::Reference
<
132 ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
133 getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException
);
135 virtual void SAL_CALL
setPropertyValue(
136 const ::rtl::OUString
& rPropertyName
,
137 const ::com::sun::star::uno::Any
& rValue
)
138 throw( ::com::sun::star::beans::UnknownPropertyException
,
139 ::com::sun::star::beans::PropertyVetoException
,
140 ::com::sun::star::lang::IllegalArgumentException
,
141 ::com::sun::star::lang::WrappedTargetException
,
142 ::com::sun::star::uno::RuntimeException
);
144 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
145 const ::rtl::OUString
& rPropertyName
)
146 throw( ::com::sun::star::beans::UnknownPropertyException
,
147 ::com::sun::star::lang::WrappedTargetException
,
148 ::com::sun::star::uno::RuntimeException
);
150 virtual void SAL_CALL
addPropertyChangeListener(
151 const ::rtl::OUString
& rPropertyName
,
152 const ::com::sun::star::uno::Reference
<
153 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
154 throw( ::com::sun::star::beans::UnknownPropertyException
,
155 ::com::sun::star::lang::WrappedTargetException
,
156 ::com::sun::star::uno::RuntimeException
);
158 virtual void SAL_CALL
removePropertyChangeListener(
159 const ::rtl::OUString
& rPropertyName
,
160 const ::com::sun::star::uno::Reference
<
161 ::com::sun::star::beans::XPropertyChangeListener
>& rListener
)
162 throw( ::com::sun::star::beans::UnknownPropertyException
,
163 ::com::sun::star::lang::WrappedTargetException
,
164 ::com::sun::star::uno::RuntimeException
);
166 virtual void SAL_CALL
addVetoableChangeListener(
167 const ::rtl::OUString
& rPropertyName
,
168 const ::com::sun::star::uno::Reference
<
169 ::com::sun::star::beans::XVetoableChangeListener
>& rListener
)
170 throw( ::com::sun::star::beans::UnknownPropertyException
,
171 ::com::sun::star::lang::WrappedTargetException
,
172 ::com::sun::star::uno::RuntimeException
);
174 virtual void SAL_CALL
removeVetoableChangeListener(
175 const ::rtl::OUString
& rPropertyName
,
176 const ::com::sun::star::uno::Reference
<
177 ::com::sun::star::beans::XVetoableChangeListener
>& rListener
)
178 throw( ::com::sun::star::beans::UnknownPropertyException
,
179 ::com::sun::star::lang::WrappedTargetException
,
180 ::com::sun::star::uno::RuntimeException
);
182 // XServiceInfo ----------------------------------------------------------
184 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw(
185 ::com::sun::star::uno::RuntimeException
);
187 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
&
188 rServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
190 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
191 getSupportedServiceNames() throw(
192 ::com::sun::star::uno::RuntimeException
);
195 * Check the current list of reference tokens, and add the upper left
196 * corner of the minimum range that encloses all ranges if certain
197 * conditions are met.
199 * @param rRefTokens list of reference tokens
201 * @return true if the corner was added, false otherwise.
203 static bool addUpperLeftCornerIfMissing(::std::vector
<ScSharedTokenRef
>& rRefTokens
);
207 void detectRangesFromDataSource(::std::vector
<ScSharedTokenRef
>& rRefTokens
,
208 ::com::sun::star::chart::ChartDataRowSource
& rRowSource
,
209 bool& rRowSourceDetected
,
210 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataSource
>& xDataSource
);
214 ScDocument
* m_pDocument
;
215 SfxItemPropertySet m_aPropSet
;
216 sal_Bool m_bIncludeHiddenCells
;
220 // DataSource ================================================================
222 class ScChart2DataSource
: public
223 ::cppu::WeakImplHelper2
<
224 ::com::sun::star::chart2::data::XDataSource
,
225 ::com::sun::star::lang::XServiceInfo
>,
230 explicit ScChart2DataSource( ScDocument
* pDoc
);
231 virtual ~ScChart2DataSource();
232 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
234 // XDataSource -----------------------------------------------------------
236 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
<
237 ::com::sun::star::chart2::data::XLabeledDataSequence
> > SAL_CALL
238 getDataSequences() throw (::com::sun::star::uno::RuntimeException
);
240 // XServiceInfo ----------------------------------------------------------
242 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw(
243 ::com::sun::star::uno::RuntimeException
);
245 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
&
246 rServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
248 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
249 getSupportedServiceNames() throw(
250 ::com::sun::star::uno::RuntimeException
);
254 void AddLabeledSequence(const com::sun::star::uno::Reference
< com::sun::star::chart2::data::XLabeledDataSequence
>& xNew
);
258 ScDocument
* m_pDocument
;
259 typedef std::list
< com::sun::star::uno::Reference
< com::sun::star::chart2::data::XLabeledDataSequence
> > LabeledList
;
260 LabeledList m_aLabeledSequences
;
265 // LabeledDataSequence =======================================================
267 class ScChart2LabeledDataSequence
: public
268 ::cppu::WeakImplHelper4
<
269 ::com::sun::star::chart2::data::XLabeledDataSequence
,
270 ::com::sun::star::util::XCloneable
,
271 ::com::sun::star::util::XModifyBroadcaster
,
272 ::com::sun::star::lang::XServiceInfo
>,
277 explicit ScChart2LabeledDataSequence( ScDocument
* pDoc
);
278 virtual ~ScChart2LabeledDataSequence();
280 // SfxListener -----------------------------------------------------------
282 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
284 // XLabeledDataSequence --------------------------------------------------
286 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataSequence
> SAL_CALL
getValues()
287 throw (::com::sun::star::uno::RuntimeException
);
288 virtual void SAL_CALL
setValues(
289 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataSequence
>& xSequence
)
290 throw (::com::sun::star::uno::RuntimeException
);
291 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataSequence
> SAL_CALL
getLabel()
292 throw (::com::sun::star::uno::RuntimeException
);
293 virtual void SAL_CALL
setLabel(
294 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataSequence
>& xSequence
)
295 throw (::com::sun::star::uno::RuntimeException
);
297 // XCloneable ------------------------------------------------------------
299 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
300 throw (::com::sun::star::uno::RuntimeException
);
302 // XModifyBroadcaster ----------------------------------------------------
304 virtual void SAL_CALL
addModifyListener(
305 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
306 throw (::com::sun::star::uno::RuntimeException
);
307 virtual void SAL_CALL
removeModifyListener(
308 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
309 throw (::com::sun::star::uno::RuntimeException
);
311 // XServiceInfo ----------------------------------------------------------
313 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw(
314 ::com::sun::star::uno::RuntimeException
);
315 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
&
316 rServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
317 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
318 getSupportedServiceNames() throw(
319 ::com::sun::star::uno::RuntimeException
);
322 ::com::sun::star::uno::Reference
<
323 ::com::sun::star::chart2::data::XDataSequence
> m_aData
;
324 ::com::sun::star::uno::Reference
<
325 ::com::sun::star::chart2::data::XDataSequence
> m_aLabel
;
326 ScDocument
* m_pDocument
;
329 // DataSequence ==============================================================
331 class ScChart2DataSequence
: public
332 ::cppu::WeakImplHelper7
<
333 ::com::sun::star::chart2::data::XDataSequence
,
334 ::com::sun::star::chart2::data::XTextualDataSequence
,
335 ::com::sun::star::chart2::data::XNumericalDataSequence
,
336 ::com::sun::star::util::XCloneable
,
337 ::com::sun::star::util::XModifyBroadcaster
,
338 ::com::sun::star::beans::XPropertySet
,
339 // ::com::sun::star::lang::XUnoTunnel,
340 ::com::sun::star::lang::XServiceInfo
>,
344 explicit ScChart2DataSequence( ScDocument
* pDoc
,
345 const com::sun::star::uno::Reference
< com::sun::star::chart2::data::XDataProvider
>& xDP
,
346 ::std::vector
<ScSharedTokenRef
>* pTokens
, bool bIncludeHiddenCells
);
348 virtual ~ScChart2DataSequence();
349 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
351 // XDataSequence ---------------------------------------------------------
353 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>
354 SAL_CALL
getData() throw (::com::sun::star::uno::RuntimeException
);
355 virtual ::rtl::OUString SAL_CALL
getSourceRangeRepresentation()
356 throw (::com::sun::star::uno::RuntimeException
);
357 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
>
358 SAL_CALL
generateLabel(::com::sun::star::chart2::data::LabelOrigin nOrigin
)
359 throw (::com::sun::star::uno::RuntimeException
);
360 virtual ::sal_Int32 SAL_CALL
getNumberFormatKeyByIndex( ::sal_Int32 nIndex
)
361 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
362 ::com::sun::star::uno::RuntimeException
);
364 // XNumericalDataSequence --------------------------------------------------
366 virtual ::com::sun::star::uno::Sequence
< double >
367 SAL_CALL
getNumericalData( ) throw (::com::sun::star::uno::RuntimeException
);
369 // XTextualDataSequence --------------------------------------------------
371 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
>
372 SAL_CALL
getTextualData( ) throw (::com::sun::star::uno::RuntimeException
);
374 // XPropertySet ----------------------------------------------------------
376 virtual ::com::sun::star::uno::Reference
<
377 ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
378 getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException
);
380 virtual void SAL_CALL
setPropertyValue(
381 const ::rtl::OUString
& rPropertyName
,
382 const ::com::sun::star::uno::Any
& rValue
)
383 throw( ::com::sun::star::beans::UnknownPropertyException
,
384 ::com::sun::star::beans::PropertyVetoException
,
385 ::com::sun::star::lang::IllegalArgumentException
,
386 ::com::sun::star::lang::WrappedTargetException
,
387 ::com::sun::star::uno::RuntimeException
);
389 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
390 const ::rtl::OUString
& rPropertyName
)
391 throw( ::com::sun::star::beans::UnknownPropertyException
,
392 ::com::sun::star::lang::WrappedTargetException
,
393 ::com::sun::star::uno::RuntimeException
);
395 virtual void SAL_CALL
addPropertyChangeListener(
396 const ::rtl::OUString
& rPropertyName
,
397 const ::com::sun::star::uno::Reference
<
398 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
399 throw( ::com::sun::star::beans::UnknownPropertyException
,
400 ::com::sun::star::lang::WrappedTargetException
,
401 ::com::sun::star::uno::RuntimeException
);
403 virtual void SAL_CALL
removePropertyChangeListener(
404 const ::rtl::OUString
& rPropertyName
,
405 const ::com::sun::star::uno::Reference
<
406 ::com::sun::star::beans::XPropertyChangeListener
>& rListener
)
407 throw( ::com::sun::star::beans::UnknownPropertyException
,
408 ::com::sun::star::lang::WrappedTargetException
,
409 ::com::sun::star::uno::RuntimeException
);
411 virtual void SAL_CALL
addVetoableChangeListener(
412 const ::rtl::OUString
& rPropertyName
,
413 const ::com::sun::star::uno::Reference
<
414 ::com::sun::star::beans::XVetoableChangeListener
>& rListener
)
415 throw( ::com::sun::star::beans::UnknownPropertyException
,
416 ::com::sun::star::lang::WrappedTargetException
,
417 ::com::sun::star::uno::RuntimeException
);
419 virtual void SAL_CALL
removeVetoableChangeListener(
420 const ::rtl::OUString
& rPropertyName
,
421 const ::com::sun::star::uno::Reference
<
422 ::com::sun::star::beans::XVetoableChangeListener
>& rListener
)
423 throw( ::com::sun::star::beans::UnknownPropertyException
,
424 ::com::sun::star::lang::WrappedTargetException
,
425 ::com::sun::star::uno::RuntimeException
);
427 // XCloneable ------------------------------------------------------------
429 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
430 throw (::com::sun::star::uno::RuntimeException
);
432 // XModifyBroadcaster ----------------------------------------------------
434 virtual void SAL_CALL
addModifyListener(
435 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
436 throw (::com::sun::star::uno::RuntimeException
);
437 virtual void SAL_CALL
removeModifyListener(
438 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
439 throw (::com::sun::star::uno::RuntimeException
);
441 // XServiceInfo ----------------------------------------------------------
443 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw(
444 ::com::sun::star::uno::RuntimeException
);
446 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
&
447 rServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
449 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
450 getSupportedServiceNames() throw(
451 ::com::sun::star::uno::RuntimeException
);
453 // XUnoTunnel ------------------------------------------------------------
455 // virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
456 // sal_Int8 >& aIdentifier )
457 // throw(::com::sun::star::uno::RuntimeException);
459 // static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
460 // static ScChart2DataSequence* getImplementation( const com::sun::star::uno::Reference<
461 // com::sun::star::uno::XInterface> xObj );
464 void setDataChangedHint(bool b
);
466 // Implementation --------------------------------------------------------
469 DECL_LINK( ValueListenerHdl
, SfxHint
* );
472 ScChart2DataSequence(); // disabled
473 ScChart2DataSequence(const ScChart2DataSequence
& r
); // disabled
475 class ExternalRefListener
: public ScExternalRefManager::LinkListener
478 ExternalRefListener(ScChart2DataSequence
& rParent
, ScDocument
* pDoc
);
479 virtual ~ExternalRefListener();
480 virtual void notify(sal_uInt16 nFileId
, ScExternalRefManager::LinkUpdateType eType
);
481 void addFileId(sal_uInt16 nFileId
);
482 void removeFileId(sal_uInt16 nFileId
);
483 const ::std::hash_set
<sal_uInt16
>& getAllFileIds();
486 ExternalRefListener();
487 ExternalRefListener(const ExternalRefListener
& r
);
489 ScChart2DataSequence
& mrParent
;
490 ::std::hash_set
<sal_uInt16
> maFileIds
;
495 * Build an internal data array to cache the data ranges, and other
496 * information such as hidden values.
498 void BuildDataCache();
500 void RebuildDataCache();
502 sal_Int32
FillCacheFromExternalRef(const ScSharedTokenRef
& pToken
);
504 void UpdateTokensFromRanges(const ScRangeList
& rRanges
);
506 ExternalRefListener
* GetExtRefListener();
508 void StopListeningToAllExternalRefs();
510 void CopyData(const ScChart2DataSequence
& r
);
518 ::rtl::OUString maString
;
523 class HiddenRangeListener
: public ScChartHiddenRangeListener
526 HiddenRangeListener(ScChart2DataSequence
& rParent
);
527 virtual ~HiddenRangeListener();
529 virtual void notify();
532 ScChart2DataSequence
& mrParent
;
535 ::std::list
<Item
> m_aDataArray
;
536 ::com::sun::star::uno::Sequence
<sal_Int32
> m_aHiddenValues
;
539 ::com::sun::star::chart2::data::DataSequenceRole m_aRole
;
540 sal_Bool m_bIncludeHiddenCells
;
543 typedef ::std::auto_ptr
< ::std::vector
<ScSharedTokenRef
> > TokenListPtr
;
544 typedef ::std::auto_ptr
< ::std::vector
<sal_uInt32
> > RangeIndexMapPtr
;
545 typedef ::std::auto_ptr
<ExternalRefListener
> ExtRefListenerPtr
;
547 sal_Int64 m_nObjectId
;
548 ScDocument
* m_pDocument
;
549 TokenListPtr m_pTokens
;
550 RangeIndexMapPtr m_pRangeIndices
;
551 ExtRefListenerPtr m_pExtRefListener
;
552 com::sun::star::uno::Reference
< com::sun::star::chart2::data::XDataProvider
> m_xDataProvider
;
553 SfxItemPropertySet m_aPropSet
;
555 ::std::auto_ptr
<HiddenRangeListener
> m_pHiddenListener
;
556 ScLinkListener
* m_pValueListener
;
557 XModifyListenerArr_Impl m_aValueListeners
;
559 bool m_bGotDataChangedHint
;
560 bool m_bExtDataRebuildQueued
;
563 #if USE_CHART2_EMPTYDATASEQUENCE
564 // DataSequence ==============================================================
566 class ScChart2EmptyDataSequence
: public
567 ::cppu::WeakImplHelper6
<
568 ::com::sun::star::chart2::data::XDataSequence
,
569 ::com::sun::star::chart2::data::XTextualDataSequence
,
570 ::com::sun::star::util::XCloneable
,
571 ::com::sun::star::util::XModifyBroadcaster
,
572 ::com::sun::star::beans::XPropertySet
,
573 // ::com::sun::star::lang::XUnoTunnel,
574 ::com::sun::star::lang::XServiceInfo
>,
579 explicit ScChart2EmptyDataSequence( ScDocument
* pDoc
,
580 const com::sun::star::uno::Reference
< com::sun::star::chart2::data::XDataProvider
>& xDP
,
581 const ScRangeListRef
& rRangeList
, sal_Bool bColumn
);
582 virtual ~ScChart2EmptyDataSequence();
583 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
585 // XDataSequence ---------------------------------------------------------
587 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Any
>
588 SAL_CALL
getData() throw (::com::sun::star::uno::RuntimeException
);
589 virtual ::rtl::OUString SAL_CALL
getSourceRangeRepresentation()
590 throw (::com::sun::star::uno::RuntimeException
);
591 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
>
592 SAL_CALL
generateLabel(::com::sun::star::chart2::data::LabelOrigin nOrigin
)
593 throw (::com::sun::star::uno::RuntimeException
);
594 virtual ::sal_Int32 SAL_CALL
getNumberFormatKeyByIndex( ::sal_Int32 nIndex
)
595 throw (::com::sun::star::lang::IndexOutOfBoundsException
,
596 ::com::sun::star::uno::RuntimeException
);
598 // XTextualDataSequence --------------------------------------------------
600 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
>
601 SAL_CALL
getTextualData( ) throw (::com::sun::star::uno::RuntimeException
);
603 // XPropertySet ----------------------------------------------------------
605 virtual ::com::sun::star::uno::Reference
<
606 ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
607 getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException
);
609 virtual void SAL_CALL
setPropertyValue(
610 const ::rtl::OUString
& rPropertyName
,
611 const ::com::sun::star::uno::Any
& rValue
)
612 throw( ::com::sun::star::beans::UnknownPropertyException
,
613 ::com::sun::star::beans::PropertyVetoException
,
614 ::com::sun::star::lang::IllegalArgumentException
,
615 ::com::sun::star::lang::WrappedTargetException
,
616 ::com::sun::star::uno::RuntimeException
);
618 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
619 const ::rtl::OUString
& rPropertyName
)
620 throw( ::com::sun::star::beans::UnknownPropertyException
,
621 ::com::sun::star::lang::WrappedTargetException
,
622 ::com::sun::star::uno::RuntimeException
);
624 virtual void SAL_CALL
addPropertyChangeListener(
625 const ::rtl::OUString
& rPropertyName
,
626 const ::com::sun::star::uno::Reference
<
627 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
628 throw( ::com::sun::star::beans::UnknownPropertyException
,
629 ::com::sun::star::lang::WrappedTargetException
,
630 ::com::sun::star::uno::RuntimeException
);
632 virtual void SAL_CALL
removePropertyChangeListener(
633 const ::rtl::OUString
& rPropertyName
,
634 const ::com::sun::star::uno::Reference
<
635 ::com::sun::star::beans::XPropertyChangeListener
>& rListener
)
636 throw( ::com::sun::star::beans::UnknownPropertyException
,
637 ::com::sun::star::lang::WrappedTargetException
,
638 ::com::sun::star::uno::RuntimeException
);
640 virtual void SAL_CALL
addVetoableChangeListener(
641 const ::rtl::OUString
& rPropertyName
,
642 const ::com::sun::star::uno::Reference
<
643 ::com::sun::star::beans::XVetoableChangeListener
>& rListener
)
644 throw( ::com::sun::star::beans::UnknownPropertyException
,
645 ::com::sun::star::lang::WrappedTargetException
,
646 ::com::sun::star::uno::RuntimeException
);
648 virtual void SAL_CALL
removeVetoableChangeListener(
649 const ::rtl::OUString
& rPropertyName
,
650 const ::com::sun::star::uno::Reference
<
651 ::com::sun::star::beans::XVetoableChangeListener
>& rListener
)
652 throw( ::com::sun::star::beans::UnknownPropertyException
,
653 ::com::sun::star::lang::WrappedTargetException
,
654 ::com::sun::star::uno::RuntimeException
);
656 // XCloneable ------------------------------------------------------------
658 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
659 throw (::com::sun::star::uno::RuntimeException
);
661 // XModifyBroadcaster ----------------------------------------------------
663 virtual void SAL_CALL
addModifyListener(
664 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
665 throw (::com::sun::star::uno::RuntimeException
);
666 virtual void SAL_CALL
removeModifyListener(
667 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
668 throw (::com::sun::star::uno::RuntimeException
);
670 // XServiceInfo ----------------------------------------------------------
672 virtual ::rtl::OUString SAL_CALL
getImplementationName() throw(
673 ::com::sun::star::uno::RuntimeException
);
675 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
&
676 rServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
678 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
679 getSupportedServiceNames() throw(
680 ::com::sun::star::uno::RuntimeException
);
682 // XUnoTunnel ------------------------------------------------------------
684 // virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
685 // sal_Int8 >& aIdentifier )
686 // throw(::com::sun::star::uno::RuntimeException);
688 // static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
689 // static ScChart2DataSequence* getImplementation( const com::sun::star::uno::Reference<
690 // com::sun::star::uno::XInterface> xObj );
692 // Implementation --------------------------------------------------------
694 ScRangeListRef
GetRangeList() { return m_xRanges
; }
699 ::com::sun::star::chart2::data::DataSequenceRole m_aRole
;
700 sal_Bool m_bIncludeHiddenCells
;
702 ScRangeListRef m_xRanges
;
703 ScDocument
* m_pDocument
;
704 com::sun::star::uno::Reference
< com::sun::star::chart2::data::XDataProvider
> m_xDataProvider
;
705 SfxItemPropertySet m_aPropSet
;
706 sal_Bool m_bColumn
; // defines the orientation to create the right labels
711 #endif // SC_CHART2UNO_HXX