LibreOffice Module chart2 (master) 1
ChartDataWrapper.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include "ChartDataWrapper.hxx"
21#include <DiagramHelper.hxx>
22#include <DataSourceHelper.hxx>
23#include <ChartModelHelper.hxx>
28#include <com/sun/star/chart/XChartDocument.hpp>
29
30#include <float.h>
31#include <cmath>
32#include <limits>
33#include <utility>
34#include <osl/diagnose.h>
35
36using namespace ::com::sun::star;
37using ::com::sun::star::uno::Reference;
38using ::com::sun::star::uno::Sequence;
39using ::com::sun::star::chart2::XAnyDescriptionAccess;
40using ::com::sun::star::chart::XComplexDescriptionAccess;
41using ::com::sun::star::chart::XChartData;
42using ::com::sun::star::chart::XChartDataArray;
43using ::com::sun::star::chart::XDateCategories;
44
45namespace
46{
47
48uno::Sequence< uno::Sequence< double > > lcl_getNANInsteadDBL_MIN( const uno::Sequence< uno::Sequence< double > >& rData )
49{
50 uno::Sequence< uno::Sequence< double > > aRet;
51 const sal_Int32 nOuterSize = rData.getLength();
52 aRet.realloc( nOuterSize );
53 auto pRet = aRet.getArray();
54 for( sal_Int32 nOuter=0; nOuter<nOuterSize; ++nOuter )
55 {
56 sal_Int32 nInnerSize = rData[nOuter].getLength();
57 pRet[nOuter].realloc( nInnerSize );
58 auto pRet_nOuter = pRet[nOuter].getArray();
59 for( sal_Int32 nInner=0; nInner<nInnerSize; ++nInner )
60 {
61 pRet_nOuter[nInner] = rData[nOuter][nInner];
62 double& rValue = pRet_nOuter[nInner];
63 if( rValue == DBL_MIN )
64 rValue = std::numeric_limits<double>::quiet_NaN();
65 }
66 }
67 return aRet;
68}
69
70uno::Sequence< uno::Sequence< double > > lcl_getDBL_MINInsteadNAN( const uno::Sequence< uno::Sequence< double > >& rData )
71{
72 uno::Sequence< uno::Sequence< double > > aRet;
73 const sal_Int32 nOuterSize = rData.getLength();
74 aRet.realloc( nOuterSize );
75 auto pRet = aRet.getArray();
76 for( sal_Int32 nOuter=0; nOuter<nOuterSize; ++nOuter )
77 {
78 sal_Int32 nInnerSize = rData[nOuter].getLength();
79 pRet[nOuter].realloc( nInnerSize );
80 auto pRet_nOuter = pRet[nOuter].getArray();
81 for( sal_Int32 nInner=0; nInner<nInnerSize; ++nInner )
82 {
83 pRet_nOuter[nInner] = rData[nOuter][nInner];
84 double& rValue = pRet_nOuter[nInner];
85 if( std::isnan( rValue ) )
86 rValue = DBL_MIN;
87 }
88 }
89 return aRet;
90}
91
92} // anonymous namespace
93
94namespace chart::wrapper
95{
96
98{
100 {
101 }
103 {
104 }
105 virtual void apply( const Reference< XAnyDescriptionAccess >& xDataAccess ) = 0;
106
107 virtual bool setsCategories( bool /*bDataInColumns*/ )
108 {
109 return false;
110 }
111};
112
113namespace {
114
115struct lcl_AllOperator : public lcl_Operator
116{
117 explicit lcl_AllOperator( const Reference< XChartData >& xDataToApply )
118 : m_xDataToApply( xDataToApply )
119 {
120 }
121
122 virtual bool setsCategories( bool /*bDataInColumns*/ ) override
123 {
124 return true;
125 }
126
127 virtual void apply( const Reference< XAnyDescriptionAccess >& xDataAccess ) override
128 {
129 if( !xDataAccess.is() )
130 return;
131
132 Reference< XAnyDescriptionAccess > xNewAny( m_xDataToApply, uno::UNO_QUERY );
133 Reference< XComplexDescriptionAccess > xNewComplex( m_xDataToApply, uno::UNO_QUERY );
134 if( xNewAny.is() )
135 {
136 xDataAccess->setData( xNewAny->getData() );
137 xDataAccess->setComplexRowDescriptions( xNewAny->getComplexRowDescriptions() );
138 xDataAccess->setComplexColumnDescriptions( xNewAny->getComplexColumnDescriptions() );
139 }
140 else if( xNewComplex.is() )
141 {
142 xDataAccess->setData( xNewComplex->getData() );
143 xDataAccess->setComplexRowDescriptions( xNewComplex->getComplexRowDescriptions() );
144 xDataAccess->setComplexColumnDescriptions( xNewComplex->getComplexColumnDescriptions() );
145 }
146 else
147 {
148 Reference< XChartDataArray > xNew( m_xDataToApply, uno::UNO_QUERY );
149 if( xNew.is() )
150 {
151 xDataAccess->setData( xNew->getData() );
152 xDataAccess->setRowDescriptions( xNew->getRowDescriptions() );
153 xDataAccess->setColumnDescriptions( xNew->getColumnDescriptions() );
154 }
155 }
156 }
157
158 Reference< XChartData > m_xDataToApply;
159};
160
161struct lcl_DataOperator : public lcl_Operator
162{
163 explicit lcl_DataOperator( const Sequence< Sequence< double > >& rData )
164 : m_rData( rData )
165 {
166 }
167
168 virtual void apply( const Reference< XAnyDescriptionAccess >& xDataAccess ) override
169 {
170 if( xDataAccess.is() )
171 xDataAccess->setData( lcl_getNANInsteadDBL_MIN( m_rData ) );
172 }
173
174 const Sequence< Sequence< double > >& m_rData;
175};
176
177struct lcl_RowDescriptionsOperator : public lcl_Operator
178{
179 lcl_RowDescriptionsOperator( const Sequence< OUString >& rRowDescriptions
181 : m_rRowDescriptions( rRowDescriptions )
182 , m_xChartDoc(std::move(xChartDoc))
183 , m_bDataInColumns(true)
184 {
185 }
186
187 virtual bool setsCategories( bool bDataInColumns ) override
188 {
189 m_bDataInColumns = bDataInColumns;
190 return bDataInColumns;
191 }
192
193 virtual void apply( const Reference< XAnyDescriptionAccess >& xDataAccess ) override
194 {
195 if( xDataAccess.is() )
196 {
197 xDataAccess->setRowDescriptions( m_rRowDescriptions );
198 if( m_bDataInColumns )
200 }
201 }
202
203 const Sequence< OUString >& m_rRowDescriptions;
206};
207
208struct lcl_ComplexRowDescriptionsOperator : public lcl_Operator
209{
210 lcl_ComplexRowDescriptionsOperator( const Sequence< Sequence< OUString > >& rComplexRowDescriptions
212 : m_rComplexRowDescriptions( rComplexRowDescriptions )
213 , m_xChartDoc(std::move(xChartDoc))
214 , m_bDataInColumns(true)
215 {
216 }
217
218 virtual bool setsCategories( bool bDataInColumns ) override
219 {
220 m_bDataInColumns = bDataInColumns;
221 return bDataInColumns;
222 }
223
224 virtual void apply( const Reference< XAnyDescriptionAccess >& xDataAccess ) override
225 {
226 if( xDataAccess.is() )
227 {
228 xDataAccess->setComplexRowDescriptions( m_rComplexRowDescriptions );
229 if( m_bDataInColumns )
231 }
232 }
233
234 const Sequence< Sequence< OUString > >& m_rComplexRowDescriptions;
236 bool m_bDataInColumns;
237};
238
239struct lcl_AnyRowDescriptionsOperator : public lcl_Operator
240{
241 explicit lcl_AnyRowDescriptionsOperator( const Sequence< Sequence< uno::Any > >& rAnyRowDescriptions )
242 : m_rAnyRowDescriptions( rAnyRowDescriptions )
243 {
244 }
245
246 virtual bool setsCategories( bool bDataInColumns ) override
247 {
248 return bDataInColumns;
249 }
250
251 virtual void apply( const Reference< XAnyDescriptionAccess >& xDataAccess ) override
252 {
253 if( xDataAccess.is() )
254 xDataAccess->setAnyRowDescriptions( m_rAnyRowDescriptions );
255 }
256
257 const Sequence< Sequence< uno::Any > >& m_rAnyRowDescriptions;
258};
259
260struct lcl_ColumnDescriptionsOperator : public lcl_Operator
261{
262 lcl_ColumnDescriptionsOperator( const Sequence< OUString >& rColumnDescriptions
264 : m_rColumnDescriptions( rColumnDescriptions )
265 , m_xChartDoc(std::move(xChartDoc))
266 , m_bDataInColumns(true)
267 {
268 }
269
270 virtual bool setsCategories( bool bDataInColumns ) override
271 {
272 m_bDataInColumns = bDataInColumns;
273 return !bDataInColumns;
274 }
275
276 virtual void apply( const Reference< XAnyDescriptionAccess >& xDataAccess ) override
277 {
278 if( xDataAccess.is() )
279 {
280 xDataAccess->setColumnDescriptions( m_rColumnDescriptions );
281 if( !m_bDataInColumns )
283 }
284 }
285
286 const Sequence< OUString >& m_rColumnDescriptions;
288 bool m_bDataInColumns;
289};
290
291struct lcl_ComplexColumnDescriptionsOperator : public lcl_Operator
292{
293 lcl_ComplexColumnDescriptionsOperator( const Sequence< Sequence< OUString > >& rComplexColumnDescriptions
295 : m_rComplexColumnDescriptions( rComplexColumnDescriptions )
296 , m_xChartDoc(std::move(xChartDoc))
297 , m_bDataInColumns(true)
298 {
299 }
300
301 virtual bool setsCategories( bool bDataInColumns ) override
302 {
303 m_bDataInColumns = bDataInColumns;
304 return !bDataInColumns;
305 }
306
307 virtual void apply( const Reference< XAnyDescriptionAccess >& xDataAccess ) override
308 {
309 if( xDataAccess.is() )
310 {
311 xDataAccess->setComplexColumnDescriptions( m_rComplexColumnDescriptions );
312 if( !m_bDataInColumns )
314 }
315 }
316
317 const Sequence< Sequence< OUString > >& m_rComplexColumnDescriptions;
319 bool m_bDataInColumns;
320};
321
322struct lcl_AnyColumnDescriptionsOperator : public lcl_Operator
323{
324 explicit lcl_AnyColumnDescriptionsOperator( const Sequence< Sequence< uno::Any > >& rAnyColumnDescriptions )
325 : m_rAnyColumnDescriptions( rAnyColumnDescriptions )
326 {
327 }
328
329 virtual bool setsCategories( bool bDataInColumns ) override
330 {
331 return bDataInColumns;
332 }
333
334 virtual void apply( const Reference< XAnyDescriptionAccess >& xDataAccess ) override
335 {
336 if( xDataAccess.is() )
337 xDataAccess->setAnyColumnDescriptions( m_rAnyColumnDescriptions );
338 }
339
340 const Sequence< Sequence< uno::Any > >& m_rAnyColumnDescriptions;
341};
342
343struct lcl_DateCategoriesOperator : public lcl_Operator
344{
345 explicit lcl_DateCategoriesOperator( const Sequence< double >& rDates )
346 : m_rDates( rDates )
347 {
348 }
349
350 virtual bool setsCategories( bool /*bDataInColumns*/ ) override
351 {
352 return true;
353 }
354
355 virtual void apply( const Reference< XAnyDescriptionAccess >& xDataAccess ) override
356 {
357 Reference< XDateCategories > xDateCategories( xDataAccess, uno::UNO_QUERY );
358 if( xDateCategories.is() )
359 xDateCategories->setDateCategories( m_rDates );
360 }
361
362 const Sequence< double >& m_rDates;
363};
364
365}
366
367ChartDataWrapper::ChartDataWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
368 : m_spChart2ModelContact(std::move(spChart2ModelContact))
369{
370 osl_atomic_increment( &m_refCount );
372 osl_atomic_decrement( &m_refCount );
373}
374
375ChartDataWrapper::ChartDataWrapper( std::shared_ptr<Chart2ModelContact> spChart2ModelContact,
376 const Reference< XChartData >& xNewData ) :
377 m_spChart2ModelContact(std::move( spChart2ModelContact ))
378{
379 osl_atomic_increment( &m_refCount );
380 lcl_AllOperator aOperator( xNewData );
381 applyData( aOperator );
382 osl_atomic_decrement( &m_refCount );
383}
384
386{
387 // @todo: implement XComponent and call this in dispose(). In the DTOR the
388 // ref-count is 0, thus creating a stack reference to this calls the DTOR at
389 // the end of the block recursively
390// uno::Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
391// m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
392}
393
394// ____ XChartDataArray (read)____
396{
398 if( m_xDataAccess.is() )
399 return lcl_getDBL_MINInsteadNAN( m_xDataAccess->getData() );
401}
403{
405 if( m_xDataAccess.is() )
406 return m_xDataAccess->getRowDescriptions();
407 return Sequence< OUString >();
408}
410{
412 if( m_xDataAccess.is() )
413 return m_xDataAccess->getColumnDescriptions();
414 return Sequence< OUString > ();
415}
416
417// ____ XComplexDescriptionAccess (read) ____
419{
421 if( m_xDataAccess.is() )
422 return m_xDataAccess->getComplexRowDescriptions();
424}
426{
428 if( m_xDataAccess.is() )
429 return m_xDataAccess->getComplexColumnDescriptions();
431}
432
433// ____ XAnyDescriptionAccess (read) ____
435{
437 if( m_xDataAccess.is() )
438 return m_xDataAccess->getAnyRowDescriptions();
440}
442{
444 if( m_xDataAccess.is() )
445 return m_xDataAccess->getAnyColumnDescriptions();
447}
448
449// ____ XDateCategories (read) ____
451{
453 Reference< XDateCategories > xDateCategories( m_xDataAccess, uno::UNO_QUERY );
454 if( xDateCategories.is() )
455 return xDateCategories->getDateCategories();
456 return Sequence< double >();
457}
458
459// ____ XChartDataArray (write)____
461{
462 lcl_DataOperator aOperator( rData );
463 applyData( aOperator );
464}
465void SAL_CALL ChartDataWrapper::setRowDescriptions( const Sequence< OUString >& rRowDescriptions )
466{
467 lcl_RowDescriptionsOperator aOperator( rRowDescriptions, m_spChart2ModelContact->getDocumentModel() );
468 applyData( aOperator );
469}
470void SAL_CALL ChartDataWrapper::setColumnDescriptions( const Sequence< OUString >& rColumnDescriptions )
471{
472 lcl_ColumnDescriptionsOperator aOperator( rColumnDescriptions, m_spChart2ModelContact->getDocumentModel() );
473 applyData( aOperator );
474}
475
476// ____ XComplexDescriptionAccess (write) ____
478{
479 lcl_ComplexRowDescriptionsOperator aOperator( rRowDescriptions, m_spChart2ModelContact->getDocumentModel() );
480 applyData( aOperator );
481}
483{
484 lcl_ComplexColumnDescriptionsOperator aOperator( rColumnDescriptions, m_spChart2ModelContact->getDocumentModel() );
485 applyData( aOperator );
486}
487
488// ____ XAnyDescriptionAccess (write) ____
490{
491 lcl_AnyRowDescriptionsOperator aOperator( rRowDescriptions );
492 applyData( aOperator );
493}
495{
496 lcl_AnyColumnDescriptionsOperator aOperator( rColumnDescriptions );
497 applyData( aOperator );
498}
499
500// ____ XDateCategories (write) ____
502{
503 rtl::Reference< ChartModel > xChartDoc( m_spChart2ModelContact->getDocumentModel() );
504 ControllerLockGuardUNO aCtrlLockGuard( xChartDoc );
505 lcl_DateCategoriesOperator aOperator( rDates );
506 applyData( aOperator );
508}
509
510// ____ XChartData (base of XChartDataArray) ____
513{
514 std::unique_lock g(m_aMutex);
516}
517
520{
521 std::unique_lock g(m_aMutex);
523}
524
526{
527 return DBL_MIN;
528}
529
530sal_Bool SAL_CALL ChartDataWrapper::isNotANumber( double nNumber )
531{
532 return nNumber == DBL_MIN
533 || std::isnan( nNumber )
534 || std::isinf( nNumber );
535}
536
537// ____ XComponent ____
539{
540 std::unique_lock g(m_aMutex);
541 m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( static_cast< ::cppu::OWeakObject* >( this )));
542 m_xDataAccess=nullptr;
543}
544
547{
548 std::unique_lock g(m_aMutex);
550}
551
554{
555 std::unique_lock g(m_aMutex);
557}
558
559// ____ XEventListener ____
560void SAL_CALL ChartDataWrapper::disposing( const lang::EventObject& /* Source */ )
561{
562}
563
564void ChartDataWrapper::fireChartDataChangeEvent( css::chart::ChartDataChangeEvent& aEvent )
565{
566 std::unique_lock g(m_aMutex);
568 return;
569
570 uno::Reference< uno::XInterface > xSrc( static_cast< cppu::OWeakObject* >( this ));
571 OSL_ASSERT( xSrc.is());
572 if( xSrc.is() )
573 aEvent.Source = xSrc;
574
577 {
579 if (cl)
580 cl->chartDataChanged(aEvent);
581 });
582}
583
585{
586 //create an internal data provider that is connected to the model
587 rtl::Reference< ChartModel > xChartDoc( m_spChart2ModelContact->getDocumentModel() );
588 if( xChartDoc.is() )
589 xChartDoc->createInternalDataProvider( true /*bCloneExistingData*/ );
591}
592
594{
595 rtl::Reference< ChartModel > xChartDoc( m_spChart2ModelContact->getDocumentModel() );
596 if( !xChartDoc.is() )
597 return;
598 if( xChartDoc->hasInternalDataProvider() )
599 m_xDataAccess.set( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
600 else
601 {
602 //create a separate "internal data provider" that is not connected to the model
604 xChartDoc, false /*bConnectToModel*/ );
605 m_xDataAccess.set( static_cast<cppu::OWeakObject*>(xInternal.get()), uno::UNO_QUERY_THROW );
606 }
607}
608
610{
611 //bool bSetValues, bool bSetRowDescriptions, bool bSetColumnDescriptions
612 rtl::Reference< ChartModel > xChartDoc( m_spChart2ModelContact->getDocumentModel() );
613 if( !xChartDoc.is() )
614 return;
615
616 // remember some diagram properties to reset later
617 bool bStacked = false;
618 bool bPercent = false;
619 bool bDeep = false;
620 uno::Reference< css::chart::XChartDocument > xOldDoc( static_cast<cppu::OWeakObject*>(xChartDoc.get()), uno::UNO_QUERY );
621 OSL_ASSERT( xOldDoc.is());
622 uno::Reference< beans::XPropertySet > xDiaProp( xOldDoc->getDiagram(), uno::UNO_QUERY );
623 if( xDiaProp.is())
624 {
625 xDiaProp->getPropertyValue("Stacked") >>= bStacked;
626 xDiaProp->getPropertyValue("Percent") >>= bPercent;
627 xDiaProp->getPropertyValue("Deep") >>= bDeep;
628 }
629
630 //detect arguments for the new data source
631 OUString aRangeString;
632 bool bUseColumns = true;
633 bool bFirstCellAsLabel = true;
634 bool bHasCategories = true;
635 uno::Sequence< sal_Int32 > aSequenceMapping;
636
638 xChartDoc,
639 aRangeString, aSequenceMapping, bUseColumns, bFirstCellAsLabel, bHasCategories );
640
641 if( !bHasCategories && rDataOperator.setsCategories( bUseColumns ) )
642 bHasCategories = true;
643
644 aRangeString = "all";
646 aRangeString, aSequenceMapping, bUseColumns, bFirstCellAsLabel, bHasCategories ) );
647
648 // -- locked controllers
649 ControllerLockGuardUNO aCtrlLockGuard( xChartDoc );
650
651 // create and attach new data source
653 rDataOperator.apply(m_xDataAccess);
654 uno::Reference< chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() );
655 OSL_ASSERT( xDataProvider.is() );
656 if( !xDataProvider.is() )
657 return;
658 uno::Reference< chart2::data::XDataSource > xSource( xDataProvider->createDataSource( aArguments ) );
659
660 rtl::Reference< Diagram > xDia( xChartDoc->getFirstChartDiagram() );
661 if( xDia.is() )
662 xDia->setDiagramData( xSource, aArguments );
663
664 //correct stacking mode
665 if( bStacked || bPercent || bDeep )
666 {
667 StackMode eStackMode = StackMode::YStacked;
668 if( bDeep )
669 eStackMode = StackMode::ZStacked;
670 else if( bPercent )
671 eStackMode = StackMode::YStackedPercent;
672 xDia->setStackMode( eStackMode );
673 }
674
675 // notify listeners
676 css::chart::ChartDataChangeEvent aEvent(
677 static_cast< ::cppu::OWeakObject* >( this ),
678 css::chart::ChartDataChangeType_ALL, 0, 0, 0, 0 );
680 // \-- locked controllers
681}
682
684{
685 return "com.sun.star.comp.chart.ChartData";
686}
687
688sal_Bool SAL_CALL ChartDataWrapper::supportsService( const OUString& rServiceName )
689{
690 return cppu::supportsService(this, rServiceName);
691}
692
693css::uno::Sequence< OUString > SAL_CALL ChartDataWrapper::getSupportedServiceNames()
694{
695 return {
696 "com.sun.star.chart.ChartDataArray",
697 "com.sun.star.chart.ChartData"
698 };
699}
700
701} // namespace chart
702
703/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const Sequence< Sequence< uno::Any > > & m_rAnyRowDescriptions
const Sequence< OUString > & m_rRowDescriptions
bool m_bDataInColumns
rtl::Reference<::chart::ChartModel > m_xChartDoc
const Sequence< OUString > & m_rColumnDescriptions
const Sequence< Sequence< OUString > > & m_rComplexColumnDescriptions
Reference< XChartData > m_xDataToApply
const Sequence< Sequence< uno::Any > > & m_rAnyColumnDescriptions
const Sequence< Sequence< OUString > > & m_rComplexRowDescriptions
const Sequence< Sequence< double > > & m_rData
const Sequence< double > & m_rDates
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact
AnyEventRef aEvent
static rtl::Reference< InternalDataProvider > createInternalDataProvider(const rtl::Reference<::chart::ChartModel > &xChartDoc, bool bConnectToModel)
This guard calls lockControllers at the given Model in the CTOR and unlockControllers in the DTOR.
static bool detectRangeSegmentation(const rtl::Reference<::chart::ChartModel > &xChartModel, OUString &rOutRangeString, css::uno::Sequence< sal_Int32 > &rSequenceMapping, bool &rOutUseColumns, bool &rOutFirstCellAsLabel, bool &rOutHasCategories)
static css::uno::Sequence< css::beans::PropertyValue > createArguments(bool bUseColumns, bool bFirstCellAsLabel, bool bHasCategories)
static void switchToDateCategories(const rtl::Reference<::chart::ChartModel > &xChartDoc)
static void switchToTextCategories(const rtl::Reference<::chart::ChartModel > &xChartDoc)
virtual double SAL_CALL getNotANumber() override
virtual void SAL_CALL setAnyColumnDescriptions(const css::uno::Sequence< css::uno::Sequence< css::uno::Any > > &aColumnDescriptions) override
virtual void SAL_CALL setDateCategories(const css::uno::Sequence< double > &rDates) override
virtual sal_Bool SAL_CALL isNotANumber(double nNumber) override
virtual css::uno::Sequence< css::uno::Sequence< css::uno::Any > > SAL_CALL getAnyRowDescriptions() override
virtual css::uno::Sequence< css::uno::Sequence< css::uno::Any > > SAL_CALL getAnyColumnDescriptions() override
css::uno::Reference< css::chart2::XAnyDescriptionAccess > m_xDataAccess
void fireChartDataChangeEvent(css::chart::ChartDataChangeEvent &aEvent)
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
ChartDataWrapper(std::shared_ptr< Chart2ModelContact > spChart2ModelContact)
virtual void SAL_CALL setColumnDescriptions(const css::uno::Sequence< OUString > &aColumnDescriptions) override
virtual css::uno::Sequence< OUString > SAL_CALL getRowDescriptions() override
void applyData(lcl_Operator &rDataOperator)
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual void SAL_CALL dispose() override
virtual css::uno::Sequence< css::uno::Sequence< double > > SAL_CALL getData() override
virtual css::uno::Sequence< double > SAL_CALL getDateCategories() override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Sequence< OUString > SAL_CALL getColumnDescriptions() override
virtual void SAL_CALL addChartDataChangeEventListener(const css::uno::Reference< css::chart::XChartDataChangeEventListener > &aListener) override
virtual void SAL_CALL setAnyRowDescriptions(const css::uno::Sequence< css::uno::Sequence< css::uno::Any > > &aRowDescriptions) override
virtual css::uno::Sequence< css::uno::Sequence< OUString > > SAL_CALL getComplexColumnDescriptions() override
virtual css::uno::Sequence< css::uno::Sequence< OUString > > SAL_CALL getComplexRowDescriptions() override
virtual void SAL_CALL setRowDescriptions(const css::uno::Sequence< OUString > &aRowDescriptions) override
virtual void SAL_CALL setComplexRowDescriptions(const css::uno::Sequence< css::uno::Sequence< OUString > > &aRowDescriptions) override
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_aEventListenerContainer
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
virtual void SAL_CALL setData(const css::uno::Sequence< css::uno::Sequence< double > > &aData) override
virtual void SAL_CALL removeChartDataChangeEventListener(const css::uno::Reference< css::chart::XChartDataChangeEventListener > &aListener) override
virtual void SAL_CALL setComplexColumnDescriptions(const css::uno::Sequence< css::uno::Sequence< OUString > > &aColumnDescriptions) override
void forEach(std::unique_lock< std::mutex > &rGuard, FuncT const &func) const
sal_Int32 addInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
sal_Int32 getLength(std::unique_lock< std::mutex > &rGuard) const
sal_Int32 removeInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
ULONG m_refCount
Sequence< PropertyValue > aArguments
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
virtual void apply(const Reference< XAnyDescriptionAccess > &xDataAccess)=0
unsigned char sal_Bool