diff options
author | Michael Meeks <michael.meeks@suse.com> | 2012-05-31 13:01:18 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-05-31 13:09:04 +0100 |
commit | c326e8c68748b8793272018c2c5fa414613aa722 (patch) | |
tree | ad1d77af6df2c0b3bcd992172c445e7d07ebc3d8 /svtools | |
parent | dbd01385199225ff7011811b28a75e88b0d2f8c8 (diff) |
targetted revert of minor cppcheck cleanups
Change-Id: I2ec1bc3fd5dd5d38c2b3b9600265943083873515
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ruler.cxx | 6 | ||||
-rw-r--r-- | svtools/source/control/toolbarmenu.cxx | 2 | ||||
-rw-r--r-- | svtools/source/filter/igif/gifread.cxx | 4 | ||||
-rw-r--r-- | svtools/source/filter/sgvmain.cxx | 3 | ||||
-rw-r--r-- | svtools/source/filter/sgvspln.cxx | 16 | ||||
-rw-r--r-- | svtools/source/filter/sgvtext.cxx | 2 |
6 files changed, 18 insertions, 15 deletions
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 31cd5ce4d218..f7519a5fd492 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -451,10 +451,13 @@ void Ruler::ImplInvertLines( sal_Bool bErase ) void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) { + long n = 0; long nTick3 = aImplRulerUnitTab[mnUnitIndex].nTick3; long nTickCount = aImplRulerUnitTab[mnUnitIndex].nTick1; Size aPixSize = maVirDev.LogicToPixel( Size( nTick3, nTick3 ), maMapMode ); long nTickWidth; + long nX; + long nY; sal_Bool bNoTicks = sal_False; //Amelia @@ -550,9 +553,6 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter ) if ( !bNoTicks ) { - long nX; - long nY; - long n = 0; long nTick = 0; while ( ((nStart-n) >= nMin) || ((nStart+n) <= nMax) ) { diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index d09344c8c974..84b8af03cf5f 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -1017,12 +1017,12 @@ void ToolbarMenu::MouseMove( const MouseEvent& rMEvt ) void ToolbarMenu::implHighlightEntry( const MouseEvent& rMEvt, bool /*bMBDown*/ ) { + long nY = 0; long nMouseY = rMEvt.GetPosPixel().Y(); Size aOutSz = GetOutputSizePixel(); if ( ( nMouseY >= 0 ) && ( nMouseY < aOutSz.Height() ) ) { bool bHighlighted = sal_False; - long nY = 0; const int nEntryCount = mpImpl->maEntryVector.size(); int nEntry; diff --git a/svtools/source/filter/igif/gifread.cxx b/svtools/source/filter/igif/gifread.cxx index 210b940201d6..4dc675043099 100644 --- a/svtools/source/filter/igif/gifread.cxx +++ b/svtools/source/filter/igif/gifread.cxx @@ -450,7 +450,7 @@ void GIFReader::FillImages( HPBYTE pBytes, sal_uLong nCount ) { if( bInterlaced ) { - long nT1; + long nT1, nT2; // falls Interlaced, werden die Zeilen kopiert if( nLastInterCount ) @@ -488,7 +488,7 @@ void GIFReader::FillImages( HPBYTE pBytes, sal_uLong nCount ) if( nT1 >= nImageHeight ) { - long nT2 = nImageY - ( ( nImageHeight + 7 ) >> 3 ); + nT2 = nImageY - ( ( nImageHeight + 7 ) >> 3 ); nT1 = ( nT2 << 3 ) + 4; nLastInterCount = 3; diff --git a/svtools/source/filter/sgvmain.cxx b/svtools/source/filter/sgvmain.cxx index bbfda53271e3..4e8aea6bce48 100644 --- a/svtools/source/filter/sgvmain.cxx +++ b/svtools/source/filter/sgvmain.cxx @@ -766,6 +766,7 @@ void CircType::Draw(OutputDevice& rOut) void BmapType::Draw(OutputDevice& rOut) { //ifstream aInp; + unsigned char nSgfTyp; sal_uInt16 nVersion; String aStr( reinterpret_cast< char const * >(&Filename[ 1 ]), @@ -775,7 +776,7 @@ void BmapType::Draw(OutputDevice& rOut) SvStream* pInp = ::utl::UcbStreamHelper::CreateStream( aFNam.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ); if ( pInp ) { - unsigned char nSgfTyp=CheckSgfTyp( *pInp,nVersion); + nSgfTyp=CheckSgfTyp( *pInp,nVersion); switch(nSgfTyp) { case SGF_BITIMAGE: { GraphicFilter aFlt; diff --git a/svtools/source/filter/sgvspln.cxx b/svtools/source/filter/sgvspln.cxx index 175ae7246419..f4cee7c1a3de 100644 --- a/svtools/source/filter/sgvspln.cxx +++ b/svtools/source/filter/sgvspln.cxx @@ -801,6 +801,9 @@ sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n, *************************************************************************/ sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly) { + short MinKoord=-32000; // zur Vermeidung + short MaxKoord=32000; // von Ueberlaeufen + double* ax; // Koeffizienten der Polynome double* ay; double* bx; @@ -811,20 +814,19 @@ sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly) double* dy; double* tv; + double Step; // Schrittweite fuer t + double dt1,dt2,dt3; // Delta t, y, ^3 + double t; sal_Bool bEnde; // Teilpolynom zu Ende? sal_uInt16 n; // Anzahl der zu zeichnenden Teilpolynome sal_uInt16 i; // aktuelles Teilpolynom sal_Bool bOk; // noch alles ok? + sal_uInt16 PolyMax=16380;// Maximale Anzahl von Polygonpunkten + long x,y; bOk=CalcSpline(rSpln,Periodic,n,ax,ay,bx,by,cx,cy,dx,dy,tv); if (bOk) { - short MinKoord=-32000; // zur Vermeidung - short MaxKoord=32000; // von Ueberlaeufen - double Step =10; - double dt1,dt2,dt3; // Delta t, y, ^3 - double t; - sal_uInt16 PolyMax=16380;// Maximale Anzahl von Polygonpunkten - long x,y; + Step =10; rPoly.SetSize(1); rPoly.SetPoint(Point(short(ax[0]),short(ay[0])),0); // erster Punkt diff --git a/svtools/source/filter/sgvtext.cxx b/svtools/source/filter/sgvtext.cxx index 1060c482ebe1..b87ec912279f 100644 --- a/svtools/source/filter/sgvtext.cxx +++ b/svtools/source/filter/sgvtext.cxx @@ -723,6 +723,7 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A sal_uInt16& nChars, sal_uInt16 Rest, short* Line, UCHAR* cLine) { + sal_uInt16 KernDist=0; // Wert fuer Kerning sal_uInt16 ChrWidth; UCHAR c; UCHAR c1; @@ -732,7 +733,6 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A AbsEnd=(c==AbsatzEnd || c==TextEnd); if (AbsEnd==sal_False) { - sal_uInt16 KernDist=0; // Wert fuer Kerning R.OutCh=ConvertTextChar(c); // von HardTrenn nach '-', ... R.Kapt=(R.Attrib.Schnitt & TextKaptBit) !=0 && UpcasePossible(R.OutCh); if (R.Kapt) R.OutCh=Upcase(R.OutCh); |