diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2011-10-12 23:19:19 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2011-10-12 23:19:19 +0200 |
commit | e57d4e3c83addd79dd975f84bf08f83fb8001241 (patch) | |
tree | bb7ce00f2232a4d9cea1ac038422cb0ae093b6e0 | |
parent | aaa6e59711d3ba9b143d3719c78a815d96c3b1df (diff) |
Some cppcheck cleaning
-rw-r--r-- | svtools/source/contnr/svtreebx.cxx | 5 | ||||
-rw-r--r-- | svtools/source/filter/wmf/winmtf.hxx | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx index 1730d90bd66f..a1f0ca87c8f0 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 a7c0b4874bfc..6dced919f643 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 ) {} |