[Libreoffice-commits] .: vcl/source
Noel Power
noelp at kemper.freedesktop.org
Mon Mar 28 04:17:57 PDT 2011
vcl/source/control/spinfld.cxx | 2 +-
vcl/source/gdi/outdev3.cxx | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
New commits:
commit eb5b576be4c15c6cfb8e4ec8ce8128dca3ea67dd
Author: Kayo Hamid <kayo.hamid at gekkolinux.com.br>
Date: Mon Mar 28 12:14:03 2011 +0100
removes some variableScope cppcheck warnings
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 154196d..9939e91 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 e39d0af..02febe3 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 );
More information about the Libreoffice-commits
mailing list