summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-05-31 13:58:40 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-05-31 14:58:05 +0100
commita49cd8632ea7e0fdfc3fbb2729ec4d15fbf25a18 (patch)
tree0e730a387e8d680333882a80ec1e58c1853d6cf5 /vcl
parent3f5762b649c43383bc4dd362d86a445205332590 (diff)
targetted cppcheck warning fix reversion
Change-Id: I44bafcc62a127f2d7c6da2952573e4128783c342
Diffstat (limited to 'vcl')
-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 5f8c8258555e..7277161be42e 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -696,6 +696,7 @@ 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--;
@@ -740,7 +741,6 @@ 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 bb44ac534979..06d04cc6fa23 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -3601,8 +3601,12 @@ 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;
@@ -3642,11 +3646,8 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY,
}
else
{
- long nDiffX = 2;
- long nOffY = -1;
- long i;
nCurY += nDiffY;
- long nFreq = nCount / (nDiffX+nDiffY);
+ nFreq = nCount / (nDiffX+nDiffY);
while ( nFreq-- )
{
for( i = nDiffY; i; --i )
@@ -4914,6 +4915,7 @@ 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;
@@ -4985,8 +4987,6 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
DBG_ASSERT( ( nAltEnd - nAltStart ) == 1, "Alternate: Falsche Annahme!" );
- sal_Unicode cAlternateReplChar = 0;
-
if ( nTxtEnd > nTxtStart )
cAlternateReplChar = aAlt.GetChar( nAltStart );