diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-12-28 01:04:27 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-12-29 01:34:08 +0100 |
commit | 629cfd2c1d3a43048fdb87853fa886b19105a786 (patch) | |
tree | f95a8b691987bf5eb80f64f91a842b02210d0327 /oox | |
parent | 367b10fb833aa854c2c52c91757c40bdd10be97d (diff) |
export explosion property for pie chart property, tdf#114182
Change-Id: I02b46929db1bfbff32e7b1228186079b868e7971
Reviewed-on: https://gerrit.libreoffice.org/47154
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index f0d639a497a3..83b96fb0f518 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1960,7 +1960,7 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType, } // export data points - exportDataPoints( uno::Reference< beans::XPropertySet >( rSeriesSeq[nSeriesIdx], uno::UNO_QUERY ), nSeriesLength ); + exportDataPoints( uno::Reference< beans::XPropertySet >( rSeriesSeq[nSeriesIdx], uno::UNO_QUERY ), nSeriesLength, eChartType ); // export data labels exportDataLabels(rSeriesSeq[nSeriesIdx], nSeriesLength, eChartType); @@ -2992,7 +2992,7 @@ void ChartExport::exportDataLabels( void ChartExport::exportDataPoints( const uno::Reference< beans::XPropertySet > & xSeriesProperties, - sal_Int32 nSeriesLength ) + sal_Int32 nSeriesLength, sal_Int32 eChartType ) { uno::Reference< chart2::XDataSeries > xSeries( xSeriesProperties, uno::UNO_QUERY ); bool bVaryColorsByPoint = false; @@ -3045,6 +3045,26 @@ void ChartExport::exportDataPoints( pFS->singleElement( FSNS( XML_c, XML_idx ), XML_val, I32S(nElement), FSEND ); + + switch (eChartType) + { + case chart::TYPEID_PIE: + case chart::TYPEID_DOUGHNUT: + { + if( xPropSet.is() && GetProperty( xPropSet, "SegmentOffset") ) + { + sal_Int32 nOffset = 0; + mAny >>= nOffset; + if (nOffset) + pFS->singleElement( FSNS( XML_c, XML_explosion ), + XML_val, I32S( nOffset ), + FSEND ); + } + break; + } + default: + break; + } exportShapeProps( xPropSet ); pFS->endElement( FSNS( XML_c, XML_dPt ) ); |