LibreOffice Module chart2 (master) 1
PieChartTypeTemplate.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
21#include "PieChartType.hxx"
23#include <CommonConverters.hxx>
24#include <ChartType.hxx>
25#include <Diagram.hxx>
26#include <DiagramHelper.hxx>
27#include <DataSeries.hxx>
28#include <DataSeriesHelper.hxx>
30#include <Axis.hxx>
31#include <AxisHelper.hxx>
32#include <ThreeDHelper.hxx>
33#include <PropertyHelper.hxx>
34#include <com/sun/star/beans/PropertyAttribute.hpp>
35#include <com/sun/star/drawing/LineStyle.hpp>
36#include <com/sun/star/uno/XComponentContext.hpp>
37#include <officecfg/Office/Compatibility.hxx>
39
40#include <rtl/math.hxx>
41
42#include <algorithm>
43
44using namespace ::com::sun::star;
45using namespace ::chart::DataSeriesProperties;
46
47using ::com::sun::star::beans::Property;
48using ::com::sun::star::uno::Sequence;
49using ::com::sun::star::uno::Reference;
50
51namespace
52{
53
54enum
55{
56 PROP_PIE_TEMPLATE_DEFAULT_OFFSET,
57 PROP_PIE_TEMPLATE_OFFSET_MODE,
58 PROP_PIE_TEMPLATE_DIMENSION,
59 PROP_PIE_TEMPLATE_USE_RINGS
60};
61
62::chart::tPropertyValueMap& StaticPieChartTypeTemplateDefaults()
63{
64 static ::chart::tPropertyValueMap aStaticDefaults =
65 []{
67 ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_PIE_TEMPLATE_OFFSET_MODE, chart2::PieChartOffsetMode_NONE );
68 ::chart::PropertyHelper::setPropertyValueDefault< double >( aOutMap, PROP_PIE_TEMPLATE_DEFAULT_OFFSET, 0.5 );
69 ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aOutMap, PROP_PIE_TEMPLATE_DIMENSION, 2 );
70 ::chart::PropertyHelper::setPropertyValueDefault( aOutMap, PROP_PIE_TEMPLATE_USE_RINGS, false );
71 return aOutMap;
72 }();
73 return aStaticDefaults;
74}
75
76::cppu::OPropertyArrayHelper& StaticPieChartTypeTemplateInfoHelper()
77{
78 static ::cppu::OPropertyArrayHelper aPropHelper(
79 []()
80 {
81 std::vector< css::beans::Property > aProperties {
82 { "OffsetMode",
83 PROP_PIE_TEMPLATE_OFFSET_MODE,
85 beans::PropertyAttribute::BOUND
86 | beans::PropertyAttribute::MAYBEDEFAULT },
87 { "DefaultOffset",
88 PROP_PIE_TEMPLATE_DEFAULT_OFFSET,
90 beans::PropertyAttribute::BOUND
91 | beans::PropertyAttribute::MAYBEDEFAULT },
92 { "Dimension",
93 PROP_PIE_TEMPLATE_DIMENSION,
95 beans::PropertyAttribute::BOUND
96 | beans::PropertyAttribute::MAYBEDEFAULT },
97 { "UseRings",
98 PROP_PIE_TEMPLATE_USE_RINGS,
100 beans::PropertyAttribute::BOUND
101 | beans::PropertyAttribute::MAYBEDEFAULT } };
102
103 std::sort( aProperties.begin(), aProperties.end(),
105
106 return comphelper::containerToSequence( aProperties );
107 }() );
108 return aPropHelper;
109}
110
111uno::Reference< beans::XPropertySetInfo >& StaticPieChartTypeTemplateInfo()
112{
113 static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
114 ::cppu::OPropertySetHelper::createPropertySetInfo(StaticPieChartTypeTemplateInfoHelper() ) );
115 return xPropertySetInfo;
116}
117
118} // anonymous namespace
119
120namespace chart
121{
122
125 uno::XComponentContext > const & xContext,
126 const OUString & rServiceName,
127 chart2::PieChartOffsetMode eMode,
128 bool bRings /* = false */,
129 sal_Int32 nDim /* = 2 */ ) :
130 ChartTypeTemplate( xContext, rServiceName )
131{
132 setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_OFFSET_MODE, uno::Any( eMode ));
133 setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_DIMENSION, uno::Any( nDim ));
134 setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_USE_RINGS, uno::Any( bRings ));
135}
136
138{}
139
140// ____ OPropertySet ____
141void PieChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle, uno::Any& rAny ) const
142{
143 const tPropertyValueMap& rStaticDefaults = StaticPieChartTypeTemplateDefaults();
144 tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( nHandle ) );
145 if( aFound == rStaticDefaults.end() )
146 rAny.clear();
147 else
148 rAny = (*aFound).second;
149}
150
152{
153 return StaticPieChartTypeTemplateInfoHelper();
154}
155
156// ____ XPropertySet ____
158{
159 return StaticPieChartTypeTemplateInfo();
160}
161
162// ____ ChartTypeTemplate ____
164{
165 sal_Int32 nDim = 2;
166 try
167 {
168 // note: UNO-methods are never const
169 const_cast< PieChartTypeTemplate * >( this )->
170 getFastPropertyValue( PROP_PIE_TEMPLATE_DIMENSION ) >>= nDim;
171 }
172 catch( const beans::UnknownPropertyException & )
173 {
174 DBG_UNHANDLED_EXCEPTION("chart2");
175 }
176
177 return nDim;
178}
179
180sal_Int32 PieChartTypeTemplate::getAxisCountByDimension( sal_Int32 /*nDimension*/ )
181{
182 return 0;
183}
184
186 const std::vector< rtl::Reference< BaseCoordinateSystem > > & /*rCoordSys*/ )
187{
188 // hide existing axes
189 //hhhh todo
190}
191
193 const std::vector< rtl::Reference< BaseCoordinateSystem > > & aCooSysSeq,
194 const Reference< chart2::data::XLabeledDataSequence > & xCategories //@todo: in future there may be more than one sequence of categories (e.g. charttype with categories at x and y axis )
195 )
196{
197 ChartTypeTemplate::adaptScales( aCooSysSeq, xCategories );
198
199 //remove explicit scalings from radius axis
200 //and ensure correct orientation of scales for donuts
201
202 for( rtl::Reference< BaseCoordinateSystem > const & coords : aCooSysSeq )
203 {
204 try
205 {
206 rtl::Reference< Axis > xAxis = AxisHelper::getAxis( 1 /*nDimensionIndex*/,0 /*nAxisIndex*/
207 , coords );
208 if( xAxis.is() )
209 {
210 chart2::ScaleData aScaleData( xAxis->getScaleData() );
212 // tdf#108059 Create new pie/donut charts with clockwise orientation
213 if (!officecfg::Office::Compatibility::View::ClockwisePieChartDirection::get())
214 {
215 aScaleData.Orientation = chart2::AxisOrientation_MATHEMATICAL;
216 }
217 else
218 {
219 aScaleData.Orientation = chart2::AxisOrientation_REVERSE;
220 }
221 xAxis->setScaleData( aScaleData );
222 }
223
224 xAxis = AxisHelper::getAxis( 0 /*nDimensionIndex*/,0 /*nAxisIndex*/
225 , coords );
226 if( xAxis.is() )
227 {
228 chart2::ScaleData aScaleData( xAxis->getScaleData() );
229
230 //tdf#123218 Don't reverse the orientation in OOXML-heavy environments
231 if( officecfg::Office::Compatibility::View::ReverseXAxisOrientationDoughnutChart::get() )
232 aScaleData.Orientation = chart2::AxisOrientation_REVERSE;
233 else
234 aScaleData.Orientation = chart2::AxisOrientation_MATHEMATICAL;
235 xAxis->setScaleData( aScaleData );
236 }
237 }
238 catch( const uno::Exception & )
239 {
240 DBG_UNHANDLED_EXCEPTION("chart2");
241 }
242 }
243}
244
246 const std::vector< std::vector< rtl::Reference< DataSeries > > > & aSeriesSeq,
247 const std::vector< rtl::Reference< BaseCoordinateSystem > > & rCoordSys,
248 const std::vector< rtl::Reference< ChartType > >& /* aOldChartTypesSeq */ )
249{
250 if( rCoordSys.empty() )
251 return;
252
253 try
254 {
256 xCT->setFastPropertyValue(
257 PROP_PIECHARTTYPE_USE_RINGS, getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); // "UseRings"
258 rCoordSys[0]->setChartTypes( std::vector{xCT} );
259
260 if( !aSeriesSeq.empty() )
261 {
262 std::vector< rtl::Reference< DataSeries > > aFlatSeriesSeq = FlattenSequence( aSeriesSeq );
263 xCT->setDataSeries( aFlatSeriesSeq );
264
266 aFlatSeriesSeq, rCoordSys[0], getStackMode( 0 ));
267 }
268 }
269 catch( const uno::Exception & )
270 {
271 DBG_UNHANDLED_EXCEPTION("chart2");
272 }
273}
274
275// ____ XChartTypeTemplate ____
278 bool bAdaptProperties )
279{
280 bool bResult = ChartTypeTemplate::matchesTemplate2( xDiagram, bAdaptProperties );
281
282 bool bTemplateUsesRings = false;
283 getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS ) >>= bTemplateUsesRings;
284 chart2::PieChartOffsetMode ePieOffsetMode;
285 getFastPropertyValue( PROP_PIE_TEMPLATE_OFFSET_MODE ) >>= ePieOffsetMode;
286
287 //check offset-mode
288 if( bResult )
289 {
290 try
291 {
292 double fOffset=0.0;
293 bool bAllOffsetsEqual = true;
294 sal_Int32 nOuterSeriesIndex = 0;
295
296 std::vector< rtl::Reference< DataSeries > > aSeriesVec =
297 xDiagram->getDataSeries();
298
299 //tdf#108067 The outer series is the last series in OOXML-heavy environments
300 if( !officecfg::Office::Compatibility::View::ReverseXAxisOrientationDoughnutChart::get() )
301 nOuterSeriesIndex = aSeriesVec.size() - 1;
302
303 //check offset of outer series
304 if( !aSeriesVec.empty() )
305 {
306 //@todo in future this will depend on Orientation of the radius axis scale
307 rtl::Reference< DataSeries > xSeries( aSeriesVec[nOuterSeriesIndex] );
308 xSeries->getPropertyValue( "Offset") >>= fOffset;
309
310 // "AttributedDataPoints"
311 uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
312 if( xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList )
313 {
314 for(sal_Int32 nN=aAttributedDataPointIndexList.getLength();nN--;)
315 {
316 uno::Reference< beans::XPropertySet > xPointProp( xSeries->getDataPointByIndex(aAttributedDataPointIndexList[nN]) );
317 if(xPointProp.is())
318 {
319 double fPointOffset=0.0;
320 if( xSeries->getPropertyValue( "Offset") >>= fPointOffset )
321 {
322 if( ! ::rtl::math::approxEqual( fPointOffset, fOffset ) )
323 {
324 bAllOffsetsEqual = false;
325 break;
326 }
327 }
328 }
329 }
330 }
331 }
332
333 chart2::PieChartOffsetMode eOffsetMode = chart2::PieChartOffsetMode_NONE;
334 if( bAllOffsetsEqual && fOffset > 0.0 )
335 {
336 eOffsetMode = chart2::PieChartOffsetMode_ALL_EXPLODED;
337 if( bAdaptProperties )
338 setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_DEFAULT_OFFSET, uno::Any( fOffset ));
339 }
340
341 bResult = ( eOffsetMode == ePieOffsetMode );
342 }
343 catch( const uno::Exception & )
344 {
345 DBG_UNHANDLED_EXCEPTION("chart2");
346 bResult = false;
347 }
348 }
349
350 //check UseRings
351 if( bResult )
352 {
353 rtl::Reference< ChartType > xCTProp = xDiagram->getChartTypeByIndex( 0 );
354 bool bUseRings = false;
355 if( xCTProp->getFastPropertyValue( PROP_PIECHARTTYPE_USE_RINGS ) >>= bUseRings ) // "UseRings"
356 {
357 bResult = ( bTemplateUsesRings == bUseRings );
358 }
359 }
360
361 return bResult;
362}
363
365{
367
368 try
369 {
370 xResult = new PieChartType();
371 xResult->setFastPropertyValue(
372 PROP_PIECHARTTYPE_USE_RINGS, getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); // "UseRings"
373 }
374 catch( const uno::Exception & )
375 {
376 DBG_UNHANDLED_EXCEPTION("chart2");
377 }
378
379 return xResult;
380}
381
383 const std::vector< rtl::Reference< ChartType > >& aFormerlyUsedChartTypes )
384{
386
387 try
388 {
389 xResult = new PieChartType();
390 ChartTypeTemplate::copyPropertiesFromOldToNewCoordinateSystem( aFormerlyUsedChartTypes, xResult );
391 xResult->setFastPropertyValue(
392 PROP_PIECHARTTYPE_USE_RINGS, getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS )); // "UseRings"
393 }
394 catch( const uno::Exception & )
395 {
396 DBG_UNHANDLED_EXCEPTION("chart2");
397 }
398
399 return xResult;
400}
401
403 const rtl::Reference< DataSeries >& xSeries,
404 ::sal_Int32 nChartTypeIndex,
405 ::sal_Int32 nSeriesIndex,
406 ::sal_Int32 nSeriesCount )
407{
408 ChartTypeTemplate::applyStyle2( xSeries, nChartTypeIndex, nSeriesIndex, nSeriesCount );
409
410 try
411 {
412 bool bTemplateUsesRings = false;
413 sal_Int32 nOuterSeriesIndex = 0;
414 getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS ) >>= bTemplateUsesRings;
415
416 //tdf#108067 The outer series is the last series in OOXML-heavy environments
417 if( !officecfg::Office::Compatibility::View::ReverseXAxisOrientationDoughnutChart::get() )
418 nOuterSeriesIndex = nSeriesCount - 1;
419
420 if( nSeriesIndex == nOuterSeriesIndex ) //@todo in future this will depend on Orientation of the radius axis scale
421 {
422 static constexpr OUStringLiteral aOffsetPropName( u"Offset" );
423 // get offset mode
424 chart2::PieChartOffsetMode ePieOffsetMode;
425 getFastPropertyValue( PROP_PIE_TEMPLATE_OFFSET_MODE ) >>= ePieOffsetMode;
426
427 // get default offset
428 double fDefaultOffset = 0.5;
429 getFastPropertyValue( PROP_PIE_TEMPLATE_DEFAULT_OFFSET ) >>= fDefaultOffset;
430 double fOffsetToSet = fDefaultOffset;
431
432 uno::Sequence< sal_Int32 > aAttributedDataPointIndexList;
433 // "AttributedDataPoints"
434 xSeries->getFastPropertyValue( PROP_DATASERIES_ATTRIBUTED_DATA_POINTS ) >>= aAttributedDataPointIndexList;
435
436 // determine whether to set the new offset
437 bool bSetOffset = ( ePieOffsetMode == chart2::PieChartOffsetMode_ALL_EXPLODED );
438 if( !bSetOffset &&
439 (ePieOffsetMode == chart2::PieChartOffsetMode_NONE) )
440 {
441 // set offset to 0 if the offset was exactly "all exploded"
442 // before (individual offsets are kept)
443 double fOffset = 0.0;
444 if( (xSeries->getPropertyValue( aOffsetPropName ) >>= fOffset) &&
445 ::rtl::math::approxEqual( fOffset, fDefaultOffset ))
446 {
447 fOffsetToSet = 0.0;
448 bSetOffset = true;
449 for( auto const & pointIndex : std::as_const(aAttributedDataPointIndexList) )
450 {
452 xSeries->getDataPointByIndex( pointIndex ));
453 uno::Reference< beans::XPropertyState > xPointState( xPointProp, uno::UNO_QUERY );
454 double fPointOffset = 0.0;
455 if( xPointState.is() &&
456 (xPointState->getPropertyState( aOffsetPropName ) == beans::PropertyState_DIRECT_VALUE) &&
457 xPointProp.is() &&
458 (xPointProp->getPropertyValue( aOffsetPropName ) >>= fPointOffset ) &&
459 ! ::rtl::math::approxEqual( fPointOffset, fDefaultOffset ) )
460 {
461 bSetOffset = false;
462 break;
463 }
464 }
465 }
466 }
467
468 if( bSetOffset )
469 {
470 // set the offset to the series and to the attributed data points
471 xSeries->setPropertyValue( aOffsetPropName, uno::Any( fOffsetToSet ));
472
473 // remove hard attributes from data points
474 for( auto const & pointIndex : std::as_const(aAttributedDataPointIndexList) )
475 {
477 xSeries->getDataPointByIndex( pointIndex ), uno::UNO_QUERY );
478 if( xPointState.is())
479 xPointState->setPropertyToDefault( aOffsetPropName );
480 }
481 }
482 }
483
484 // line style
485 DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, "BorderStyle", uno::Any( drawing::LineStyle_NONE ) );
486
487 // vary colors by point
488 xSeries->setFastPropertyValue( PROP_DATASERIES_VARY_COLORS_BY_POINT, uno::Any( true )); // "VaryColorsByPoint"
489 }
490 catch( const uno::Exception & )
491 {
492 DBG_UNHANDLED_EXCEPTION("chart2");
493 }
494}
495
497{
498 // reset axes and grids
499 if( xDiagram.is())
500 {
501 const std::vector< rtl::Reference< BaseCoordinateSystem > > aCooSysSeq( xDiagram->getBaseCoordinateSystems());
502 ChartTypeTemplate::createAxes( aCooSysSeq );
503
504 //reset scale orientation
505 for( rtl::Reference< BaseCoordinateSystem > const & coords : aCooSysSeq )
506 {
507 try
508 {
509 rtl::Reference< Axis > xAxis = AxisHelper::getAxis( 0 /*nDimensionIndex*/,0 /*nAxisIndex*/
510 , coords );
511 if( xAxis.is() )
512 {
513 chart2::ScaleData aScaleData( xAxis->getScaleData() );
514 aScaleData.Orientation = chart2::AxisOrientation_MATHEMATICAL;
515 xAxis->setScaleData( aScaleData );
516 }
517
518 xAxis = AxisHelper::getAxis( 1, 0, coords );
519 if( xAxis.is() )
520 {
521 chart2::ScaleData aScaleData( xAxis->getScaleData() );
522 aScaleData.Orientation = chart2::AxisOrientation_MATHEMATICAL;
523 xAxis->setScaleData( aScaleData );
524 }
525 }
526 catch( const uno::Exception & )
527 {
528 DBG_UNHANDLED_EXCEPTION("chart2");
529 }
530 }
531 }
532
534
535 // vary colors by point,
536 // line style
537 std::vector< rtl::Reference< DataSeries > > aSeriesVec =
538 xDiagram->getDataSeries();
539 uno::Any aLineStyleAny( drawing::LineStyle_NONE );
540 for (auto const& series : aSeriesVec)
541 {
542 series->setPropertyToDefault( "VaryColorsByPoint");
543 if( series->getPropertyValue( "BorderStyle") == aLineStyleAny )
544 {
545 series->setPropertyToDefault( "BorderStyle");
546 }
547 }
548
549 //reset scene properties
550 xDiagram->setDefaultRotation( false );
551}
552
553// ____ XChartTypeTemplate ____
555{
556 if( !xDiagram.is() )
557 return;
558
559 //different default for scene geometry:
560 xDiagram->setDefaultRotation( true );
561}
562
565
566} // namespace chart
567
568/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
PropertiesInfo aProperties
static rtl::Reference< ::chart::Axis > getAxis(sal_Int32 nDimensionIndex, bool bMainAxis, const rtl::Reference< ::chart::Diagram > &xDiagram)
static void removeExplicitScaling(css::chart2::ScaleData &rScaleData)
Definition: AxisHelper.cxx:86
For creating diagrams and modifying existing diagrams.
virtual bool matchesTemplate2(const rtl::Reference< ::chart::Diagram > &xDiagram, bool bAdaptProperties)
void createAxes(const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > &rCoordSys)
create axes and add them to the given container.
virtual StackMode getStackMode(sal_Int32 nChartTypeIndex) const
returns StackMode::NONE by default.
virtual void adaptScales(const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > &aCooSysSeq, const css::uno::Reference< css::chart2::data::XLabeledDataSequence > &xCategories)
Sets categories at the scales of dimension 0 and the percent stacking at the scales of dimension 1 of...
static void copyPropertiesFromOldToNewCoordinateSystem(const std::vector< rtl::Reference< ChartType > > &rOldChartTypesSeq, const rtl::Reference< ChartType > &xNewChartType)
virtual void applyStyle2(const rtl::Reference< ::chart::DataSeries > &xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, ::sal_Int32 nSeriesCount)
virtual void resetStyles2(const rtl::Reference< ::chart::Diagram > &xDiagram)
virtual void adaptDiagram(const rtl::Reference< ::chart::Diagram > &xDiagram) override
Allows derived classes to manipulate the diagrams whole, like changing the wall color.
virtual sal_Int32 getAxisCountByDimension(sal_Int32 nDimension) override
Give the number of requested axis per dimension here.
virtual void createChartTypes(const std::vector< std::vector< rtl::Reference< ::chart::DataSeries > > > &aSeriesSeq, const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > &rCoordSys, const std::vector< rtl::Reference< ChartType > > &aOldChartTypesSeq) override
create a data series tree, that fits the requirements of the chart type.
PieChartTypeTemplate(css::uno::Reference< css::uno::XComponentContext > const &xContext, const OUString &rServiceName, css::chart2::PieChartOffsetMode eMode, bool bRings, sal_Int32 nDim=2)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual rtl::Reference< ::chart::ChartType > getChartTypeForIndex(sal_Int32 nChartTypeIndex) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
The InfoHelper table contains all property names and types of this object.
virtual void resetStyles2(const rtl::Reference< ::chart::Diagram > &xDiagram) override
virtual rtl::Reference< ::chart::ChartType > getChartTypeForNewSeries2(const std::vector< rtl::Reference< ::chart::ChartType > > &aFormerlyUsedChartTypes) override
virtual void adaptAxes(const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > &rCoordSys) override
adapt properties of existing axes and remove superfluous axes
virtual sal_Int32 getDimension() const override
returns 2 by default. Supported are 2 and 3
virtual ~PieChartTypeTemplate() override
virtual void adaptScales(const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > &aCooSysSeq, const css::uno::Reference< css::chart2::data::XLabeledDataSequence > &xCategories) override
Sets categories at the scales of dimension 0 and the percent stacking at the scales of dimension 1 of...
virtual void applyStyle2(const rtl::Reference< ::chart::DataSeries > &xSeries, ::sal_Int32 nChartTypeGroupIndex, ::sal_Int32 nSeriesIndex, ::sal_Int32 nSeriesCount) override
virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any &rAny) const override
merge XInterface implementations
virtual bool matchesTemplate2(const rtl::Reference< ::chart::Diagram > &xDiagram, bool bAdaptProperties) override
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL createPropertySetInfo(IPropertyArrayHelper &rProperties)
css::uno::Type const & get()
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
The same as getFastPropertyValue, but return the value through rValue and nHandle is always valid.
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
The same as setFastPropertyValue; nHandle is always valid.
#define DBG_UNHANDLED_EXCEPTION(...)
float u
Mode eMode
OOO_DLLPUBLIC_CHARTTOOLS void setStackModeAtSeries(const std::vector< rtl::Reference< ::chart::DataSeries > > &aSeries, const rtl::Reference< ::chart::BaseCoordinateSystem > &xCorrespondingCoordinateSystem, StackMode eStackMode)
OOO_DLLPUBLIC_CHARTTOOLS void setPropertyAlsoToAllAttributedDataPoints(const rtl::Reference< ::chart::DataSeries > &xSeries, const OUString &rPropertyName, const css::uno::Any &rPropertyValue)
void setPropertyValueDefault(tPropertyValueMap &rOutMap, tPropertyValueMapKey key, const Value &value)
Calls setPropertyValue() but asserts that the given property hasn't been set before.
std::unordered_map< tPropertyValueMapKey, css::uno::Any > tPropertyValueMap
@ PROP_PIECHARTTYPE_USE_RINGS
Definition: ChartType.hxx:43
std::vector< T > FlattenSequence(const std::vector< std::vector< T > > &aSeqSeq)
std::vector< std::vector< T > > -> std::vector< T >
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
IMPLEMENT_FORWARD_XTYPEPROVIDER2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
IMPLEMENT_FORWARD_XINTERFACE2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
sal_Int32 nHandle