summaryrefslogtreecommitdiff
path: root/svtools/source/graphic
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-10-12 21:44:46 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-13 06:22:33 +0000
commited7361ef0bdb6bee4f47a8421221eb7824f02e38 (patch)
treeb745a27d916bb923f01857148e16485ac319f288 /svtools/source/graphic
parent239c75ed63fb31cfef9cee13d8d58c4fe9e7a906 (diff)
cppcheck:variableScope
Change-Id: I7cbd5a9e9bb5417f754d4e2445df309140fd40af Reviewed-on: https://gerrit.libreoffice.org/19329 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools/source/graphic')
-rw-r--r--svtools/source/graphic/grfmgr2.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 7bd27f5863cd..c6eae94a354b 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -328,7 +328,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
const long aBitmapWidth = rBmpEx.GetSizePixel().Width();
const long aBitmapHeight = rBmpEx.GetSizePixel().Height();
- long nX, nY, nTmpX, nTmpY, nTmpFX, nTmpFY, nTmp;
+ long nTmpX, nTmpY, nTmpFX, nTmpFY, nTmp;
double fTmp;
bool bHMirr( rAttributes.GetMirrorFlags() & BmpMirrorFlags::Horizontal );
@@ -646,12 +646,12 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
{
Scanline pLine0, pLine1, pLineW;
- for( nY = 0; nY < aTargetHeight; nY++ )
+ for( long nY = 0; nY < aTargetHeight; nY++ )
{
nSinY = pSinY[ nY ], nCosY = pCosY[ nY ];
pLineW = pWriteAccess->GetScanline( nY );
- for( nX = 0; nX < aTargetWidth; nX++ )
+ for( long nX = 0; nX < aTargetWidth; nX++ )
{
nUnRotX = ( pCosX[ nX ] - nSinY ) >> 8;
nUnRotY = ( pSinX[ nX ] + nCosY ) >> 8;
@@ -743,11 +743,11 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
const BitmapColor aTrans( pWriteAccess->GetBestMatchingColor( Color( COL_WHITE ) ) );
BitmapColor aAlphaVal( 0 );
- for( nY = 0; nY < aTargetHeight; nY++ )
+ for( long nY = 0; nY < aTargetHeight; nY++ )
{
nSinY = pSinY[ nY ], nCosY = pCosY[ nY ];
- for( nX = 0; nX < aTargetWidth; nX++ )
+ for( long nX = 0; nX < aTargetWidth; nX++ )
{
nUnRotX = ( pCosX[ nX ] - nSinY ) >> 8;
nUnRotY = ( pSinX[ nX ] + nCosY ) >> 8;
@@ -806,20 +806,20 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
aTestB = pMAcc->GetBestMatchingColor( Color( COL_BLACK ) );
// create new horizontal mapping table
- for( nX = 0UL; nX < aUnrotatedWidth; nX++ )
+ for( long nX = 0UL; nX < aUnrotatedWidth; nX++ )
pMapLX[ nX ] = FRound( (double) pMapIX[ nX ] + pMapFX[ nX ] / 1048576.0 );
// create new vertical mapping table
- for( nY = 0UL; nY < aUnrotatedHeight; nY++ )
+ for( long nY = 0UL; nY < aUnrotatedHeight; nY++ )
pMapLY[ nY ] = FRound( (double) pMapIY[ nY ] + pMapFY[ nY ] / 1048576.0 );
// do mask rotation
- for( nY = 0; nY < aTargetHeight; nY++ )
+ for( long nY = 0; nY < aTargetHeight; nY++ )
{
nSinY = pSinY[ nY ];
nCosY = pCosY[ nY ];
- for( nX = 0; nX < aTargetWidth; nX++ )
+ for( long nX = 0; nX < aTargetWidth; nX++ )
{
nUnRotX = ( pCosX[ nX ] - nSinY ) >> 8;
nUnRotY = ( pSinX[ nX ] + nCosY ) >> 8;