[Libreoffice-commits] .: svtools/source

Julien Nabet serval2412 at kemper.freedesktop.org
Wed Oct 12 14:19:47 PDT 2011


 svtools/source/contnr/svtreebx.cxx   |    5 +++--
 svtools/source/filter/wmf/winmtf.hxx |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit e57d4e3c83addd79dd975f84bf08f83fb8001241
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Oct 12 23:19:19 2011 +0200

    Some cppcheck cleaning

diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index 1730d90..a1f0ca8 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -1281,6 +1281,7 @@ void SvTreeListBox::ImplEditEntry( SvLBoxEntry* pEntry )
 
         SvLBoxString* pItem = NULL;
         sal_uInt16 nCount = pEntry->ItemCount();
+        long nTabPos, nNextTabPos = 0;
         for( sal_uInt16 i = 0 ; i < nCount ; i++ )
         {
             SvLBoxItem* pTmpItem = pEntry->GetItem( i );
@@ -1288,8 +1289,7 @@ void SvTreeListBox::ImplEditEntry( SvLBoxEntry* pEntry )
                 continue;
 
             SvLBoxTab* pTab = GetTab( pEntry, pTmpItem );
-            long nTabPos = pTab->GetPos();
-            long nNextTabPos = -1;
+            nNextTabPos = -1;
             if( i < nCount - 1 )
             {
                 SvLBoxItem* pNextItem = pEntry->GetItem( i + 1 );
@@ -1299,6 +1299,7 @@ void SvTreeListBox::ImplEditEntry( SvLBoxEntry* pEntry )
 
             if( pTab && pTab->IsEditable() )
             {
+                nTabPos = pTab->GetPos();
                 if( !bIsMouseTriggered || (nClickX > nTabPos && (nNextTabPos == -1 || nClickX < nNextTabPos ) ) )
                 {
                     pItem = static_cast<SvLBoxString*>( pTmpItem );
diff --git a/svtools/source/filter/wmf/winmtf.hxx b/svtools/source/filter/wmf/winmtf.hxx
index a7c0b48..6dced91 100644
--- a/svtools/source/filter/wmf/winmtf.hxx
+++ b/svtools/source/filter/wmf/winmtf.hxx
@@ -432,7 +432,7 @@ struct WinMtfLineStyle
         aLineColor  ( rColor ),
         bTransparent( bTrans ) {}
 
-    WinMtfLineStyle( const Color& rColor, const LineInfo rStyle, sal_Bool bTrans = sal_False ) :
+    WinMtfLineStyle( const Color& rColor, const LineInfo& rStyle, sal_Bool bTrans = sal_False ) :
         aLineColor  ( rColor ),
         aLineInfo   ( rStyle ),
         bTransparent( bTrans ) {}


More information about the Libreoffice-commits mailing list