[Libreoffice-commits] core.git: Branch 'feature/polynomialregression' - oox/source

Markus Mohrhard markus.mohrhard at googlemail.com
Fri May 31 22:39:30 PDT 2013


 oox/source/export/chartexport.cxx |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 901a7cad5921207d66a86b0684e1399128ec84e3
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sat Jun 1 07:35:09 2013 +0200

    fix element order in OOXML export

diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 8fdcf58..ede6cec 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 ) );
         }
     }


More information about the Libreoffice-commits mailing list