1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include "PieChartTypeTemplate.hxx"
22 #include "CommonConverters.hxx"
23 #include "DiagramHelper.hxx"
24 #include "servicenames_charttypes.hxx"
25 #include "DataSeriesHelper.hxx"
26 #include "ContainerHelper.hxx"
27 #include "BaseGFXHelper.hxx"
28 #include "AxisHelper.hxx"
29 #include "ThreeDHelper.hxx"
30 #include "PropertyHelper.hxx"
31 #include <com/sun/star/beans/PropertyAttribute.hpp>
32 #include <com/sun/star/drawing/LineStyle.hpp>
33 #include <com/sun/star/drawing/FillStyle.hpp>
34 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
35 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
37 #include <rtl/math.hxx>
41 using namespace ::com::sun::star
;
43 using ::com::sun::star::beans::Property
;
44 using ::com::sun::star::uno::Sequence
;
45 using ::com::sun::star::uno::Reference
;
46 using ::com::sun::star::uno::Any
;
47 using ::osl::MutexGuard
;
54 PROP_PIE_TEMPLATE_DEFAULT_OFFSET
,
55 PROP_PIE_TEMPLATE_OFFSET_MODE
,
56 PROP_PIE_TEMPLATE_DIMENSION
,
57 PROP_PIE_TEMPLATE_USE_RINGS
60 static void lcl_AddPropertiesToVector(
61 ::std::vector
< Property
> & rOutProperties
)
63 rOutProperties
.push_back(
64 Property( "OffsetMode",
65 PROP_PIE_TEMPLATE_OFFSET_MODE
,
66 cppu::UnoType
<chart2::PieChartOffsetMode
>::get(),
67 beans::PropertyAttribute::BOUND
68 | beans::PropertyAttribute::MAYBEDEFAULT
));
69 rOutProperties
.push_back(
70 Property( "DefaultOffset",
71 PROP_PIE_TEMPLATE_DEFAULT_OFFSET
,
72 cppu::UnoType
<double>::get(),
73 beans::PropertyAttribute::BOUND
74 | beans::PropertyAttribute::MAYBEDEFAULT
));
75 rOutProperties
.push_back(
76 Property( "Dimension",
77 PROP_PIE_TEMPLATE_DIMENSION
,
78 cppu::UnoType
<sal_Int32
>::get(),
79 beans::PropertyAttribute::BOUND
80 | beans::PropertyAttribute::MAYBEDEFAULT
));
81 rOutProperties
.push_back(
83 PROP_PIE_TEMPLATE_USE_RINGS
,
84 cppu::UnoType
<bool>::get(),
85 beans::PropertyAttribute::BOUND
86 | beans::PropertyAttribute::MAYBEDEFAULT
));
89 struct StaticPieChartTypeTemplateDefaults_Initializer
91 ::chart::tPropertyValueMap
* operator()()
93 static ::chart::tPropertyValueMap aStaticDefaults
;
94 lcl_AddDefaultsToMap( aStaticDefaults
);
95 return &aStaticDefaults
;
98 static void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap
& rOutMap
)
100 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap
, PROP_PIE_TEMPLATE_OFFSET_MODE
, chart2::PieChartOffsetMode_NONE
);
101 ::chart::PropertyHelper::setPropertyValueDefault
< double >( rOutMap
, PROP_PIE_TEMPLATE_DEFAULT_OFFSET
, 0.5 );
102 ::chart::PropertyHelper::setPropertyValueDefault
< sal_Int32
>( rOutMap
, PROP_PIE_TEMPLATE_DIMENSION
, 2 );
103 ::chart::PropertyHelper::setPropertyValueDefault( rOutMap
, PROP_PIE_TEMPLATE_USE_RINGS
, false );
107 struct StaticPieChartTypeTemplateDefaults
: public rtl::StaticAggregate
< ::chart::tPropertyValueMap
, StaticPieChartTypeTemplateDefaults_Initializer
>
111 struct StaticPieChartTypeTemplateInfoHelper_Initializer
113 ::cppu::OPropertyArrayHelper
* operator()()
115 static ::cppu::OPropertyArrayHelper
aPropHelper( lcl_GetPropertySequence() );
120 static uno::Sequence
< Property
> lcl_GetPropertySequence()
122 ::std::vector
< ::com::sun::star::beans::Property
> aProperties
;
123 lcl_AddPropertiesToVector( aProperties
);
125 ::std::sort( aProperties
.begin(), aProperties
.end(),
126 ::chart::PropertyNameLess() );
128 return ::chart::ContainerHelper::ContainerToSequence( aProperties
);
133 struct StaticPieChartTypeTemplateInfoHelper
: public rtl::StaticAggregate
< ::cppu::OPropertyArrayHelper
, StaticPieChartTypeTemplateInfoHelper_Initializer
>
137 struct StaticPieChartTypeTemplateInfo_Initializer
139 uno::Reference
< beans::XPropertySetInfo
>* operator()()
141 static uno::Reference
< beans::XPropertySetInfo
> xPropertySetInfo(
142 ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticPieChartTypeTemplateInfoHelper::get() ) );
143 return &xPropertySetInfo
;
147 struct StaticPieChartTypeTemplateInfo
: public rtl::StaticAggregate
< uno::Reference
< beans::XPropertySetInfo
>, StaticPieChartTypeTemplateInfo_Initializer
>
151 } // anonymous namespace
156 PieChartTypeTemplate::PieChartTypeTemplate(
158 uno::XComponentContext
> const & xContext
,
159 const OUString
& rServiceName
,
160 chart2::PieChartOffsetMode eMode
,
161 bool bRings
/* = false */,
162 sal_Int32 nDim
/* = 2 */ ) :
163 ChartTypeTemplate( xContext
, rServiceName
),
164 ::property::OPropertySet( m_aMutex
)
166 setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_OFFSET_MODE
, uno::makeAny( eMode
));
167 setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_DIMENSION
, uno::makeAny( nDim
));
168 setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_USE_RINGS
, uno::makeAny( bRings
));
171 PieChartTypeTemplate::~PieChartTypeTemplate()
174 // ____ OPropertySet ____
175 uno::Any
PieChartTypeTemplate::GetDefaultValue( sal_Int32 nHandle
) const
176 throw(beans::UnknownPropertyException
)
178 const tPropertyValueMap
& rStaticDefaults
= *StaticPieChartTypeTemplateDefaults::get();
179 tPropertyValueMap::const_iterator
aFound( rStaticDefaults
.find( nHandle
) );
180 if( aFound
== rStaticDefaults
.end() )
182 return (*aFound
).second
;
185 ::cppu::IPropertyArrayHelper
& SAL_CALL
PieChartTypeTemplate::getInfoHelper()
187 return *StaticPieChartTypeTemplateInfoHelper::get();
190 // ____ XPropertySet ____
191 uno::Reference
< beans::XPropertySetInfo
> SAL_CALL
PieChartTypeTemplate::getPropertySetInfo()
192 throw (uno::RuntimeException
, std::exception
)
194 return *StaticPieChartTypeTemplateInfo::get();
197 // ____ ChartTypeTemplate ____
198 sal_Int32
PieChartTypeTemplate::getDimension() const
203 // note: UNO-methods are never const
204 const_cast< PieChartTypeTemplate
* >( this )->
205 getFastPropertyValue( PROP_PIE_TEMPLATE_DIMENSION
) >>= nDim
;
207 catch( const beans::UnknownPropertyException
& ex
)
209 ASSERT_EXCEPTION( ex
);
215 sal_Int32
PieChartTypeTemplate::getAxisCountByDimension( sal_Int32
/*nDimension*/ )
220 void PieChartTypeTemplate::adaptAxes(
221 const uno::Sequence
< uno::Reference
< chart2::XCoordinateSystem
> > & /*rCoordSys*/ )
223 // hide existing axes
227 void PieChartTypeTemplate::adaptScales(
228 const Sequence
< Reference
< chart2::XCoordinateSystem
> > & aCooSysSeq
,
229 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 )
232 ChartTypeTemplate::adaptScales( aCooSysSeq
, xCategories
);
234 //remove explicit scalings from radius axis
235 //and ensure correct orientation of scales for donuts
237 for( sal_Int32 nCooSysIdx
=0; nCooSysIdx
<aCooSysSeq
.getLength(); ++nCooSysIdx
)
241 Reference
< chart2::XAxis
> xAxis( AxisHelper::getAxis( 1 /*nDimensionIndex*/,0 /*nAxisIndex*/
242 , aCooSysSeq
[nCooSysIdx
] ) );
245 chart2::ScaleData
aScaleData( xAxis
->getScaleData() );
246 AxisHelper::removeExplicitScaling( aScaleData
);
247 aScaleData
.Orientation
= chart2::AxisOrientation_MATHEMATICAL
;
248 xAxis
->setScaleData( aScaleData
);
251 xAxis
= AxisHelper::getAxis( 0 /*nDimensionIndex*/,0 /*nAxisIndex*/
252 , aCooSysSeq
[nCooSysIdx
] );
255 chart2::ScaleData
aScaleData( xAxis
->getScaleData() );
256 aScaleData
.Orientation
= chart2::AxisOrientation_REVERSE
;
257 xAxis
->setScaleData( aScaleData
);
260 catch( const uno::Exception
& ex
)
262 ASSERT_EXCEPTION( ex
);
267 void PieChartTypeTemplate::createChartTypes(
268 const Sequence
< Sequence
< Reference
< chart2::XDataSeries
> > > & aSeriesSeq
,
269 const Sequence
< Reference
< chart2::XCoordinateSystem
> > & rCoordSys
,
270 const Sequence
< Reference
< chart2::XChartType
> >& /* aOldChartTypesSeq */ )
272 if( rCoordSys
.getLength() == 0 ||
273 ! rCoordSys
[0].is() )
278 Reference
< lang::XMultiServiceFactory
> xFact(
279 GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW
);
281 Reference
< chart2::XChartType
> xCT(
282 xFact
->createInstance( CHART2_SERVICE_NAME_CHARTTYPE_PIE
), uno::UNO_QUERY_THROW
);
283 Reference
< beans::XPropertySet
> xCTProp( xCT
, uno::UNO_QUERY
);
286 xCTProp
->setPropertyValue(
287 "UseRings", getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS
));
289 Reference
< chart2::XChartTypeContainer
> xCTCnt( rCoordSys
[0], uno::UNO_QUERY_THROW
);
290 xCTCnt
->setChartTypes( Sequence
< Reference
< chart2::XChartType
> >( &xCT
, 1 ));
292 if( aSeriesSeq
.getLength() > 0 )
294 Reference
< chart2::XDataSeriesContainer
> xDSCnt( xCT
, uno::UNO_QUERY_THROW
);
295 Sequence
< Reference
< chart2::XDataSeries
> > aFlatSeriesSeq( FlattenSequence( aSeriesSeq
));
296 xDSCnt
->setDataSeries( aFlatSeriesSeq
);
298 DataSeriesHelper::setStackModeAtSeries(
299 aFlatSeriesSeq
, rCoordSys
[0], getStackMode( 0 ));
302 catch( const uno::Exception
& ex
)
304 ASSERT_EXCEPTION( ex
);
308 // ____ XChartTypeTemplate ____
309 sal_Bool SAL_CALL
PieChartTypeTemplate::matchesTemplate(
310 const uno::Reference
< chart2::XDiagram
>& xDiagram
,
311 sal_Bool bAdaptProperties
)
312 throw (uno::RuntimeException
, std::exception
)
314 bool bResult
= ChartTypeTemplate::matchesTemplate( xDiagram
, bAdaptProperties
);
316 bool bTemplateUsesRings
= false;
317 getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS
) >>= bTemplateUsesRings
;
318 chart2::PieChartOffsetMode ePieOffsetMode
;
319 getFastPropertyValue( PROP_PIE_TEMPLATE_OFFSET_MODE
) >>= ePieOffsetMode
;
327 bool bAllOffsetsEqual
= true;
329 ::std::vector
< Reference
< chart2::XDataSeries
> > aSeriesVec(
330 DiagramHelper::getDataSeriesFromDiagram( xDiagram
));
332 //check offset of outer series
333 if( !aSeriesVec
.empty() )
335 sal_Int32 nOuterSeriesIndex
= 0; //@todo in future this will depend on Orientation of the radius axis scale
336 Reference
< chart2::XDataSeries
> xSeries( aSeriesVec
[nOuterSeriesIndex
] );
337 Reference
< beans::XPropertySet
> xProp( xSeries
, uno::UNO_QUERY_THROW
);
338 xProp
->getPropertyValue( "Offset") >>= fOffset
;
340 //get AttributedDataPoints
341 uno::Sequence
< sal_Int32
> aAttributedDataPointIndexList
;
342 if( xProp
->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList
)
344 for(sal_Int32 nN
=aAttributedDataPointIndexList
.getLength();nN
--;)
346 uno::Reference
< beans::XPropertySet
> xPointProp( xSeries
->getDataPointByIndex(aAttributedDataPointIndexList
[nN
]) );
349 double fPointOffset
=0.0;
350 if( (xProp
->getPropertyValue( "Offset") >>= fPointOffset
) )
352 if( ! ::rtl::math::approxEqual( fPointOffset
, fOffset
) )
354 bAllOffsetsEqual
= false;
363 chart2::PieChartOffsetMode eOffsetMode
= chart2::PieChartOffsetMode_NONE
;
364 if( bAllOffsetsEqual
&& fOffset
> 0.0 )
366 eOffsetMode
= chart2::PieChartOffsetMode_ALL_EXPLODED
;
367 if( bAdaptProperties
)
368 setFastPropertyValue_NoBroadcast( PROP_PIE_TEMPLATE_DEFAULT_OFFSET
, uno::makeAny( fOffset
));
371 bResult
= ( eOffsetMode
== ePieOffsetMode
);
373 catch( const uno::Exception
& ex
)
375 ASSERT_EXCEPTION( ex
);
383 uno::Reference
< beans::XPropertySet
> xCTProp(
384 DiagramHelper::getChartTypeByIndex( xDiagram
, 0 ), uno::UNO_QUERY_THROW
);
385 bool bUseRings
= false;
386 if( xCTProp
->getPropertyValue( "UseRings") >>= bUseRings
)
388 bResult
= ( bTemplateUsesRings
== bUseRings
);
395 Reference
< chart2::XChartType
> PieChartTypeTemplate::getChartTypeForIndex( sal_Int32
/*nChartTypeIndex*/ )
397 Reference
< chart2::XChartType
> xResult
;
401 Reference
< lang::XMultiServiceFactory
> xFact(
402 GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW
);
403 xResult
.set( xFact
->createInstance(
404 CHART2_SERVICE_NAME_CHARTTYPE_PIE
), uno::UNO_QUERY_THROW
);
405 Reference
< beans::XPropertySet
> xCTProp( xResult
, uno::UNO_QUERY
);
408 xCTProp
->setPropertyValue(
409 "UseRings", getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS
));
413 catch( const uno::Exception
& ex
)
415 ASSERT_EXCEPTION( ex
);
421 Reference
< chart2::XChartType
> SAL_CALL
PieChartTypeTemplate::getChartTypeForNewSeries(
422 const uno::Sequence
< Reference
< chart2::XChartType
> >& aFormerlyUsedChartTypes
)
423 throw (uno::RuntimeException
, std::exception
)
425 Reference
< chart2::XChartType
> xResult
;
429 Reference
< lang::XMultiServiceFactory
> xFact(
430 GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW
);
431 xResult
.set( xFact
->createInstance(
432 CHART2_SERVICE_NAME_CHARTTYPE_PIE
), uno::UNO_QUERY_THROW
);
433 ChartTypeTemplate::copyPropertiesFromOldToNewCoordianteSystem( aFormerlyUsedChartTypes
, xResult
);
434 Reference
< beans::XPropertySet
> xCTProp( xResult
, uno::UNO_QUERY
);
437 xCTProp
->setPropertyValue(
438 "UseRings", getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS
));
442 catch( const uno::Exception
& ex
)
444 ASSERT_EXCEPTION( ex
);
450 void SAL_CALL
PieChartTypeTemplate::applyStyle(
451 const Reference
< chart2::XDataSeries
>& xSeries
,
452 ::sal_Int32 nChartTypeIndex
,
453 ::sal_Int32 nSeriesIndex
,
454 ::sal_Int32 nSeriesCount
)
455 throw (uno::RuntimeException
, std::exception
)
457 ChartTypeTemplate::applyStyle( xSeries
, nChartTypeIndex
, nSeriesIndex
, nSeriesCount
);
461 uno::Reference
< beans::XPropertySet
> xProp( xSeries
, uno::UNO_QUERY_THROW
);
463 bool bTemplateUsesRings
= false;
464 getFastPropertyValue( PROP_PIE_TEMPLATE_USE_RINGS
) >>= bTemplateUsesRings
;
465 sal_Int32 nOuterSeriesIndex
= 0; //@todo in future this will depend on Orientation of the radius axis scale
466 if( nSeriesIndex
== nOuterSeriesIndex
)
468 const OUString
aOffsetPropName( "Offset" );
470 chart2::PieChartOffsetMode ePieOffsetMode
;
471 this->getFastPropertyValue( PROP_PIE_TEMPLATE_OFFSET_MODE
) >>= ePieOffsetMode
;
473 // get default offset
474 double fDefaultOffset
= 0.5;
475 this->getFastPropertyValue( PROP_PIE_TEMPLATE_DEFAULT_OFFSET
) >>= fDefaultOffset
;
476 double fOffsetToSet
= fDefaultOffset
;
478 uno::Sequence
< sal_Int32
> aAttributedDataPointIndexList
;
479 xProp
->getPropertyValue( "AttributedDataPoints" ) >>= aAttributedDataPointIndexList
;
481 // determine whether to set the new offset
482 bool bSetOffset
= ( ePieOffsetMode
== chart2::PieChartOffsetMode_ALL_EXPLODED
);
484 (ePieOffsetMode
== chart2::PieChartOffsetMode_NONE
) )
486 // set offset to 0 if the offset was exactly "all exploded"
487 // before (individual offsets are kept)
488 double fOffset
= 0.0;
489 if( (xProp
->getPropertyValue( aOffsetPropName
) >>= fOffset
) &&
490 ::rtl::math::approxEqual( fOffset
, fDefaultOffset
))
494 for( sal_Int32 nPtIdx
=0; nPtIdx
<aAttributedDataPointIndexList
.getLength(); ++nPtIdx
)
496 uno::Reference
< beans::XPropertySet
> xPointProp(
497 xSeries
->getDataPointByIndex( aAttributedDataPointIndexList
[ nPtIdx
] ));
498 uno::Reference
< beans::XPropertyState
> xPointState( xPointProp
, uno::UNO_QUERY
);
499 double fPointOffset
= 0.0;
500 if( xPointState
.is() &&
501 (xPointState
->getPropertyState( aOffsetPropName
) == beans::PropertyState_DIRECT_VALUE
) &&
503 (xPointProp
->getPropertyValue( aOffsetPropName
) >>= fPointOffset
) &&
504 ! ::rtl::math::approxEqual( fPointOffset
, fDefaultOffset
) )
515 // set the offset to the series and to the attributed data points
516 xProp
->setPropertyValue( aOffsetPropName
, uno::makeAny( fOffsetToSet
));
518 // remove hard attributes from data points
519 for( sal_Int32 nPtIdx
=0; nPtIdx
<aAttributedDataPointIndexList
.getLength(); ++nPtIdx
)
521 uno::Reference
< beans::XPropertyState
> xPointState(
522 xSeries
->getDataPointByIndex( aAttributedDataPointIndexList
[ nPtIdx
] ), uno::UNO_QUERY
);
523 if( xPointState
.is())
524 xPointState
->setPropertyToDefault( aOffsetPropName
);
530 DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries
, "BorderStyle", uno::makeAny( drawing::LineStyle_NONE
) );
532 // vary colors by point
533 xProp
->setPropertyValue( "VaryColorsByPoint", uno::makeAny( true ));
535 catch( const uno::Exception
& ex
)
537 ASSERT_EXCEPTION( ex
);
541 void SAL_CALL
PieChartTypeTemplate::resetStyles( const Reference
< chart2::XDiagram
>& xDiagram
)
542 throw (uno::RuntimeException
, std::exception
)
544 // reset axes and grids
545 Reference
< chart2::XCoordinateSystemContainer
> xCooSysCnt( xDiagram
, uno::UNO_QUERY
);
548 Sequence
< Reference
< chart2::XCoordinateSystem
> > aCooSysSeq( xCooSysCnt
->getCoordinateSystems());
549 ChartTypeTemplate::createAxes( aCooSysSeq
);
551 //reset scale orientation
552 for( sal_Int32 nCooSysIdx
=0; nCooSysIdx
<aCooSysSeq
.getLength(); ++nCooSysIdx
)
556 Reference
< chart2::XAxis
> xAxis( AxisHelper::getAxis( 0 /*nDimensionIndex*/,0 /*nAxisIndex*/
557 , aCooSysSeq
[nCooSysIdx
] ) );
560 chart2::ScaleData
aScaleData( xAxis
->getScaleData() );
561 aScaleData
.Orientation
= chart2::AxisOrientation_MATHEMATICAL
;
562 xAxis
->setScaleData( aScaleData
);
565 xAxis
= AxisHelper::getAxis( 1, 0, aCooSysSeq
[nCooSysIdx
] );
568 chart2::ScaleData
aScaleData( xAxis
->getScaleData() );
569 aScaleData
.Orientation
= chart2::AxisOrientation_MATHEMATICAL
;
570 xAxis
->setScaleData( aScaleData
);
573 catch( const uno::Exception
& ex
)
575 ASSERT_EXCEPTION( ex
);
580 ChartTypeTemplate::resetStyles( xDiagram
);
582 // vary colors by point,
584 ::std::vector
< Reference
< chart2::XDataSeries
> > aSeriesVec(
585 DiagramHelper::getDataSeriesFromDiagram( xDiagram
));
586 uno::Any
aLineStyleAny( uno::makeAny( drawing::LineStyle_NONE
));
587 for( ::std::vector
< Reference
< chart2::XDataSeries
> >::iterator
aIt( aSeriesVec
.begin());
588 aIt
!= aSeriesVec
.end(); ++aIt
)
590 Reference
< beans::XPropertyState
> xState( *aIt
, uno::UNO_QUERY
);
593 xState
->setPropertyToDefault( "VaryColorsByPoint");
594 Reference
< beans::XPropertySet
> xProp( xState
, uno::UNO_QUERY
);
596 xProp
->getPropertyValue( "BorderStyle") == aLineStyleAny
)
598 xState
->setPropertyToDefault( "BorderStyle");
603 //reset scene properties
604 ThreeDHelper::setDefaultRotation( uno::Reference
< beans::XPropertySet
>( xDiagram
, uno::UNO_QUERY
), false );
607 // ____ XChartTypeTemplate ____
608 void PieChartTypeTemplate::adaptDiagram( const uno::Reference
< chart2::XDiagram
>& xDiagram
)
613 //different default for scene geometry:
614 ThreeDHelper::setDefaultRotation( uno::Reference
< beans::XPropertySet
>( xDiagram
, uno::UNO_QUERY
), true );
617 IMPLEMENT_FORWARD_XINTERFACE2( PieChartTypeTemplate
, ChartTypeTemplate
, OPropertySet
)
618 IMPLEMENT_FORWARD_XTYPEPROVIDER2( PieChartTypeTemplate
, ChartTypeTemplate
, OPropertySet
)
622 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */