[Libreoffice-commits] core.git: include/oox oox/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Fri Dec 29 00:34:33 UTC 2017
include/oox/export/chartexport.hxx | 2 +-
oox/source/export/chartexport.cxx | 24 ++++++++++++++++++++++--
2 files changed, 23 insertions(+), 3 deletions(-)
New commits:
commit 629cfd2c1d3a43048fdb87853fa886b19105a786
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Dec 28 01:04:27 2017 +0100
export explosion property for pie chart property, tdf#114182
Change-Id: I02b46929db1bfbff32e7b1228186079b868e7971
Reviewed-on: https://gerrit.libreoffice.org/47154
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx
index 6b1e9f8fadde..4ac5ee10bb2b 100644
--- a/include/oox/export/chartexport.hxx
+++ b/include/oox/export/chartexport.hxx
@@ -176,7 +176,7 @@ private:
void exportTextProps(const css::uno::Reference< css::beans::XPropertySet >& xPropSet);
void exportDataPoints(
const css::uno::Reference< css::beans::XPropertySet >& xSeriesProperties,
- sal_Int32 nSeriesLength );
+ sal_Int32 nSeriesLength, sal_Int32 eChartType );
void exportDataLabels( const css::uno::Reference<css::chart2::XDataSeries>& xSeries, sal_Int32 nSeriesLength, sal_Int32 eChartType );
void exportGrouping( bool isBar = false );
void exportTrendlines( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
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 ) );
More information about the Libreoffice-commits
mailing list