[Libreoffice-commits] .: 2 commits - connectivity/workben xmloff/source

Noel Power noelp at kemper.freedesktop.org
Mon Mar 28 04:17:53 PDT 2011


 connectivity/workben/testmoz/mozthread.cxx |    2 +-
 xmloff/source/chart/SchXMLExport.cxx       |    9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 960feb28de0f4cf588f428cd50b1c47ba2f8220e
Merge: 42de5a2... 006ee93...
Author: Noel Power <noel.power at novell.com>
Date:   Mon Mar 28 12:17:04 2011 +0100

    Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/libs-core

commit 42de5a24254ff03c4860688fc6c659475298b4ce
Author: Kayo Hamid <kayo.hamid at gekkolinux.com.br>
Date:   Mon Mar 28 12:14:03 2011 +0100

    removes some variableScope cppcheck warnings

diff --git a/connectivity/workben/testmoz/mozthread.cxx b/connectivity/workben/testmoz/mozthread.cxx
index 4a76ce7..521ce5d 100755
--- a/connectivity/workben/testmoz/mozthread.cxx
+++ b/connectivity/workben/testmoz/mozthread.cxx
@@ -328,10 +328,10 @@ Reference< ::com::sun::star::sdbc::XConnection> TestConnected
 
 int autoTest(Reference<XResultSet> &xRes)
 {
-    sal_Int32 nRows = 0;
     printColumns(xRes);
     if(xRes.is())
     {
+        sal_Int32 nRows = 0;
         while( xRes.is() && xRes->next())
         {
             nRows++;
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 7d74350..d0fece3 100755
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -2767,7 +2767,6 @@ void SchXMLExportHelper_Impl::exportSeries(
                     SvXMLElementExport* pSeries = NULL;
                     Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeqCnt(
                         xSource->getDataSequences());
-                    sal_Int32 nMainSequenceIndex = -1;
                     sal_Int32 nSeriesLength = 0;
                     sal_Int32 nAttachedAxis = chart::ChartAxisAssign::PRIMARY_Y;
                     sal_Bool bHasMeanValueLine = false;
@@ -2782,6 +2781,7 @@ void SchXMLExportHelper_Impl::exportSeries(
                         Reference< chart2::data::XDataSequence > xValuesSeq;
                         Reference< chart2::data::XDataSequence > xLabelSeq;
                         sal_Int32 nSeqIdx=0;
+                        sal_Int32 nMainSequenceIndex = -1;
                         for( ; nSeqIdx<aSeqCnt.getLength(); ++nSeqIdx )
                         {
                             OUString aRole;
@@ -3360,9 +3360,6 @@ void SchXMLExportHelper_Impl::exportDataPoints(
 
         ::std::list< SchXMLDataPointStruct > aDataPointList;
 
-        sal_Int32 nLastIndex = -1;
-        sal_Int32 nCurrIndex = 0;
-
         // collect elements
         if( bVaryColorsByPoint && xColorScheme.is() )
         {
@@ -3431,6 +3428,10 @@ void SchXMLExportHelper_Impl::exportDataPoints(
         }
         else
         {
+
+          sal_Int32 nLastIndex = -1;
+          sal_Int32 nCurrIndex = 0;
+
             for( nElement = 0; nElement < nSize; ++nElement )
             {
                 aPropertyStates.clear();


More information about the Libreoffice-commits mailing list