summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-06-01 07:35:09 +0200
committerTomaž Vajngerl <quikee@gmail.com>2013-07-03 21:46:41 +0200
commitf65a9efc9abadaa804d1c4e2a26a5c95bd3cd555 (patch)
treed488ea45d3cfb04ffb1497d93eff93ab226ce0cd /oox
parent94182ac76189ac2c8e8eab200cc1c4d146b03f57 (diff)
fix element order in OOXML export
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/chartexport.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 3b3fc73ddc9e..03611e8131f5 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1521,7 +1521,6 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
case chart::TYPEID_SCATTER:
{
exportMarker( );
- exportTrendlines( aSeriesSeq[nSeriesIdx] );
exportSmooth( );
break;
}
@@ -1541,6 +1540,9 @@ void ChartExport::exportSeries( Reference< chart2::XChartType > xChartType, sal_
if( eChartType != chart::TYPEID_SCATTER && eChartType != chart::TYPEID_BAR )
exportDataLabels( uno::Reference< beans::XPropertySet >( aSeriesSeq[nSeriesIdx], uno::UNO_QUERY ), nSeriesLength );
+ if( eChartType == chart::TYPEID_SCATTER )
+ exportTrendlines( aSeriesSeq[nSeriesIdx] );
+
//export error bars here
Reference< XPropertySet > xSeriesPropSet( xSource, uno::UNO_QUERY );
Reference< XPropertySet > xErrorBarYProps;
@@ -2491,6 +2493,8 @@ void ChartExport::exportTrendlines( Reference< chart2::XDataSeries > xSeries )
Reference< XPropertySet > xProperties( xRegCurve , uno::UNO_QUERY );
+ exportShapeProps( xProperties );
+
OUString aService;
Reference< lang::XServiceName > xServiceName( xProperties, UNO_QUERY );
@@ -2566,8 +2570,6 @@ void ChartExport::exportTrendlines( Reference< chart2::XDataSeries > xSeries )
XML_val, OString::number(aExtrapolateBackward).getStr(),
FSEND );
- exportShapeProps( xProperties );
-
// Equation properties
Reference< XPropertySet > xEquationProperties( xRegCurve->getEquationProperties() );
@@ -2575,10 +2577,6 @@ void ChartExport::exportTrendlines( Reference< chart2::XDataSeries > xSeries )
sal_Bool aShowEquation = false;
xEquationProperties->getPropertyValue( "ShowEquation" ) >>= aShowEquation;
- pFS->singleElement( FSNS( XML_c, XML_dispEq ),
- XML_val, aShowEquation ? "1" : "0",
- FSEND );
-
// Show R^2
sal_Bool aShowCorrelationCoefficient = false;
xEquationProperties->getPropertyValue( "ShowCorrelationCoefficient" ) >>= aShowCorrelationCoefficient;
@@ -2587,6 +2585,10 @@ void ChartExport::exportTrendlines( Reference< chart2::XDataSeries > xSeries )
XML_val, aShowCorrelationCoefficient ? "1" : "0",
FSEND );
+ pFS->singleElement( FSNS( XML_c, XML_dispEq ),
+ XML_val, aShowEquation ? "1" : "0",
+ FSEND );
+
pFS->endElement( FSNS( XML_c, XML_trendline ) );
}
}