update ooo310-m15
[ooovba.git] / applied_patches / 0182-chart-skip-hidden-cells-sc.diff
blobdc021c7bcc5bc4ee579c0ee370ea61ae511b3989
1 diff --git sc/inc/chart2uno.hxx sc/inc/chart2uno.hxx
2 index 964428e..f6ae3fd 100644
3 --- sc/inc/chart2uno.hxx
4 +++ sc/inc/chart2uno.hxx
5 @@ -35,6 +35,7 @@
6 #include "rangelst.hxx"
7 #include "externalrefmgr.hxx"
8 #include "token.hxx"
9 +#include "chartlis.hxx"
11 #include <svtools/lstner.hxx>
12 #include <com/sun/star/chart/ChartDataRowSource.hpp>
13 @@ -54,7 +55,6 @@
14 // #include <com/sun/star/lang/XUnoTunnel.hpp>
15 // #endif
16 #include <cppuhelper/implbase2.hxx>
17 -#include <cppuhelper/implbase3.hxx>
18 #include <cppuhelper/implbase4.hxx>
19 #include <cppuhelper/implbase6.hxx>
20 #include <cppuhelper/implbase7.hxx>
21 @@ -74,9 +74,10 @@ class ScDocument;
22 // DataProvider ==============================================================
24 class ScChart2DataProvider : public
25 - ::cppu::WeakImplHelper3<
26 + ::cppu::WeakImplHelper4<
27 ::com::sun::star::chart2::data::XDataProvider,
28 ::com::sun::star::chart2::data::XRangeXMLConversion,
29 + ::com::sun::star::beans::XPropertySet,
30 ::com::sun::star::lang::XServiceInfo>,
31 SfxListener
33 @@ -125,6 +126,59 @@ public:
34 virtual ::rtl::OUString SAL_CALL convertRangeFromXML( const ::rtl::OUString& sXMLRange )
35 throw ( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
37 + // XPropertySet ----------------------------------------------------------
39 + virtual ::com::sun::star::uno::Reference<
40 + ::com::sun::star::beans::XPropertySetInfo> SAL_CALL
41 + getPropertySetInfo() throw( ::com::sun::star::uno::RuntimeException);
43 + virtual void SAL_CALL setPropertyValue(
44 + const ::rtl::OUString& rPropertyName,
45 + const ::com::sun::star::uno::Any& rValue)
46 + throw( ::com::sun::star::beans::UnknownPropertyException,
47 + ::com::sun::star::beans::PropertyVetoException,
48 + ::com::sun::star::lang::IllegalArgumentException,
49 + ::com::sun::star::lang::WrappedTargetException,
50 + ::com::sun::star::uno::RuntimeException);
52 + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
53 + const ::rtl::OUString& rPropertyName)
54 + throw( ::com::sun::star::beans::UnknownPropertyException,
55 + ::com::sun::star::lang::WrappedTargetException,
56 + ::com::sun::star::uno::RuntimeException);
58 + virtual void SAL_CALL addPropertyChangeListener(
59 + const ::rtl::OUString& rPropertyName,
60 + const ::com::sun::star::uno::Reference<
61 + ::com::sun::star::beans::XPropertyChangeListener>& xListener)
62 + throw( ::com::sun::star::beans::UnknownPropertyException,
63 + ::com::sun::star::lang::WrappedTargetException,
64 + ::com::sun::star::uno::RuntimeException);
66 + virtual void SAL_CALL removePropertyChangeListener(
67 + const ::rtl::OUString& rPropertyName,
68 + const ::com::sun::star::uno::Reference<
69 + ::com::sun::star::beans::XPropertyChangeListener>& rListener)
70 + throw( ::com::sun::star::beans::UnknownPropertyException,
71 + ::com::sun::star::lang::WrappedTargetException,
72 + ::com::sun::star::uno::RuntimeException);
74 + virtual void SAL_CALL addVetoableChangeListener(
75 + const ::rtl::OUString& rPropertyName,
76 + const ::com::sun::star::uno::Reference<
77 + ::com::sun::star::beans::XVetoableChangeListener>& rListener)
78 + throw( ::com::sun::star::beans::UnknownPropertyException,
79 + ::com::sun::star::lang::WrappedTargetException,
80 + ::com::sun::star::uno::RuntimeException);
82 + virtual void SAL_CALL removeVetoableChangeListener(
83 + const ::rtl::OUString& rPropertyName,
84 + const ::com::sun::star::uno::Reference<
85 + ::com::sun::star::beans::XVetoableChangeListener>& rListener)
86 + throw( ::com::sun::star::beans::UnknownPropertyException,
87 + ::com::sun::star::lang::WrappedTargetException,
88 + ::com::sun::star::uno::RuntimeException);
90 // XServiceInfo ----------------------------------------------------------
92 virtual ::rtl::OUString SAL_CALL getImplementationName() throw(
93 @@ -158,6 +212,8 @@ private:
94 private:
96 ScDocument* m_pDocument;
97 + SfxItemPropertySet m_aPropSet;
98 + sal_Bool m_bIncludeHiddenCells;
102 @@ -287,7 +343,7 @@ class ScChart2DataSequence : public
103 public:
104 explicit ScChart2DataSequence( ScDocument* pDoc,
105 const com::sun::star::uno::Reference< com::sun::star::chart2::data::XDataProvider >& xDP,
106 - ::std::vector<ScSharedTokenRef>* pTokens);
107 + ::std::vector<ScSharedTokenRef>* pTokens, bool bIncludeHiddenCells );
109 virtual ~ScChart2DataSequence();
110 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
111 @@ -404,6 +460,9 @@ public:
112 // static ScChart2DataSequence* getImplementation( const com::sun::star::uno::Reference<
113 // com::sun::star::uno::XInterface> xObj );
115 +private:
116 + void setDataChangedHint(bool b);
118 // Implementation --------------------------------------------------------
120 void RefChanged();
121 @@ -461,12 +520,24 @@ private:
122 Item();
125 + class HiddenRangeListener : public ScChartHiddenRangeListener
127 + public:
128 + HiddenRangeListener(ScChart2DataSequence& rParent);
129 + virtual ~HiddenRangeListener();
131 + virtual void notify();
133 + private:
134 + ScChart2DataSequence& mrParent;
135 + };
137 ::std::list<Item> m_aDataArray;
138 ::com::sun::star::uno::Sequence<sal_Int32> m_aHiddenValues;
140 // properties
141 ::com::sun::star::chart2::data::DataSequenceRole m_aRole;
142 - sal_Bool m_bHidden;
143 + sal_Bool m_bIncludeHiddenCells;
145 // internals
146 typedef ::std::auto_ptr< ::std::vector<ScSharedTokenRef> > TokenListPtr;
147 @@ -481,6 +552,7 @@ private:
148 com::sun::star::uno::Reference < com::sun::star::chart2::data::XDataProvider > m_xDataProvider;
149 SfxItemPropertySet m_aPropSet;
151 + ::std::auto_ptr<HiddenRangeListener> m_pHiddenListener;
152 ScLinkListener* m_pValueListener;
153 XModifyListenerArr_Impl m_aValueListeners;
155 @@ -625,7 +697,7 @@ private:
157 // properties
158 ::com::sun::star::chart2::data::DataSequenceRole m_aRole;
159 - sal_Bool m_bHidden;
160 + sal_Bool m_bIncludeHiddenCells;
161 // internals
162 ScRangeListRef m_xRanges;
163 ScDocument* m_pDocument;
164 diff --git sc/inc/chartlis.hxx sc/inc/chartlis.hxx
165 index e6f2d63..1bc4f6f 100644
166 --- sc/inc/chartlis.hxx
167 +++ sc/inc/chartlis.hxx
168 @@ -41,6 +41,7 @@
170 #include <memory>
171 #include <vector>
172 +#include <list>
173 #include <hash_set>
175 class ScDocument;
176 @@ -131,9 +132,31 @@ public:
177 { return !operator==( r ); }
180 +// ============================================================================
182 +class ScChartHiddenRangeListener
184 +public:
185 + ScChartHiddenRangeListener();
186 + virtual ~ScChartHiddenRangeListener();
187 + virtual void notify() = 0;
190 +// ============================================================================
192 class ScChartListenerCollection : public ScStrCollection
194 +public:
195 + struct RangeListenerItem
197 + ScRange maRange;
198 + ScChartHiddenRangeListener* mpListener;
199 + explicit RangeListenerItem(const ScRange& rRange, ScChartHiddenRangeListener* p);
200 + };
202 private:
203 + ::std::list<RangeListenerItem> maHiddenListeners;
205 Timer aTimer;
206 ScDocument* pDoc;
208 @@ -173,6 +196,24 @@ public:
209 void UpdateChartsContainingTab( SCTAB nTab );
211 BOOL operator==( const ScChartListenerCollection& );
213 + /**
214 + * Start listening on hide/show change within specified cell range. A
215 + * single listener may listen on multiple ranges when the caller passes
216 + * the same pointer multiple times with different ranges.
217 + *
218 + * Note that the caller is responsible for managing the life-cycle of the
219 + * listener instance.
220 + */
221 + void StartListeningHiddenRange( const ScRange& rRange,
222 + ScChartHiddenRangeListener* pListener );
224 + /**
225 + * Remove all ranges associated with passed listener instance from the
226 + * list of hidden range listeners. This does not delete the passed
227 + * listener instance.
228 + */
229 + void EndListeningHiddenRange( ScChartHiddenRangeListener* pListener );
233 diff --git sc/inc/unonames.hxx sc/inc/unonames.hxx
234 index 504ff00..be9e07b 100644
235 --- sc/inc/unonames.hxx
236 +++ sc/inc/unonames.hxx
237 @@ -610,8 +610,9 @@
238 #define SC_UNO_COMPILEFAP "CompileFAP"
240 // Chart2
241 -#define SC_UNONAME_ISHIDDEN "IsHidden"
242 -#define SC_UNONAME_ROLE "Role"
243 +#define SC_UNONAME_ROLE "Role"
244 +#define SC_UNONAME_HIDDENVALUES "HiddenValues"
245 +#define SC_UNONAME_INCLUDEHIDDENCELLS "IncludeHiddenCells"
246 #define SC_UNONAME_HIDDENVALUES "HiddenValues"
248 // Solver
249 diff --git sc/source/core/data/table2.cxx sc/source/core/data/table2.cxx
250 index 9aef9cc..388a2e2 100644
251 --- sc/source/core/data/table2.cxx
252 +++ sc/source/core/data/table2.cxx
253 @@ -633,8 +633,6 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
255 // Charts muessen beim Ein-/Ausblenden angepasst werden
256 ScChartListenerCollection* pCharts = pDestTab->pDocument->GetChartListenerCollection();
257 - if ( pCharts && !pCharts->GetCount() )
258 - pCharts = NULL;
260 if (nRow1==0 && nRow2==MAXROW && pColWidth && pDestTab->pColWidth)
261 for (SCCOL i=nCol1; i<=nCol2; i++)
262 @@ -2237,7 +2235,7 @@ void ScTable::ShowCol(SCCOL nCol, BOOL bShow)
263 SetDrawPageSize();
265 ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
266 - if ( pCharts && pCharts->GetCount() )
267 + if ( pCharts )
268 pCharts->SetRangeDirty(ScRange( nCol, 0, nTab, nCol, MAXROW, nTab ));
271 @@ -2274,7 +2272,7 @@ void ScTable::ShowRow(SCROW nRow, BOOL bShow)
272 SetDrawPageSize();
274 ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
275 - if ( pCharts && pCharts->GetCount() )
276 + if ( pCharts )
277 pCharts->SetRangeDirty(ScRange( 0, nRow, nTab, MAXCOL, nRow, nTab ));
280 @@ -2315,7 +2313,7 @@ void ScTable::DBShowRow(SCROW nRow, BOOL bShow)
281 if (bWasVis != bShow)
283 ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
284 - if ( pCharts && pCharts->GetCount() )
285 + if ( pCharts )
286 pCharts->SetRangeDirty(ScRange( 0, nRow, nTab, MAXCOL, nRow, nTab ));
288 if (pOutlineTable)
289 @@ -2363,7 +2361,7 @@ void ScTable::DBShowRows(SCROW nRow1, SCROW nRow2, BOOL bShow)
290 if ( bChanged )
292 ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
293 - if ( pCharts && pCharts->GetCount() )
294 + if ( pCharts )
295 pCharts->SetRangeDirty(ScRange( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab ));
298 @@ -2415,7 +2413,7 @@ void ScTable::ShowRows(SCROW nRow1, SCROW nRow2, BOOL bShow)
299 if ( bChanged )
301 ScChartListenerCollection* pCharts = pDocument->GetChartListenerCollection();
302 - if ( pCharts && pCharts->GetCount() )
303 + if ( pCharts )
304 pCharts->SetRangeDirty(ScRange( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab ));
307 diff --git sc/source/core/tool/chartlis.cxx sc/source/core/tool/chartlis.cxx
308 index 8d3436a..e09b082 100644
309 --- sc/source/core/tool/chartlis.cxx
310 +++ sc/source/core/tool/chartlis.cxx
311 @@ -42,6 +42,7 @@
313 using namespace com::sun::star;
314 using ::std::vector;
315 +using ::std::list;
316 using ::std::hash_set;
317 using ::std::auto_ptr;
318 using ::std::unary_function;
319 @@ -454,9 +455,24 @@ BOOL ScChartListener::operator==( const ScChartListener& r )
320 return *mpTokens == *r.mpTokens;
323 +// ============================================================================
325 +ScChartHiddenRangeListener::ScChartHiddenRangeListener()
329 +ScChartHiddenRangeListener::~ScChartHiddenRangeListener()
331 + // empty d'tor
334 // === ScChartListenerCollection ======================================
336 +ScChartListenerCollection::RangeListenerItem::RangeListenerItem(const ScRange& rRange, ScChartHiddenRangeListener* p) :
337 + maRange(rRange), mpListener(p)
341 ScChartListenerCollection::ScChartListenerCollection( ScDocument* pDocP ) :
342 ScStrCollection( 4, 4, FALSE ),
343 pDoc( pDocP )
344 @@ -643,6 +659,14 @@ void ScChartListenerCollection::SetRangeDirty( const ScRange& rRange )
346 if ( bDirty )
347 StartTimer();
349 + // New hidden range listener implementation
350 + for (list<RangeListenerItem>::iterator itr = maHiddenListeners.begin(), itrEnd = maHiddenListeners.end();
351 + itr != itrEnd; ++itr)
353 + if (itr->maRange.Intersects(rRange))
354 + itr->mpListener->notify();
359 @@ -682,6 +706,34 @@ BOOL ScChartListenerCollection::operator==( const ScChartListenerCollection& r )
360 return TRUE;
363 +void ScChartListenerCollection::StartListeningHiddenRange( const ScRange& rRange, ScChartHiddenRangeListener* pListener )
365 + RangeListenerItem aItem(rRange, pListener);
366 + maHiddenListeners.push_back(aItem);
369 +namespace {
371 +struct MatchListener : public ::std::unary_function<
372 + ScChartListenerCollection::RangeListenerItem, bool>
374 + MatchListener(const ScChartHiddenRangeListener* pMatch) :
375 + mpMatch(pMatch)
379 + bool operator() (const ScChartListenerCollection::RangeListenerItem& rItem) const
381 + return mpMatch == rItem.mpListener;
384 +private:
385 + const ScChartHiddenRangeListener* mpMatch;
389 +void ScChartListenerCollection::EndListeningHiddenRange( ScChartHiddenRangeListener* pListener )
391 + maHiddenListeners.remove_if(MatchListener(pListener));
394 diff --git sc/source/core/tool/chartpos.cxx sc/source/core/tool/chartpos.cxx
395 index 5f46ab3..a5ca8c3 100644
396 --- sc/source/core/tool/chartpos.cxx
397 +++ sc/source/core/tool/chartpos.cxx
398 @@ -307,27 +307,18 @@ void ScChartPositioner::CheckColRowHeaders()
399 if ( aRangeListRef->Count() == 1 )
401 aRangeListRef->First()->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
402 - // Beschriftungen auch nach hidden Cols/Rows finden
403 - while ( nCol1 <= nCol2 && (pDocument->GetColFlags(
404 - nCol1, nTab1) & CR_HIDDEN) != 0 )
405 - nCol1++;
406 - while ( nRow1 <= nRow2 && (pDocument->GetRowFlags(
407 - nRow1, nTab1) & CR_HIDDEN) != 0 )
408 - nRow1++;
409 if ( nCol1 > nCol2 || nRow1 > nRow2 )
410 bColStrings = bRowStrings = FALSE;
411 else
413 for (iCol=nCol1; iCol<=nCol2 && bColStrings; iCol++)
415 - if ( iCol==nCol1 || (pDocument->GetColFlags( iCol, nTab1) & CR_HIDDEN) == 0 )
416 - if (pDocument->HasValueData( iCol, nRow1, nTab1 ))
417 + if (pDocument->HasValueData( iCol, nRow1, nTab1 ))
418 bColStrings = FALSE;
420 for (iRow=nRow1; iRow<=nRow2 && bRowStrings; iRow++)
422 - if ( iRow==nRow1 || (pDocument->GetRowFlags( iRow, nTab1) & CR_HIDDEN) == 0 )
423 - if (pDocument->HasValueData( nCol1, iRow, nTab1 ))
424 + if (pDocument->HasValueData( nCol1, iRow, nTab1 ))
425 bRowStrings = FALSE;
428 @@ -341,43 +332,22 @@ void ScChartPositioner::CheckColRowHeaders()
430 pR->GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
431 BOOL bTopRow = (nRow1 == nStartRow);
432 - BOOL bHidOk;
433 if ( bRowStrings && (bVert || nCol1 == nStartCol) )
434 { // NONE oder ROWS: RowStrings in jeder Selektion moeglich
435 // COLS oder BOTH: nur aus der ersten Spalte
436 - while ( nCol1 <= nCol2 && (pDocument->GetColFlags(
437 - nCol1, nTab1) & CR_HIDDEN) != 0 )
438 - nCol1++;
439 - while ( nRow1 <= nRow2 && (pDocument->GetRowFlags(
440 - nRow1, nTab1) & CR_HIDDEN) != 0 )
441 - nRow1++;
442 if ( nCol1 <= nCol2 )
443 for (iRow=nRow1; iRow<=nRow2 && bRowStrings; iRow++)
445 - if ( iRow==nRow1 || (pDocument->GetRowFlags( iRow, nTab1) & CR_HIDDEN) == 0 )
446 - if (pDocument->HasValueData( nCol1, iRow, nTab1 ))
447 + if (pDocument->HasValueData( nCol1, iRow, nTab1 ))
448 bRowStrings = FALSE;
450 - bHidOk = TRUE;
452 - else
453 - bHidOk = FALSE;
454 if ( bColStrings && bTopRow )
455 { // ColStrings nur aus der ersten Zeile
456 - if ( !bHidOk )
458 - while ( nCol1 <= nCol2 && (pDocument->GetColFlags(
459 - nCol1, nTab1) & CR_HIDDEN) != 0 )
460 - nCol1++;
461 - while ( nRow1 <= nRow2 && (pDocument->GetRowFlags(
462 - nRow1, nTab1) & CR_HIDDEN) != 0 )
463 - nRow1++;
465 if ( nRow1 <= nRow2 )
466 for (iCol=nCol1; iCol<=nCol2 && bColStrings; iCol++)
468 - if ( iCol==nCol1 || (pDocument->GetColFlags( iCol, nTab1) & CR_HIDDEN) == 0 )
469 - if (pDocument->HasValueData( iCol, nRow1, nTab1 ))
470 + if (pDocument->HasValueData( iCol, nRow1, nTab1 ))
471 bColStrings = FALSE;
474 @@ -439,40 +409,34 @@ void ScChartPositioner::CreatePositionMap()
475 static_cast<ULONG>(nCol1));
476 for ( nCol = nCol1; nCol <= nCol2; ++nCol, ++nInsCol )
478 - if ( (pDocument->GetColFlags( nCol, nTab) & CR_HIDDEN) == 0 )
480 - if ( bNoGlue || eGlue == SC_CHARTGLUE_ROWS )
481 - { // meistens gleiche Cols
482 - if ( (pCol = (Table*) pCols->Get( nInsCol ))==NULL )
484 - pCols->Insert( nInsCol, pNewRowTable );
485 - pCol = pNewRowTable;
486 - pNewRowTable = new Table;
488 + if ( bNoGlue || eGlue == SC_CHARTGLUE_ROWS )
489 + { // meistens gleiche Cols
490 + if ( (pCol = (Table*) pCols->Get( nInsCol ))==NULL )
492 + pCols->Insert( nInsCol, pNewRowTable );
493 + pCol = pNewRowTable;
494 + pNewRowTable = new Table;
496 - else
497 - { // meistens neue Cols
498 - if ( pCols->Insert( nInsCol, pNewRowTable ) )
500 - pCol = pNewRowTable;
501 - pNewRowTable = new Table;
503 - else
504 - pCol = (Table*) pCols->Get( nInsCol );
506 + else
507 + { // meistens neue Cols
508 + if ( pCols->Insert( nInsCol, pNewRowTable ) )
510 + pCol = pNewRowTable;
511 + pNewRowTable = new Table;
513 - // bei anderer Tabelle wurde bereits neuer ColKey erzeugt,
514 - // die Zeilen muessen fuer's Dummy fuellen gleich sein!
515 - ULONG nInsRow = (bNoGlue ? nNoGlueRow : nRow1);
516 - for ( nRow = nRow1; nRow <= nRow2; nRow++, nInsRow++ )
517 + else
518 + pCol = (Table*) pCols->Get( nInsCol );
520 + // bei anderer Tabelle wurde bereits neuer ColKey erzeugt,
521 + // die Zeilen muessen fuer's Dummy fuellen gleich sein!
522 + ULONG nInsRow = (bNoGlue ? nNoGlueRow : nRow1);
523 + for ( nRow = nRow1; nRow <= nRow2; nRow++, nInsRow++ )
525 + if ( pCol->Insert( nInsRow, pNewAddress ) )
527 - if ( (pDocument->GetRowFlags( nRow, nTab) & CR_HIDDEN) == 0 )
529 - if ( pCol->Insert( nInsRow, pNewAddress ) )
531 - pNewAddress->Set( nCol, nRow, nTab );
532 - pNewAddress = new ScAddress;
535 + pNewAddress->Set( nCol, nRow, nTab );
536 + pNewAddress = new ScAddress;
540 diff --git sc/source/filter/excel/xechart.cxx sc/source/filter/excel/xechart.cxx
541 index 211aed3..89fed49 100644
542 --- sc/source/filter/excel/xechart.cxx
543 +++ sc/source/filter/excel/xechart.cxx
544 @@ -2739,7 +2739,7 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
545 maRect.mnWidth = static_cast< sal_Int32 >( aPtSize.Width() << 16 );
546 maRect.mnHeight = static_cast< sal_Int32 >( aPtSize.Height() << 16 );
548 - // global chart properties
549 + // global chart properties (default values)
550 ::set_flag( maProps.mnFlags, EXC_CHPROPS_MANSERIES );
551 ::set_flag( maProps.mnFlags, EXC_CHPROPS_SHOWVISCELLS, false );
552 maProps.mnEmptyMode = EXC_CHPROPS_EMPTY_SKIP;
553 @@ -2750,6 +2750,13 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
555 if( xChartDoc.is() )
557 + Reference< XDiagram > xDiagram = xChartDoc->getFirstDiagram();
559 + // global chart properties (only 'include hidden cells' attribute for now)
560 + ScfPropertySet aDiagramProp( xDiagram );
561 + bool bIncludeHidden = aDiagramProp.GetBoolProperty( EXC_CHPROP_INCLUDEHIDDENCELLS );
562 + ::set_flag( maProps.mnFlags, EXC_CHPROPS_SHOWVISCELLS, !bIncludeHidden );
564 // initialize API conversion (remembers xChartDoc internally)
565 InitConversion( xChartDoc );
567 @@ -2762,7 +2769,6 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot,
568 mxTitle = lclCreateTitle( GetChRoot(), xTitled, EXC_CHOBJLINK_TITLE );
570 // diagrams (axes sets)
571 - Reference< XDiagram > xDiagram = xChartDoc->getFirstDiagram();
572 sal_uInt16 nFreeGroupIdx = mxPrimAxesSet->Convert( xDiagram, 0 );
573 if( !mxPrimAxesSet->Is3dChart() )
574 mxSecnAxesSet->Convert( xDiagram, nFreeGroupIdx );
575 diff --git sc/source/filter/excel/xichart.cxx sc/source/filter/excel/xichart.cxx
576 index 8364ccf..6d9bb9f 100644
577 --- sc/source/filter/excel/xichart.cxx
578 +++ sc/source/filter/excel/xichart.cxx
579 @@ -40,6 +40,7 @@
580 #include <com/sun/star/drawing/ProjectionMode.hpp>
581 #include <com/sun/star/drawing/ShadeMode.hpp>
582 #include <com/sun/star/chart/ChartAxisPosition.hpp>
583 +#include <com/sun/star/chart/XChartDocument.hpp>
584 #include <com/sun/star/chart2/XChartDocument.hpp>
585 #include <com/sun/star/chart2/XDiagram.hpp>
586 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
587 @@ -3306,7 +3307,7 @@ void XclImpChChart::ReadSubRecord( XclImpStream& rStrm )
588 ReadChSeries( rStrm );
589 break;
590 case EXC_ID_CHPROPERTIES:
591 - rStrm >> maProps.mnFlags >> maProps.mnEmptyMode;
592 + ReadChProperties( rStrm );
593 break;
594 case EXC_ID_CHDEFAULTTEXT:
595 ReadChDefaultText( rStrm );
596 @@ -3410,6 +3411,15 @@ void XclImpChChart::Convert( Reference< XChartDocument > xChartDoc, ScfProgressB
597 if( xDiagram.is() && mxLegend.is() )
598 xDiagram->setLegend( mxLegend->CreateLegend() );
600 + // set the IncludeHiddenCells property via the old API as only this ensures that the data provider and al created sequences get this flag correctly
601 + Reference< com::sun::star::chart::XChartDocument > xStandardApiChartDoc( xChartDoc, UNO_QUERY );
602 + if( xStandardApiChartDoc.is() )
604 + ScfPropertySet aDiagramProp( xStandardApiChartDoc->getDiagram() );
605 + bool bShowVisCells = (maProps.mnFlags & EXC_CHPROPS_SHOWVISCELLS);
606 + aDiagramProp.SetBoolProperty( EXC_CHPROP_INCLUDEHIDDENCELLS, !bShowVisCells );
609 // unlock the model
610 FinishConversion( rProgress );
612 @@ -3422,6 +3432,11 @@ void XclImpChChart::ReadChSeries( XclImpStream& rStrm )
613 maSeries.push_back( xSeries );
616 +void XclImpChChart::ReadChProperties( XclImpStream& rStrm )
618 + rStrm >> maProps.mnFlags >> maProps.mnEmptyMode;
621 void XclImpChChart::ReadChAxesSet( XclImpStream& rStrm )
623 XclImpChAxesSetRef xAxesSet( new XclImpChAxesSet( GetChRoot(), EXC_CHAXESSET_NONE ) );
624 diff --git sc/source/filter/inc/xichart.hxx sc/source/filter/inc/xichart.hxx
625 index 0ec9ca4..479f9e1 100644
626 --- sc/source/filter/inc/xichart.hxx
627 +++ sc/source/filter/inc/xichart.hxx
628 @@ -1347,6 +1347,8 @@ public:
629 private:
630 /** Reads a CHSERIES group (data series source and formatting). */
631 void ReadChSeries( XclImpStream& rStrm );
632 + /** Reads a CHPROPERTIES record. */
633 + void ReadChProperties( XclImpStream& rStrm );
634 /** Reads a CHAXESSET group (primary/secondary axes set). */
635 void ReadChAxesSet( XclImpStream& rStrm );
636 /** Reads a CHTEXT group (chart title and series/point captions). */
637 diff --git sc/source/filter/inc/xlchart.hxx sc/source/filter/inc/xlchart.hxx
638 index b6ac422..c588154 100644
639 --- sc/source/filter/inc/xlchart.hxx
640 +++ sc/source/filter/inc/xlchart.hxx
641 @@ -97,6 +97,7 @@ namespace com { namespace sun { namespace star {
642 #define EXC_CHPROP_FILLSTYLE CREATE_OUSTRING( "FillStyle" )
643 #define EXC_CHPROP_GAPWIDTHSEQ CREATE_OUSTRING( "GapwidthSequence" )
644 #define EXC_CHPROP_GEOMETRY3D CREATE_OUSTRING( "Geometry3D" )
645 +#define EXC_CHPROP_INCLUDEHIDDENCELLS CREATE_OUSTRING( "IncludeHiddenCells" )
646 #define EXC_CHPROP_JAPANESE CREATE_OUSTRING( "Japanese" )
647 #define EXC_CHPROP_LABEL CREATE_OUSTRING( "Label" )
648 #define EXC_CHPROP_LABELPLACEMENT CREATE_OUSTRING( "LabelPlacement" )
649 diff --git sc/source/ui/unoobj/chart2uno.cxx sc/source/ui/unoobj/chart2uno.cxx
650 index a042db1..5086a07 100644
651 --- sc/source/ui/unoobj/chart2uno.cxx
652 +++ sc/source/ui/unoobj/chart2uno.cxx
653 @@ -45,6 +45,7 @@
654 #include "unoreflist.hxx"
655 #include "compiler.hxx"
656 #include "reftokenhelper.hxx"
657 +#include "chartlis.hxx"
659 #include <sfx2/objsh.hxx>
660 #include <tools/table.hxx>
661 @@ -89,12 +90,23 @@ using ::boost::shared_ptr;
663 namespace
665 +const SfxItemPropertyMap* lcl_GetDataProviderPropertyMap()
667 + static SfxItemPropertyMap aDataProviderPropertyMap_Impl[] =
669 + {MAP_CHAR_LEN(SC_UNONAME_INCLUDEHIDDENCELLS), 0, &getBooleanCppuType(), 0, 0 },
670 + {0,0,0,0,0,0}
671 + };
672 + return aDataProviderPropertyMap_Impl;
675 const SfxItemPropertyMap* lcl_GetDataSequencePropertyMap()
677 static SfxItemPropertyMap aDataSequencePropertyMap_Impl[] =
679 - {MAP_CHAR_LEN(SC_UNONAME_ISHIDDEN), 0, &getBooleanCppuType(), 0, 0 },
680 + {MAP_CHAR_LEN(SC_UNONAME_HIDDENVALUES), 0, &getCppuType((uno::Sequence<sal_Int32>*)0 ), 0, 0 },
681 {MAP_CHAR_LEN(SC_UNONAME_ROLE), 0, &getCppuType((::com::sun::star::chart2::data::DataSequenceRole*)0), 0, 0 },
682 + {MAP_CHAR_LEN(SC_UNONAME_INCLUDEHIDDENCELLS), 0, &getBooleanCppuType(), 0, 0 },
683 {0,0,0,0,0,0}
685 return aDataSequencePropertyMap_Impl;
686 @@ -656,9 +668,6 @@ void Chart2Positioner::createPositionMap()
687 (bNoGlue ? 0 : static_cast<sal_uInt32>(nCol1));
688 for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol, ++nInsCol)
690 - if ((mpDoc->GetColFlags(nCol, nTab) & CR_HIDDEN) != 0)
691 - continue;
693 if (bNoGlue || meGlue == GLUETYPE_ROWS)
695 pCol = static_cast<Table*>(pCols->Get(nInsCol));
696 @@ -683,9 +692,6 @@ void Chart2Positioner::createPositionMap()
697 sal_uInt32 nInsRow = static_cast<sal_uInt32>(bNoGlue ? nNoGlueRow : nRow1);
698 for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow, ++nInsRow)
700 - if ((mpDoc->GetRowFlags(nRow, nTab) & CR_HIDDEN) != 0)
701 - continue;
703 ScSingleRefData aCellData;
704 aCellData.InitFlags();
705 aCellData.SetFlag3D(true);
706 @@ -966,6 +972,8 @@ void lcl_convertTokenToString(OUString& rStr, const ScSharedTokenRef& rToken, Sc
708 ScChart2DataProvider::ScChart2DataProvider( ScDocument* pDoc )
709 : m_pDocument( pDoc)
710 + , m_aPropSet(lcl_GetDataProviderPropertyMap())
711 + , m_bIncludeHiddenCells( sal_True)
713 if ( m_pDocument )
714 m_pDocument->AddUnoObject( *this);
715 @@ -1498,7 +1506,7 @@ ScChart2DataProvider::createDataSource(
717 auto_ptr< vector<ScSharedTokenRef> > pTokens(new vector<ScSharedTokenRef>);
718 pTokens->push_back(pLabelToken);
719 - Reference < chart2::data::XDataSequence > xLabelSeq(new ScChart2DataSequence(m_pDocument, this, pTokens.release()));
720 + Reference < chart2::data::XDataSequence > xLabelSeq(new ScChart2DataSequence(m_pDocument, this, pTokens.release(), m_bIncludeHiddenCells));
721 Reference< beans::XPropertySet > xLabelProps(xLabelSeq, uno::UNO_QUERY);
722 if (xLabelProps.is())
723 xLabelProps->setPropertyValue(
724 @@ -1511,7 +1519,7 @@ ScChart2DataProvider::createDataSource(
726 auto_ptr< vector<ScSharedTokenRef> > pTokens(new vector<ScSharedTokenRef>);
727 pTokens->swap(aRefTokens2);
728 - uno::Reference< chart2::data::XDataSequence > xSeq( new ScChart2DataSequence( m_pDocument, this, pTokens.release()) );
729 + uno::Reference< chart2::data::XDataSequence > xSeq( new ScChart2DataSequence( m_pDocument, this, pTokens.release(), m_bIncludeHiddenCells) );
730 pHeader->setValues(xSeq);
732 if (pHeader)
733 @@ -1569,7 +1577,7 @@ ScChart2DataProvider::createDataSource(
734 auto_ptr< vector<ScSharedTokenRef> > pTokens(new vector<ScSharedTokenRef>);
735 pTokens->reserve(1);
736 pTokens->push_back(pHeaderCell);
737 - xLabelSeq.set(new ScChart2DataSequence(m_pDocument, this, pTokens.release()));
738 + xLabelSeq.set(new ScChart2DataSequence(m_pDocument, this, pTokens.release(), m_bIncludeHiddenCells));
739 uno::Reference< beans::XPropertySet > xLabelProps(xLabelSeq, uno::UNO_QUERY);
740 if (xLabelProps.is())
741 xLabelProps->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ROLE)), uno::makeAny(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("label"))));
742 @@ -1586,7 +1594,7 @@ ScChart2DataProvider::createDataSource(
744 // FIXME: if there are no labels the column or row name should be taken
746 - uno::Reference < chart2::data::XDataSequence > xSeq(new ScChart2DataSequence(m_pDocument, this, pRanges.release()));
747 + uno::Reference < chart2::data::XDataSequence > xSeq(new ScChart2DataSequence(m_pDocument, this, pRanges.release(), m_bIncludeHiddenCells));
749 pLabeled->setValues(xSeq);
750 pLabeled->setLabel(xLabelSeq);
751 @@ -2195,7 +2203,7 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL
752 // ScChart2DataSequence manages the life cycle of pRefTokens.
753 vector<ScSharedTokenRef>* pRefTokens = new vector<ScSharedTokenRef>();
754 pRefTokens->swap(aRefTokens);
755 - xResult.set(new ScChart2DataSequence(m_pDocument, this, pRefTokens));
756 + xResult.set(new ScChart2DataSequence(m_pDocument, this, pRefTokens, m_bIncludeHiddenCells));
758 return xResult;
760 @@ -2373,6 +2381,88 @@ private:
764 +// DataProvider XPropertySet -------------------------------------------------
766 +uno::Reference< beans::XPropertySetInfo> SAL_CALL
767 +ScChart2DataProvider::getPropertySetInfo() throw( uno::RuntimeException)
769 + ScUnoGuard aGuard;
770 + static uno::Reference<beans::XPropertySetInfo> aRef =
771 + new SfxItemPropertySetInfo( m_aPropSet.getPropertyMap() );
772 + return aRef;
776 +void SAL_CALL ScChart2DataProvider::setPropertyValue(
777 + const ::rtl::OUString& rPropertyName, const uno::Any& rValue)
778 + throw( beans::UnknownPropertyException,
779 + beans::PropertyVetoException,
780 + lang::IllegalArgumentException,
781 + lang::WrappedTargetException, uno::RuntimeException)
783 + if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_INCLUDEHIDDENCELLS)))
785 + if ( !(rValue >>= m_bIncludeHiddenCells))
786 + throw lang::IllegalArgumentException();
788 + else
789 + throw beans::UnknownPropertyException();
793 +uno::Any SAL_CALL ScChart2DataProvider::getPropertyValue(
794 + const ::rtl::OUString& rPropertyName)
795 + throw( beans::UnknownPropertyException,
796 + lang::WrappedTargetException, uno::RuntimeException)
798 + uno::Any aRet;
799 + if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_INCLUDEHIDDENCELLS)))
800 + aRet <<= m_bIncludeHiddenCells;
801 + else
802 + throw beans::UnknownPropertyException();
803 + return aRet;
807 +void SAL_CALL ScChart2DataProvider::addPropertyChangeListener(
808 + const ::rtl::OUString& /*rPropertyName*/,
809 + const uno::Reference< beans::XPropertyChangeListener>& /*xListener*/)
810 + throw( beans::UnknownPropertyException,
811 + lang::WrappedTargetException, uno::RuntimeException)
813 + OSL_ENSURE( false, "Not yet implemented" );
817 +void SAL_CALL ScChart2DataProvider::removePropertyChangeListener(
818 + const ::rtl::OUString& /*rPropertyName*/,
819 + const uno::Reference< beans::XPropertyChangeListener>& /*rListener*/)
820 + throw( beans::UnknownPropertyException,
821 + lang::WrappedTargetException, uno::RuntimeException)
823 + OSL_ENSURE( false, "Not yet implemented" );
827 +void SAL_CALL ScChart2DataProvider::addVetoableChangeListener(
828 + const ::rtl::OUString& /*rPropertyName*/,
829 + const uno::Reference< beans::XVetoableChangeListener>& /*rListener*/)
830 + throw( beans::UnknownPropertyException,
831 + lang::WrappedTargetException, uno::RuntimeException)
833 + OSL_ENSURE( false, "Not yet implemented" );
837 +void SAL_CALL ScChart2DataProvider::removeVetoableChangeListener(
838 + const ::rtl::OUString& /*rPropertyName*/,
839 + const uno::Reference< beans::XVetoableChangeListener>& /*rListener*/ )
840 + throw( beans::UnknownPropertyException,
841 + lang::WrappedTargetException, uno::RuntimeException)
843 + OSL_ENSURE( false, "Not yet implemented" );
846 void ScChart2DataProvider::detectRangesFromDataSource(vector<ScSharedTokenRef>& rRefTokens,
847 chart::ChartDataRowSource& rRowSource,
848 bool& rRowSourceDetected,
849 @@ -2658,10 +2748,25 @@ ScChart2DataSequence::Item::Item() :
850 ::rtl::math::setNan(&mfValue);
853 +ScChart2DataSequence::HiddenRangeListener::HiddenRangeListener(ScChart2DataSequence& rParent) :
854 + mrParent(rParent)
858 +ScChart2DataSequence::HiddenRangeListener::~HiddenRangeListener()
862 +void ScChart2DataSequence::HiddenRangeListener::notify()
864 + mrParent.setDataChangedHint(true);
867 ScChart2DataSequence::ScChart2DataSequence( ScDocument* pDoc,
868 const uno::Reference < chart2::data::XDataProvider >& xDP,
869 - vector<ScSharedTokenRef>* pTokens)
870 - : m_bHidden( sal_False)
871 + vector<ScSharedTokenRef>* pTokens,
872 + bool bIncludeHiddenCells )
873 + : m_bIncludeHiddenCells( bIncludeHiddenCells)
874 , m_nObjectId( 0 )
875 , m_pDocument( pDoc)
876 , m_pTokens(pTokens)
877 @@ -2669,6 +2774,7 @@ ScChart2DataSequence::ScChart2DataSequence( ScDocument* pDoc,
878 , m_pExtRefListener(NULL)
879 , m_xDataProvider( xDP)
880 , m_aPropSet(lcl_GetDataSequencePropertyMap())
881 + , m_pHiddenListener(NULL)
882 , m_pValueListener( NULL )
883 , m_bGotDataChangedHint(false)
884 , m_bExtDataRebuildQueued(false)
885 @@ -2698,6 +2804,12 @@ ScChart2DataSequence::~ScChart2DataSequence()
886 if ( m_pDocument )
888 m_pDocument->RemoveUnoObject( *this);
889 + if (m_pHiddenListener.get())
891 + ScChartListenerCollection* pCLC = m_pDocument->GetChartListenerCollection();
892 + if (pCLC)
893 + pCLC->EndListeningHiddenRange(m_pHiddenListener.get());
895 StopListeningToAllExternalRefs();
898 @@ -2712,6 +2824,14 @@ void ScChart2DataSequence::RefChanged()
900 if( m_pDocument )
902 + ScChartListenerCollection* pCLC = NULL;
903 + if (m_pHiddenListener.get())
905 + pCLC = m_pDocument->GetChartListenerCollection();
906 + if (pCLC)
907 + pCLC->EndListeningHiddenRange(m_pHiddenListener.get());
910 vector<ScSharedTokenRef>::const_iterator itr = m_pTokens->begin(), itrEnd = m_pTokens->end();
911 for (; itr != itrEnd; ++itr)
913 @@ -2720,6 +2840,8 @@ void ScChart2DataSequence::RefChanged()
914 continue;
916 m_pDocument->StartListeningArea(aRange, m_pValueListener);
917 + if (pCLC)
918 + pCLC->StartListeningHiddenRange(aRange, m_pHiddenListener.get());
922 @@ -2763,17 +2885,21 @@ void ScChart2DataSequence::BuildDataCache()
924 for (SCROW nRow = aRange.aStart.Row(); nRow <= aRange.aEnd.Row(); ++nRow)
926 - m_aDataArray.push_back(Item());
927 - Item& rItem = m_aDataArray.back();
928 - ++nDataCount;
929 - USHORT nWidth = m_pDocument->GetColWidth(nCol, nTab);
930 - USHORT nHeight = m_pDocument->GetRowHeight(nRow, nTab);
931 - if (!nWidth || !nHeight)
932 + bool bColHidden = (m_pDocument->GetColFlags(nCol, nTab) & CR_HIDDEN);
933 + bool bRowHidden = (m_pDocument->GetRowFlags(nRow, nTab) & CR_HIDDEN);
934 + if (bColHidden || bRowHidden)
936 // hidden cell
937 ++nHiddenValueCount;
938 aHiddenValues.push_back(nDataCount-1);
940 + if( !m_bIncludeHiddenCells )
941 + continue;
944 + m_aDataArray.push_back(Item());
945 + Item& rItem = m_aDataArray.back();
946 + ++nDataCount;
948 ScAddress aAdr(nCol, nRow, nTab);
949 ScBaseCell* pCell = m_pDocument->GetCell(aAdr);
950 @@ -2985,7 +3111,6 @@ void ScChart2DataSequence::CopyData(const ScChart2DataSequence& r)
952 m_aHiddenValues = r.m_aHiddenValues;
953 m_aRole = r.m_aRole;
954 - m_bHidden = r.m_bHidden;
956 if (r.m_pRangeIndices.get())
957 m_pRangeIndices.reset(new vector<sal_uInt32>(*r.m_pRangeIndices));
958 @@ -3122,7 +3248,7 @@ IMPL_LINK( ScChart2DataSequence, ValueListenerHdl, SfxHint*, pHint )
959 // in the range are notified. So only a flag is set that is checked when
960 // SFX_HINT_DATACHANGED is received.
962 - m_bGotDataChangedHint = true;
963 + setDataChangedHint(true);
965 return 0;
967 @@ -3511,7 +3637,7 @@ uno::Reference< util::XCloneable > SAL_CALL ScChart2DataSequence::createClone()
971 - auto_ptr<ScChart2DataSequence> p(new ScChart2DataSequence(m_pDocument, m_xDataProvider, pTokensNew.release()));
972 + auto_ptr<ScChart2DataSequence> p(new ScChart2DataSequence(m_pDocument, m_xDataProvider, pTokensNew.release(), m_bIncludeHiddenCells));
973 p->CopyData(*this);
974 Reference< util::XCloneable > xClone(p.release());
976 @@ -3539,11 +3665,23 @@ void SAL_CALL ScChart2DataSequence::addModifyListener( const uno::Reference< uti
977 if (!m_pValueListener)
978 m_pValueListener = new ScLinkListener( LINK( this, ScChart2DataSequence, ValueListenerHdl ) );
980 + if (!m_pHiddenListener.get())
981 + m_pHiddenListener.reset(new HiddenRangeListener(*this));
983 if( m_pDocument )
985 - ULONG nCount = aRanges.Count();
986 - for (ULONG i=0; i<nCount; i++)
987 - m_pDocument->StartListeningArea( *aRanges.GetObject(i), m_pValueListener );
988 + ScChartListenerCollection* pCLC = m_pDocument->GetChartListenerCollection();
989 + vector<ScSharedTokenRef>::const_iterator itr = m_pTokens->begin(), itrEnd = m_pTokens->end();
990 + for (; itr != itrEnd; ++itr)
992 + ScRange aRange;
993 + if (!ScRefTokenHelper::getRangeFromToken(aRange, *itr))
994 + continue;
996 + m_pDocument->StartListeningArea( aRange, m_pValueListener );
997 + if (pCLC)
998 + pCLC->StartListeningHiddenRange(aRange, m_pHiddenListener.get());
1002 acquire(); // don't lose this object (one ref for all listeners)
1003 @@ -3574,6 +3712,13 @@ void SAL_CALL ScChart2DataSequence::removeModifyListener( const uno::Reference<
1004 if (m_pValueListener)
1005 m_pValueListener->EndListeningAll();
1007 + if (m_pHiddenListener.get() && m_pDocument)
1009 + ScChartListenerCollection* pCLC = m_pDocument->GetChartListenerCollection();
1010 + if (pCLC)
1011 + pCLC->EndListeningHiddenRange(m_pHiddenListener.get());
1014 release(); // release the ref for the listeners
1017 @@ -3608,10 +3753,13 @@ void SAL_CALL ScChart2DataSequence::setPropertyValue(
1018 if ( !(rValue >>= m_aRole))
1019 throw lang::IllegalArgumentException();
1021 - else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISHIDDEN)))
1022 + else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_INCLUDEHIDDENCELLS)))
1024 - if ( !(rValue >>= m_bHidden))
1025 + sal_Bool bOldValue = m_bIncludeHiddenCells;
1026 + if ( !(rValue >>= m_bIncludeHiddenCells))
1027 throw lang::IllegalArgumentException();
1028 + if( bOldValue != m_bIncludeHiddenCells )
1029 + m_aDataArray.clear();//data array is dirty now
1031 else
1032 throw beans::UnknownPropertyException();
1033 @@ -3627,8 +3775,8 @@ uno::Any SAL_CALL ScChart2DataSequence::getPropertyValue(
1034 uno::Any aRet;
1035 if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ROLE)))
1036 aRet <<= m_aRole;
1037 - else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISHIDDEN)))
1038 - aRet <<= m_bHidden;
1039 + else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_INCLUDEHIDDENCELLS)))
1040 + aRet <<= m_bIncludeHiddenCells;
1041 else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(SC_UNONAME_HIDDENVALUES)))
1043 // This property is read-only thus cannot be set externally via
1044 @@ -3690,6 +3838,11 @@ void SAL_CALL ScChart2DataSequence::removeVetoableChangeListener(
1045 OSL_ENSURE( false, "Not yet implemented" );
1048 +void ScChart2DataSequence::setDataChangedHint(bool b)
1050 + m_bGotDataChangedHint = b;
1053 // XUnoTunnel
1055 // sal_Int64 SAL_CALL ScChart2DataSequence::getSomething(
1056 @@ -3738,7 +3891,7 @@ ScChart2EmptyDataSequence::ScChart2EmptyDataSequence( ScDocument* pDoc,
1057 const uno::Reference < chart2::data::XDataProvider >& xDP,
1058 const ScRangeListRef& rRangeList,
1059 sal_Bool bColumn)
1060 - : m_bHidden( sal_False)
1061 + : m_bIncludeHiddenCells( sal_True)
1062 , m_xRanges( rRangeList)
1063 , m_pDocument( pDoc)
1064 , m_xDataProvider( xDP)
1065 @@ -3882,8 +4035,8 @@ uno::Reference< util::XCloneable > SAL_CALL ScChart2EmptyDataSequence::createClo
1067 xProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_ROLE )),
1068 uno::makeAny( m_aRole ));
1069 - xProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_ISHIDDEN )),
1070 - uno::makeAny( m_bHidden ));
1071 + xProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SC_UNONAME_INCLUDEHIDDENCELLS )),
1072 + uno::makeAny( m_bIncludeHiddenCells ));
1074 return xClone;
1076 @@ -3928,9 +4081,9 @@ void SAL_CALL ScChart2EmptyDataSequence::setPropertyValue(
1077 if ( !(rValue >>= m_aRole))
1078 throw lang::IllegalArgumentException();
1080 - else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISHIDDEN)))
1081 + else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_INCLUDEHIDDENCELLS)))
1083 - if ( !(rValue >>= m_bHidden))
1084 + if ( !(rValue >>= m_bIncludeHiddenCells))
1085 throw lang::IllegalArgumentException();
1087 else
1088 @@ -3947,8 +4100,8 @@ uno::Any SAL_CALL ScChart2EmptyDataSequence::getPropertyValue(
1089 uno::Any aRet;
1090 if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ROLE)))
1091 aRet <<= m_aRole;
1092 - else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_ISHIDDEN)))
1093 - aRet <<= m_bHidden;
1094 + else if ( rPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_UNONAME_INCLUDEHIDDENCELLS)))
1095 + aRet <<= m_bIncludeHiddenCells;
1096 else
1097 throw beans::UnknownPropertyException();
1098 // TODO: support optional properties