From 8c55f7542b1be9dc11992e0942eaabc6688bfa3c Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 29 May 2012 12:57:59 +0100 Subject: [PATCH] targetted re-work Change-Id: I64a38e22f776914605fe3903312524d8827e29a2 --- filter/source/svg/svgwriter.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 5bcbb5aeb2e6..1106eaf3474e 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -484,7 +484,7 @@ PolyPolygon& SVGActionWriter::ImplMap( const PolyPolygon& rPolyPoly, PolyPolygon for( long i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ ) { const Polygon& rPoly = rPolyPoly[ (sal_uInt16) i ]; - sal_uInt16 nSize = rPoly.GetSize(); + sal_uInt16 n = 1, nSize = rPoly.GetSize(); if( nSize > 1 ) { @@ -494,8 +494,6 @@ PolyPolygon& SVGActionWriter::ImplMap( const PolyPolygon& rPolyPoly, PolyPolygon aPathData += ::rtl::OUString::valueOf( aPolyPoint.Y() ); sal_Char nCurrentMode = 0; - sal_uInt16 n = 1; - while( n < nSize ) { aPathData += aBlank; @@ -1201,9 +1199,10 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, if( nWidth && aNormSize.Width() && ( nWidth != aNormSize.Width() ) ) { + long i; const double fFactor = (double) nWidth / aNormSize.Width(); - for( long i = 0; i < ( nLen - 1 ); i++ ) + for( i = 0; i < ( nLen - 1 ); i++ ) pDX[ i ] = FRound( pDX[ i ] * fFactor ); } else