summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKayo Hamid <kayo.hamid@gekkolinux.com.br>2011-03-28 12:14:03 +0100
committerNoel Power <noel.power@novell.com>2011-03-28 12:14:03 +0100
commitf4d10fee110e8387bddfbfa8f35f5f6d26c6f44f (patch)
treefd64084c4403cebc1831f4377b047e22b185d21d
parent40fe03745fc75609350cf8115134eb07f04eefa7 (diff)
removes some variableScope cppcheck warnings
-rwxr-xr-xconnectivity/workben/testmoz/mozthread.cxx2
-rwxr-xr-xxmloff/source/chart/SchXMLExport.cxx9
2 files changed, 6 insertions, 5 deletions
diff --git a/connectivity/workben/testmoz/mozthread.cxx b/connectivity/workben/testmoz/mozthread.cxx
index b05d132c1ac0..087d0640f5ba 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 d8619e9b2b61..f42026fb6d72 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();