From b01f94c5ae9e3bb0c5ed1660b460b117431ff7a4 Mon Sep 17 00:00:00 2001 From: Pierre-André Jacquod Date: Fri, 23 Sep 2011 16:51:29 +0200 Subject: cppcheck: scope reduction of var in vcl outdev3.cxx and deletion of a varialbe used as constant since 2002 --- vcl/source/gdi/outdev3.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'vcl') diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 24ab4b817772..b0f59cd91b04 100755 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -613,12 +613,14 @@ Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang, { if ( nFlags & DEFAULTFONT_FLAGS_ONLYONE ) { - xub_StrLen nIndex = 0; if( !pOutDev ) pOutDev = (const OutputDevice *)ImplGetSVData()->mpDefaultWin; if( !pOutDev ) + { + xub_StrLen nIndex = 0; aFont.SetName( aSearch.GetToken( 0, ';', nIndex ) ); + } else { pOutDev->ImplInitFontList(); @@ -4408,12 +4410,9 @@ void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const PolyPolygon& rPolyPoly, sal_Bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ) { - // TODO: pass nWidth as width of this mark - long nWidth = 0; - if( IsRTLEnabled() ) // --- RTL --- mirror at basex - nX = nBaseX - nWidth - (nX - nBaseX - 1); + nX = nBaseX - (nX - nBaseX - 1); nX -= mnOutOffX; nY -= mnOutOffY; -- cgit