[Libreoffice-commits] core.git: xmloff/source

Julien Nabet serval2412 at yahoo.fr
Sat Dec 2 23:48:35 UTC 2017


 xmloff/source/chart/SchXMLExport.cxx |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit cc1db6f2b0ebe05ae807628778835b62df00eca2
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Dec 2 21:14:24 2017 +0100

    Replace list by vector in SchXMLExport (xmloff)
    
    Change-Id: I279c878891fccddacdc5b8154173105250f39a05
    Reviewed-on: https://gerrit.libreoffice.org/45726
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 29ef4d2a431b..0b9c79f38e32 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -48,7 +48,7 @@
 #include <rtl/math.hxx>
 #include <comphelper/extract.hxx>
 
-#include <list>
+#include <vector>
 #include <typeinfo>
 #include <algorithm>
 
@@ -3237,7 +3237,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
     if( xDiagram.is())
         xColorScheme.set( xDiagram->getDefaultColorScheme());
 
-    ::std::list< SchXMLDataPointStruct > aDataPointList;
+    ::std::vector< SchXMLDataPointStruct > aDataPointVector;
 
     sal_Int32 nLastIndex = -1;
     sal_Int32 nCurrIndex = 0;
@@ -3294,7 +3294,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
                         SchXMLDataPointStruct aPoint;
                         aPoint.maStyleName = maAutoStyleNameQueue.front();
                         maAutoStyleNameQueue.pop();
-                        aDataPointList.push_back( aPoint );
+                        aDataPointVector.push_back( aPoint );
                     }
                     else
                     {
@@ -3303,7 +3303,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
                 }
             }
         }
-        SAL_WARN_IF( bExportContent && (static_cast<sal_Int32>(aDataPointList.size()) != nSeriesLength), "xmloff.chart", "not enough data points on content export" );
+        SAL_WARN_IF( bExportContent && (static_cast<sal_Int32>(aDataPointVector.size()) != nSeriesLength), "xmloff.chart", "not enough data points on content export" );
     }
     else
     {
@@ -3321,7 +3321,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
             {
                 SchXMLDataPointStruct aPoint;
                 aPoint.mnRepeat = nCurrIndex - nLastIndex - 1;
-                aDataPointList.push_back( aPoint );
+                aDataPointVector.push_back( aPoint );
             }
 
             uno::Reference< beans::XPropertySet > xPropSet;
@@ -3355,7 +3355,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
                         aPoint.maStyleName = maAutoStyleNameQueue.front();
                         maAutoStyleNameQueue.pop();
 
-                        aDataPointList.push_back( aPoint );
+                        aDataPointVector.push_back( aPoint );
                         nLastIndex = nCurrIndex;
                     }
                     else
@@ -3368,7 +3368,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
 
             // if we get here the property states are empty
             SchXMLDataPointStruct aPoint;
-            aDataPointList.push_back( aPoint );
+            aDataPointVector.push_back( aPoint );
 
             nLastIndex = nCurrIndex;
         }
@@ -3378,7 +3378,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
         {
             SchXMLDataPointStruct aPoint;
             aPoint.mnRepeat = nRepeat;
-            aDataPointList.push_back( aPoint );
+            aDataPointVector.push_back( aPoint );
         }
     }
 
@@ -3386,7 +3386,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
         return;
 
     // write elements (merge equal ones)
-    ::std::list< SchXMLDataPointStruct >::iterator aIter = aDataPointList.begin();
+    ::std::vector< SchXMLDataPointStruct >::iterator aIter = aDataPointVector.begin();
     SchXMLDataPointStruct aPoint;
     SchXMLDataPointStruct aLastPoint;
 
@@ -3394,7 +3394,7 @@ void SchXMLExportHelper_Impl::exportDataPoints(
     // the element is counted in the first iteration
     aLastPoint.mnRepeat = 0;
 
-    for( ; aIter != aDataPointList.end(); ++aIter )
+    for( ; aIter != aDataPointVector.end(); ++aIter )
     {
         aPoint = (*aIter);
 


More information about the Libreoffice-commits mailing list