LibreOffice Module chart2 (master) 1
DataSeriesHelper.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 <DataSeriesHelper.hxx>
21#include <DataSeries.hxx>
23#include <DataSource.hxx>
24#include <ChartType.hxx>
25#include <unonames.hxx>
26#include <Diagram.hxx>
28#include <Axis.hxx>
29
30#include <com/sun/star/beans/XPropertySet.hpp>
31#include <com/sun/star/chart2/DataPointLabel.hpp>
32#include <com/sun/star/chart2/data/XTextualDataSequence.hpp>
33#include <com/sun/star/chart2/StackingDirection.hpp>
34#include <com/sun/star/chart2/data/LabelOrigin.hpp>
35#include <com/sun/star/chart2/AxisType.hpp>
36#include <com/sun/star/chart2/SymbolStyle.hpp>
37#include <com/sun/star/chart2/Symbol.hpp>
38#include <com/sun/star/chart2/XDiagram.hpp>
39#include <com/sun/star/drawing/LineStyle.hpp>
40
42#include <rtl/ustrbuf.hxx>
44
45#include <algorithm>
46#include <iterator>
47#include <utility>
48#include <vector>
49#include <set>
50
51using namespace ::com::sun::star;
52using namespace ::com::sun::star::chart2;
53using namespace ::chart::DataSeriesProperties;
54
55using ::com::sun::star::uno::Reference;
56using ::com::sun::star::uno::Sequence;
57
58namespace
59{
60
61class lcl_MatchesRole
62{
63public:
64 explicit lcl_MatchesRole( OUString aRole, bool bMatchPrefix ) :
65 m_aRole(std::move( aRole )),
66 m_bMatchPrefix( bMatchPrefix )
67 {}
68
69 bool operator () ( const Reference< chart2::data::XLabeledDataSequence > & xSeq ) const
70 {
71 if(!xSeq.is())
72 return false;
73 Reference< beans::XPropertySet > xProp( xSeq->getValues(), uno::UNO_QUERY );
74 OUString aRole;
75
76 if( m_bMatchPrefix )
77 return ( xProp.is() &&
78 (xProp->getPropertyValue( "Role" ) >>= aRole ) &&
79 aRole.match( m_aRole ));
80
81 return ( xProp.is() &&
82 (xProp->getPropertyValue( "Role" ) >>= aRole ) &&
83 m_aRole == aRole );
84 }
85
86private:
87 OUString m_aRole;
88 bool m_bMatchPrefix;
89};
90
91void lcl_getCooSysAndChartTypeOfSeries(
93 const Reference< chart2::XDiagram > & xDiagram,
96{
97 if( !xDiagram.is())
98 return;
99 ::chart::Diagram* pDiagram = dynamic_cast<::chart::Diagram*>(xDiagram.get());
100
102 {
103 for( rtl::Reference< ::chart::ChartType > const & chartType : coords->getChartTypes2() )
104 {
105 for( rtl::Reference< ::chart::DataSeries > const & dataSeries : chartType->getDataSeries2() )
106 {
107 if( dataSeries == xSeries )
108 {
109 xOutCooSys = coords;
110 xOutChartType = chartType;
111 }
112 }
113 }
114 }
115}
116
117void lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( const rtl::Reference< ::chart::DataSeries >& xSeries, bool bInsert )
118{
119 try
120 {
121 if( xSeries.is() )
122 {
123 DataPointLabel aLabelAtSeries;
124 xSeries->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabelAtSeries;
125 aLabelAtSeries.ShowNumber = bInsert;
126 if( !bInsert )
127 {
128 aLabelAtSeries.ShowNumberInPercent = false;
129 aLabelAtSeries.ShowCategoryName = false;
130 }
131 xSeries->setPropertyValue(CHART_UNONAME_LABEL, uno::Any(aLabelAtSeries));
132 uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
133 // "AttributedDataPoints"
134 if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
135 {
136 for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
137 {
138 Reference< beans::XPropertySet > xPointProp( xSeries->getDataPointByIndex(aAttributedDataPointIndexList[nN]) );
139 if( xPointProp.is() )
140 {
141 DataPointLabel aLabel;
142 xPointProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel;
143 aLabel.ShowNumber = bInsert;
144 if( !bInsert )
145 {
146 aLabel.ShowNumberInPercent = false;
147 aLabel.ShowCategoryName = false;
148 aLabel.ShowCustomLabel = false;
149 aLabel.ShowSeriesName = false;
150 }
151 xPointProp->setPropertyValue(CHART_UNONAME_LABEL, uno::Any(aLabel));
152 xPointProp->setPropertyValue(CHART_UNONAME_CUSTOM_LABEL_FIELDS, uno::Any());
153 }
154 }
155 }
156 }
157 }
158 catch(const uno::Exception &)
159 {
160 TOOLS_WARN_EXCEPTION("chart2", "" );
161 }
162}
163
164} // anonymous namespace
165
167{
168
170{
171 OUString aRet;
172 if( xLabeledDataSequence.is() )
173 {
174 Reference< beans::XPropertySet > xProp( xLabeledDataSequence->getValues(), uno::UNO_QUERY );
175 if( xProp.is() )
176 xProp->getPropertyValue( "Role" ) >>= aRet;
177 }
178 return aRet;
179}
180
184 const OUString& aRole,
185 bool bMatchPrefix /* = false */ )
186{
188 if( ! xSource.is())
189 return aNoResult;
190 const Sequence< Reference< chart2::data::XLabeledDataSequence > > aLabeledSeq( xSource->getDataSequences());
191 try
192 {
193 for (auto const & i : aLabeledSeq)
194 {
195 if (lcl_MatchesRole(aRole, bMatchPrefix)(i))
196 return i;
197 }
198 }
199 catch (const lang::DisposedException&)
200 {
201 TOOLS_WARN_EXCEPTION( "chart2", "unexpected exception caught" );
202 }
203
204 return aNoResult;
205}
206
207std::vector< uno::Reference< chart2::data::XLabeledDataSequence > >
209 const OUString& aRole )
210{
211 std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aResultVec;
212 for (const auto & i : aDataSequences)
213 {
214 if (lcl_MatchesRole(aRole, /*bMatchPrefix*/true)(i))
215 aResultVec.push_back(i);
216 }
217 return aResultVec;
218}
219
220std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >
222 const OUString& aRole )
223{
224 std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > aResultVec;
225 std::copy_if( aDataSequences.begin(), aDataSequences.end(),
226 std::back_inserter( aResultVec ),
227 lcl_MatchesRole(aRole, /*bMatchPrefix*/true) );
228 return aResultVec;
229}
230
231std::vector<uno::Reference<chart2::data::XLabeledDataSequence> >
232getAllDataSequences( const std::vector<rtl::Reference<DataSeries> >& aSeries )
233{
234 std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aSeqVec;
235
236 for( rtl::Reference<DataSeries> const & dataSeries : aSeries )
237 {
238 const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & aSeq( dataSeries->getDataSequences2());
239 aSeqVec.insert( aSeqVec.end(), aSeq.begin(), aSeq.end() );
240 }
241
242 return aSeqVec;
243}
244
246 getDataSource( const std::vector< rtl::Reference< DataSeries > > & aSeries )
247{
248 return new DataSource(getAllDataSequences(aSeries));
249}
250
252 const std::vector< rtl::Reference< DataSeries > > & aSeries,
253 const rtl::Reference< BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
254 StackMode eStackMode )
255{
256 const uno::Any aPropValue(
257 ( (eStackMode == StackMode::YStacked) ||
258 (eStackMode == StackMode::YStackedPercent) )
259 ? chart2::StackingDirection_Y_STACKING
260 : (eStackMode == StackMode::ZStacked )
261 ? chart2::StackingDirection_Z_STACKING
262 : chart2::StackingDirection_NO_STACKING );
263
264 std::set< sal_Int32 > aAxisIndexSet;
265 for( rtl::Reference< DataSeries > const & dataSeries : aSeries )
266 {
267 try
268 {
269 if( dataSeries.is() )
270 {
271 dataSeries->setPropertyValue( "StackingDirection", aPropValue );
272
273 sal_Int32 nAxisIndex = 0;
274 dataSeries->getPropertyValue( "AttachedAxisIndex" ) >>= nAxisIndex;
275 aAxisIndexSet.insert(nAxisIndex);
276 }
277 }
278 catch( const uno::Exception & )
279 {
280 DBG_UNHANDLED_EXCEPTION("chart2");
281 }
282 }
283
284 if( !(xCorrespondingCoordinateSystem.is() &&
285 1 < xCorrespondingCoordinateSystem->getDimension()) )
286 return;
287
288 if( aAxisIndexSet.empty() )
289 {
290 aAxisIndexSet.insert(0);
291 }
292
293 for (auto const& axisIndex : aAxisIndexSet)
294 {
296 xCorrespondingCoordinateSystem->getAxisByDimension2(1, axisIndex);
297 if( xAxis.is())
298 {
299 bool bPercent = (eStackMode == StackMode::YStackedPercent);
300 chart2::ScaleData aScaleData = xAxis->getScaleData();
301
302 if( bPercent != (aScaleData.AxisType==chart2::AxisType::PERCENT) )
303 {
304 if( bPercent )
305 aScaleData.AxisType = chart2::AxisType::PERCENT;
306 else
307 aScaleData.AxisType = chart2::AxisType::REALNUMBER;
308 xAxis->setScaleData( aScaleData );
309 }
310 }
311 }
312}
313
315{
316 sal_Int32 nRet = 0;
317 try
318 {
319 if( xSeries.is() )
320 {
321 xSeries->getPropertyValue( "AttachedAxisIndex" ) >>= nRet;
322 }
323 }
324 catch( const uno::Exception & )
325 {
326 DBG_UNHANDLED_EXCEPTION("chart2");
327 }
328 return nRet;
329}
330
332 const rtl::Reference< DataSeries > & xSeries,
333 const rtl::Reference< BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
334 sal_Int32 nDimensionIndex,
335 sal_Int32 nAxisIndex /* = -1 */ )
336{
337 sal_Int32 nResult = 0;
338 if( nAxisIndex == -1 )
339 nAxisIndex = getAttachedAxisIndex( xSeries );
340 try
341 {
342 rtl::Reference< Axis > xAxisProp =
343 xCorrespondingCoordinateSystem->getAxisByDimension2( nDimensionIndex, nAxisIndex );
344 if( xAxisProp.is())
345 xAxisProp->getPropertyValue(CHART_UNONAME_NUMFMT) >>= nResult;
346 }
347 catch( const uno::Exception & )
348 {
349 DBG_UNHANDLED_EXCEPTION("chart2");
350 }
351
352 return nResult;
353}
354
356 const rtl::Reference< DataSeries > & xSeries,
357 const rtl::Reference< Diagram > & xDiagram )
358{
361 lcl_getCooSysAndChartTypeOfSeries( xSeries, xDiagram, xResult, xDummy );
362
363 return xResult;
364}
365
367 const rtl::Reference< DataSeries > & xSeries,
368 const rtl::Reference< Diagram > & xDiagram )
369{
372 lcl_getCooSysAndChartTypeOfSeries( xSeries, xDiagram, xDummy, xResult );
373
374 return xResult;
375}
376
379 const rtl::Reference< ::chart::ChartType > & xChartType )
380{
381 try
382 {
383 std::vector< rtl::Reference< DataSeries > > aSeries = xChartType->getDataSeries2();
384 auto aIt = std::find( aSeries.begin(), aSeries.end(), xSeries );
385 if( aIt != aSeries.end())
386 {
387 aSeries.erase( aIt );
388 xChartType->setDataSeries( aSeries );
389 }
390 }
391 catch( const uno::Exception & )
392 {
393 DBG_UNHANDLED_EXCEPTION("chart2");
394 }
395}
396
398 bool bSymbolsOn, sal_Int32 nSeriesIndex )
399{
400 if( !xSeries )
401 return;
402
403 chart2::Symbol aSymbProp;
404 if( xSeries->getPropertyValue( "Symbol") >>= aSymbProp )
405 {
406 if( !bSymbolsOn )
407 aSymbProp.Style = chart2::SymbolStyle_NONE;
408 else if( aSymbProp.Style == chart2::SymbolStyle_NONE )
409 {
410 aSymbProp.Style = chart2::SymbolStyle_STANDARD;
411 aSymbProp.StandardSymbol = nSeriesIndex;
412 }
413 xSeries->setPropertyValue( "Symbol", uno::Any( aSymbProp ));
414 }
415 //todo: check attributed data points
416}
417
418void switchLinesOnOrOff( const rtl::Reference< DataSeries > & xSeries, bool bLinesOn )
419{
420 if( !xSeries )
421 return;
422
423 if( bLinesOn )
424 {
425 // keep line-styles that are not NONE
426 drawing::LineStyle eLineStyle;
427 if( (xSeries->getPropertyValue( "LineStyle") >>= eLineStyle ) &&
428 eLineStyle == drawing::LineStyle_NONE )
429 {
430 xSeries->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_SOLID ) );
431 }
432 }
433 else
434 xSeries->setPropertyValue( "LineStyle", uno::Any( drawing::LineStyle_NONE ) );
435}
436
438{
439 if( !xSeries )
440 return;
441
442 sal_Int32 nNewValue = bThick ? 80 : 0;
443 sal_Int32 nOldValue = 0;
444 if( (xSeries->getPropertyValue( "LineWidth") >>= nOldValue ) &&
445 nOldValue != nNewValue )
446 {
447 if( !(bThick && nOldValue>0))
448 xSeries->setPropertyValue( "LineWidth", uno::Any( nNewValue ) );
449 }
450}
451
453 const OUString& rPropertyName, const uno::Any& rPropertyValue )
454{
455 if( !xSeries.is() )
456 return;
457
458 xSeries->setPropertyValue( rPropertyName, rPropertyValue );
459 uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
460 // "AttributedDataPoints"
461 if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
462 {
463 for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
464 {
465 Reference< beans::XPropertySet > xPointProp( xSeries->getDataPointByIndex(aAttributedDataPointIndexList[nN]) );
466 if(!xPointProp.is())
467 continue;
468 xPointProp->setPropertyValue( rPropertyName, rPropertyValue );
469 if( rPropertyName == "LabelPlacement" )
470 xPointProp->setPropertyValue("CustomLabelPosition", uno::Any());
471 }
472 }
473}
474
476 const OUString& rPropertyName, const uno::Any& rPropertyValue )
477{
478 if( !xSeries.is() )
479 return false;
480
481 uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
482 // "AttributedDataPoints"
483 if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
484 {
485 for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
486 {
487 Reference< beans::XPropertySet > xPointProp( xSeries->getDataPointByIndex(aAttributedDataPointIndexList[nN]) );
488 if(!xPointProp.is())
489 continue;
490 uno::Any aPointValue( xPointProp->getPropertyValue( rPropertyName ) );
491 if( rPropertyValue != aPointValue )
492 return true;
493 }
494 }
495 return false;
496}
497
498namespace
499{
500
501}
502
503sal_Int32 translateIndexFromHiddenToFullSequence( sal_Int32 nIndex, const Reference< chart2::data::XDataSequence >& xDataSequence, bool bTranslate )
504{
505 if( !bTranslate )
506 return nIndex;
507
508 try
509 {
510 uno::Reference<beans::XPropertySet> xProp( xDataSequence, uno::UNO_QUERY );
511 if( xProp.is())
512 {
513 Sequence<sal_Int32> aHiddenIndicesSeq;
514 xProp->getPropertyValue( "HiddenValues" ) >>= aHiddenIndicesSeq;
515 if( aHiddenIndicesSeq.hasElements() )
516 {
517 auto aHiddenIndices( comphelper::sequenceToContainer<std::vector< sal_Int32 >>( aHiddenIndicesSeq ) );
518 std::sort( aHiddenIndices.begin(), aHiddenIndices.end() );
519
520 sal_Int32 nHiddenCount = static_cast<sal_Int32>(aHiddenIndices.size());
521 for( sal_Int32 nN = 0; nN < nHiddenCount; ++nN)
522 {
523 if( aHiddenIndices[nN] <= nIndex )
524 nIndex += 1;
525 else
526 break;
527 }
528 }
529 }
530 }
531 catch (const beans::UnknownPropertyException&)
532 {
533 }
534 return nIndex;
535}
536
538{
539 bool bRet = false;
540 try
541 {
542 if( xSeries.is() )
543 {
544 DataPointLabel aLabel;
545 if( xSeries->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel )
546 bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent || aLabel.ShowCategoryName
547 || aLabel.ShowSeriesName;
548 }
549 }
550 catch(const uno::Exception &)
551 {
552 TOOLS_WARN_EXCEPTION("chart2", "" );
553 }
554 return bRet;
555}
556
558{
559 bool bRet = false;
560 try
561 {
562 if( xSeries.is() )
563 {
564 uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
565 // "AttributedDataPoints"
566 if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
567 {
568 for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
569 {
570 Reference< beans::XPropertySet > xPointProp( xSeries->getDataPointByIndex(aAttributedDataPointIndexList[nN]) );
571 if( xPointProp.is() )
572 {
573 DataPointLabel aLabel;
574 if( xPointProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel )
575 bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent
576 || aLabel.ShowCategoryName || aLabel.ShowCustomLabel
577 || aLabel.ShowSeriesName;
578 if( bRet )
579 break;
580 }
581 }
582 }
583 }
584 }
585 catch(const uno::Exception &)
586 {
587 TOOLS_WARN_EXCEPTION("chart2", "" );
588 }
589 return bRet;
590}
591
592bool hasDataLabelAtPoint( const rtl::Reference< DataSeries >& xSeries, sal_Int32 nPointIndex )
593{
594 bool bRet = false;
595 try
596 {
598 if( xSeries.is() )
599 {
600 uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
601 // "AttributedDataPoints"
602 if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
603 {
604 auto aIt = std::find( std::as_const(aAttributedDataPointIndexList).begin(), std::as_const(aAttributedDataPointIndexList).end(), nPointIndex );
605 if( aIt != std::as_const(aAttributedDataPointIndexList).end())
606 xProp = xSeries->getDataPointByIndex(nPointIndex);
607 else
608 xProp = xSeries;
609 }
610 if( xProp.is() )
611 {
612 DataPointLabel aLabel;
613 if( xProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel )
614 bRet = aLabel.ShowNumber || aLabel.ShowNumberInPercent
615 || aLabel.ShowCategoryName || aLabel.ShowCustomLabel
616 || aLabel.ShowSeriesName;
617 }
618 }
619 }
620 catch(const uno::Exception &)
621 {
622 TOOLS_WARN_EXCEPTION("chart2", "" );
623 }
624 return bRet;
625}
626
628{
629 lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( xSeries, true /*bInsert*/ );
630}
631
633{
634 lcl_insertOrDeleteDataLabelsToSeriesAndAllPoints( xSeries, false /*bInsert*/ );
635}
636
638{
639 try
640 {
641 if( xPointProp.is() )
642 {
643 DataPointLabel aLabel;
644 xPointProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel;
645 aLabel.ShowNumber = true;
646 xPointProp->setPropertyValue(CHART_UNONAME_LABEL, uno::Any(aLabel));
647 }
648 }
649 catch(const uno::Exception &)
650 {
651 TOOLS_WARN_EXCEPTION("chart2", "" );
652 }
653}
654
656{
657 try
658 {
659 if( xPointProp.is() )
660 {
661 DataPointLabel aLabel;
662 xPointProp->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel;
663 aLabel.ShowNumber = false;
664 aLabel.ShowNumberInPercent = false;
665 aLabel.ShowCategoryName = false;
666 aLabel.ShowCustomLabel = false;
667 aLabel.ShowSeriesName = false;
668 xPointProp->setPropertyValue(CHART_UNONAME_LABEL, uno::Any(aLabel));
669 xPointProp->setPropertyValue(CHART_UNONAME_CUSTOM_LABEL_FIELDS, uno::Any());
670 }
671 }
672 catch(const uno::Exception &)
673 {
674 TOOLS_WARN_EXCEPTION("chart2", "" );
675 }
676}
677
678} // namespace chart
679
680/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString m_aRole
tCoordinateSystemContainerType getBaseCoordinateSystems() const
Definition: Diagram.cxx:615
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
sal_Int32 nIndex
Sequence< sal_Int8 > aSeq
OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelAtPoint(const rtl::Reference< ::chart::DataSeries > &xSeries, sal_Int32 nPointIndex)
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::BaseCoordinateSystem > getCoordinateSystemOfSeries(const rtl::Reference< ::chart::DataSeries > &xSeries, const rtl::Reference< ::chart::Diagram > &xDiagram)
OOO_DLLPUBLIC_CHARTTOOLS void switchLinesOnOrOff(const rtl::Reference< ::chart::DataSeries > &xSeries, bool bLinesOn)
OOO_DLLPUBLIC_CHARTTOOLS std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > getAllDataSequences(const std::vector< rtl::Reference<::chart::DataSeries > > &aSeries)
OOO_DLLPUBLIC_CHARTTOOLS void insertDataLabelToPoint(const css::uno::Reference< css::beans::XPropertySet > &xPointPropertySet)
OOO_DLLPUBLIC_CHARTTOOLS void setStackModeAtSeries(const std::vector< rtl::Reference< ::chart::DataSeries > > &aSeries, const rtl::Reference< ::chart::BaseCoordinateSystem > &xCorrespondingCoordinateSystem, StackMode eStackMode)
OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelsAtSeries(const rtl::Reference< ::chart::DataSeries > &xSeries)
OOO_DLLPUBLIC_CHARTTOOLS void insertDataLabelsToSeriesAndAllPoints(const rtl::Reference< ::chart::DataSeries > &xSeries)
OOO_DLLPUBLIC_CHARTTOOLS void setPropertyAlsoToAllAttributedDataPoints(const rtl::Reference< ::chart::DataSeries > &xSeries, const OUString &rPropertyName, const css::uno::Any &rPropertyValue)
OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getNumberFormatKeyFromAxis(const rtl::Reference< ::chart::DataSeries > &xSeries, const rtl::Reference< ::chart::BaseCoordinateSystem > &xCorrespondingCoordinateSystem, sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex=-1)
OOO_DLLPUBLIC_CHARTTOOLS void deleteSeries(const rtl::Reference< ::chart::DataSeries > &xSeries, const rtl::Reference< ::chart::ChartType > &xChartType)
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::DataSource > getDataSource(const std::vector< rtl::Reference< ::chart::DataSeries > > &aSeries)
Retrieves all data sequences found in the given data series and puts them into a data source.
OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference< css::chart2::data::XLabeledDataSequence > getDataSequenceByRole(const css::uno::Reference< css::chart2::data::XDataSource > &xSource, const OUString &aRole, bool bMatchPrefix=false)
Retrieves the data sequence in the given data source that matches the given role.
OOO_DLLPUBLIC_CHARTTOOLS void deleteDataLabelsFromSeriesAndAllPoints(const rtl::Reference< ::chart::DataSeries > &xSeries)
OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 translateIndexFromHiddenToFullSequence(sal_Int32 nClippedIndex, const css::uno::Reference< css::chart2::data::XDataSequence > &xDataSequence, bool bTranslate)
OOO_DLLPUBLIC_CHARTTOOLS std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > getAllDataSequencesByRole(const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > &aDataSequences, const OUString &aRole)
Retrieves all data sequences in the given data source that match the given role prefix.
OOO_DLLPUBLIC_CHARTTOOLS OUString getRole(const css::uno::Reference< css::chart2::data::XLabeledDataSequence > &xLabeledDataSequence)
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::ChartType > getChartTypeOfSeries(const rtl::Reference< ::chart::DataSeries > &xSeries, const rtl::Reference< ::chart::Diagram > &xDiagram)
OOO_DLLPUBLIC_CHARTTOOLS bool hasAttributedDataPointDifferentValue(const rtl::Reference< ::chart::DataSeries > &xSeries, const OUString &rPropertyName, const css::uno::Any &rPropertyValue)
OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getAttachedAxisIndex(const rtl::Reference< ::chart::DataSeries > &xSeries)
OOO_DLLPUBLIC_CHARTTOOLS void makeLinesThickOrThin(const rtl::Reference< ::chart::DataSeries > &xSeries, bool bThick)
OOO_DLLPUBLIC_CHARTTOOLS void switchSymbolsOnOrOff(const rtl::Reference< ::chart::DataSeries > &xSeries, bool bSymbolsOn, sal_Int32 nSeriesIndex)
OOO_DLLPUBLIC_CHARTTOOLS bool hasDataLabelsAtPoints(const rtl::Reference< ::chart::DataSeries > &xSeries)
OOO_DLLPUBLIC_CHARTTOOLS void deleteDataLabelsFromPoint(const css::uno::Reference< css::beans::XPropertySet > &xPointPropertySet)
DstType sequenceToContainer(const css::uno::Sequence< SrcType > &i_Sequence)
int i
enumrange< T >::Iterator begin(enumrange< T >)
end
OUString aLabel
constexpr OUStringLiteral CHART_UNONAME_NUMFMT
Definition: unonames.hxx:20
constexpr OUStringLiteral CHART_UNONAME_CUSTOM_LABEL_FIELDS
Definition: unonames.hxx:36
constexpr OUStringLiteral CHART_UNONAME_LABEL
Definition: unonames.hxx:24