diff options
author | Pierre-André Jacquod <pjacquod@alumni.ethz.ch> | 2011-09-24 17:58:01 +0200 |
---|---|---|
committer | Pierre-André Jacquod <pjacquod@alumni.ethz.ch> | 2011-09-26 22:02:43 +0200 |
commit | d04bd631731c45627caa4b7f5dc4aea2c4fa9f9e (patch) | |
tree | 86c3a9b49c4cee48a2f52bb0a72397907079848f /tools | |
parent | 764b47e8a1cf2db19b21aa5ebc8cf6492af31bc4 (diff) |
cppcheck: reduce scope of var in tools/ poly.cxx
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/generic/poly.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 419575de1048..4ba1ef0e1ad4 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -1674,11 +1674,6 @@ SvStream& operator>>( SvStream& rIStream, Polygon& rPoly ) sal_uInt16 nStart; sal_uInt16 nCurPoints; sal_uInt16 nPoints; - unsigned char bShort; - short nShortX; - short nShortY; - long nLongX; - long nLongY; // Anzahl der Punkte einlesen und Array erzeugen rIStream >> nPoints; @@ -1695,12 +1690,15 @@ SvStream& operator>>( SvStream& rIStream, Polygon& rPoly ) if ( rIStream.GetCompressMode() == COMPRESSMODE_FULL ) { i = 0; + unsigned char bShort; while ( i < nPoints ) { rIStream >> bShort >> nCurPoints; if ( bShort ) { + short nShortX; + short nShortY; for ( nStart = i; i < nStart+nCurPoints; i++ ) { rIStream >> nShortX >> nShortY; @@ -1710,6 +1708,8 @@ SvStream& operator>>( SvStream& rIStream, Polygon& rPoly ) } else { + long nLongX; + long nLongY; for ( nStart = i; i < nStart+nCurPoints; i++ ) { rIStream >> nLongX >> nLongY; @@ -1752,8 +1752,6 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly ) DBG_CHKOBJ( &rPoly, Polygon, NULL ); DBG_ASSERTWARNING( rOStream.GetVersion(), "Polygon::<< - Solar-Version not set on rOStream" ); - unsigned char bShort; - unsigned char bCurShort; sal_uInt16 nStart; sal_uInt16 i; sal_uInt16 nPoints = rPoly.GetSize(); @@ -1765,6 +1763,7 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly ) if ( rOStream.GetCompressMode() == COMPRESSMODE_FULL ) { i = 0; + unsigned char bShort; while ( i < nPoints ) { nStart = i; @@ -1777,6 +1776,7 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly ) bShort = sal_True; else bShort = sal_False; + unsigned char bCurShort; while ( i < nPoints ) { // Feststellen, welcher Typ geschrieben werden soll |