Kaydet (Commit) 629cfd2c authored tarafından Markus Mohrhard's avatar Markus Mohrhard

export explosion property for pie chart property, tdf#114182

Change-Id: I02b46929db1bfbff32e7b1228186079b868e7971
Reviewed-on: https://gerrit.libreoffice.org/47154Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 367b10fb
...@@ -176,7 +176,7 @@ private: ...@@ -176,7 +176,7 @@ private:
void exportTextProps(const css::uno::Reference< css::beans::XPropertySet >& xPropSet); void exportTextProps(const css::uno::Reference< css::beans::XPropertySet >& xPropSet);
void exportDataPoints( void exportDataPoints(
const css::uno::Reference< css::beans::XPropertySet >& xSeriesProperties, 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 exportDataLabels( const css::uno::Reference<css::chart2::XDataSeries>& xSeries, sal_Int32 nSeriesLength, sal_Int32 eChartType );
void exportGrouping( bool isBar = false ); void exportGrouping( bool isBar = false );
void exportTrendlines( const css::uno::Reference< css::chart2::XDataSeries >& xSeries ); void exportTrendlines( const css::uno::Reference< css::chart2::XDataSeries >& xSeries );
......
...@@ -1960,7 +1960,7 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType, ...@@ -1960,7 +1960,7 @@ void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
} }
// export data points // 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 // export data labels
exportDataLabels(rSeriesSeq[nSeriesIdx], nSeriesLength, eChartType); exportDataLabels(rSeriesSeq[nSeriesIdx], nSeriesLength, eChartType);
...@@ -2992,7 +2992,7 @@ void ChartExport::exportDataLabels( ...@@ -2992,7 +2992,7 @@ void ChartExport::exportDataLabels(
void ChartExport::exportDataPoints( void ChartExport::exportDataPoints(
const uno::Reference< beans::XPropertySet > & xSeriesProperties, const uno::Reference< beans::XPropertySet > & xSeriesProperties,
sal_Int32 nSeriesLength ) sal_Int32 nSeriesLength, sal_Int32 eChartType )
{ {
uno::Reference< chart2::XDataSeries > xSeries( xSeriesProperties, uno::UNO_QUERY ); uno::Reference< chart2::XDataSeries > xSeries( xSeriesProperties, uno::UNO_QUERY );
bool bVaryColorsByPoint = false; bool bVaryColorsByPoint = false;
...@@ -3045,6 +3045,26 @@ void ChartExport::exportDataPoints( ...@@ -3045,6 +3045,26 @@ void ChartExport::exportDataPoints(
pFS->singleElement( FSNS( XML_c, XML_idx ), pFS->singleElement( FSNS( XML_c, XML_idx ),
XML_val, I32S(nElement), XML_val, I32S(nElement),
FSEND ); 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 ); exportShapeProps( xPropSet );
pFS->endElement( FSNS( XML_c, XML_dPt ) ); pFS->endElement( FSNS( XML_c, XML_dPt ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment