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
commitd6fc9301e6a12c29247586e07048d5008aaffbef (patch)
tree85f1c156ae1df646f376e76143991b47cd4b62ec
parent30cb5b729cf08321428e1464f19e319da9708f34 (diff)
removes some variableScope cppcheck warnings
-rw-r--r--vcl/source/control/spinfld.cxx2
-rw-r--r--vcl/source/gdi/outdev3.cxx12
2 files changed, 7 insertions, 7 deletions
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index f9215ab90835..904c684b1fdd 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -696,7 +696,6 @@ void SpinField::ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rec
long nBottom1 = aSize.Height()/2;
long nBottom2 = aSize.Height()-1;
long nTop2 = nBottom1;
- long nTop1 = 0;
if ( !(aSize.Height() & 0x01) )
nBottom1--;
@@ -741,6 +740,7 @@ void SpinField::ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rec
}
else
{
+ long nTop1 = 0;
aSize.Width() -= CalcZoom( GetDrawPixel( pDev, rStyleSettings.GetSpinSize() ) );
rSpinUpArea = Rectangle( aSize.Width(), nTop1, rOutSz.Width()-aDropDownSize.Width()-1, nBottom1 );
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 9a3d07353fff..bf2fae97786a 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -3548,12 +3548,8 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
{
long nCurX = nStartX;
long nCurY = nStartY;
- long nDiffX = 2;
long nDiffY = nHeight-1;
long nCount = nWidth;
- long nOffY = -1;
- long nFreq;
- long i;
long nPixWidth;
long nPixHeight;
sal_Bool bDrawPixAsRect;
@@ -3593,8 +3589,11 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
}
else
{
+ long nDiffX = 2;
+ long nOffY = -1;
+ long i;
nCurY += nDiffY;
- nFreq = nCount / (nDiffX+nDiffY);
+ long nFreq = nCount / (nDiffX+nDiffY);
while ( nFreq-- )
{
for( i = nDiffY; i; --i )
@@ -4851,7 +4850,6 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
// auf mehr als Zwei Zeilen gebrochen wird...
if ( xHyph.is() )
{
- sal_Unicode cAlternateReplChar = 0;
i18n::Boundary aBoundary = xBI->getWordBoundary( aText, nBreakPos, rDefLocale, ::com::sun::star::i18n::WordType::DICTIONARY_WORD, sal_True );
// sal_uInt16 nWordStart = nBreakPos;
// sal_uInt16 nBreakPos_OLD = nBreakPos;
@@ -4923,6 +4921,8 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
DBG_ASSERT( ( nAltEnd - nAltStart ) == 1, "Alternate: Falsche Annahme!" );
+ sal_Unicode cAlternateReplChar = 0;
+
if ( nTxtEnd > nTxtStart )
cAlternateReplChar = aAlt.GetChar( nAltStart );