[Libreoffice-commits] .: svl/source vcl/source

Julien Nabet serval2412 at kemper.freedesktop.org
Tue Sep 13 14:01:06 PDT 2011


 svl/source/items/itemset.cxx |    3 ++-
 vcl/source/gdi/outdev3.cxx   |    3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 689bde97d1a249c679a16f084043256868cd4978
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Sep 13 23:00:56 2011 +0200

    Some cppcheck cleaning

diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 00cd003..0dba305 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -807,11 +807,12 @@ void SfxItemSet::SetRanges( const sal_uInt16 *pNewRanges )
     // create new item-array (by iterating through all new ranges)
     sal_uLong        nSize = Capacity_Impl(pNewRanges);
     SfxItemArray aNewItems = new const SfxPoolItem* [ nSize ];
-    sal_uInt16       n = 0, nNewCount = 0;
+    sal_uInt16 nNewCount = 0;
     if ( _nCount == 0 )
         memset( aNewItems, 0, nSize * sizeof( SfxPoolItem* ) );
     else
     {
+        sal_uInt16 n = 0;
         for ( const sal_uInt16 *pRange = pNewRanges; *pRange; pRange += 2 )
         {
             // iterate through all ids in the range
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index f533639..3f3e9fb 100755
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -6436,14 +6436,13 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
         XubString               aLastLine;
         ImplMultiTextLineInfo   aMultiLineInfo;
         ImplTextLineInfo*       pLineInfo;
-        long                    nMaxTextWidth;
         xub_StrLen              i;
         xub_StrLen              nLines;
         xub_StrLen              nFormatLines;
 
         if ( nTextHeight )
         {
-            nMaxTextWidth = ImplGetTextLines( aMultiLineInfo, nWidth, aStr, nStyle, _rLayout );
+            long nMaxTextWidth = ImplGetTextLines( aMultiLineInfo, nWidth, aStr, nStyle, _rLayout );
             nLines = (xub_StrLen)(nHeight/nTextHeight);
             nFormatLines = aMultiLineInfo.Count();
             if ( !nLines )


More information about the Libreoffice-commits mailing list