commit 84dfdf5cb54f769cf616b213ba9fbca824b844dd Author: Julien Nabet Date: Thu Dec 30 00:50:00 2010 +0100 cppcheck cleaning in svx part 2 diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index d5d5d5c..5c23584 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -77,6 +77,8 @@ private: DialControlBmp::DialControlBmp( Window& rParent ) : VirtualDevice( rParent, 0, 0 ), mrParent( rParent ), + mnCenterX(0), + mnCenterY(0), mbEnabled( true ) { EnableRTL( FALSE ); @@ -266,6 +268,8 @@ DialControl_Impl::DialControl_Impl( Window& rParent ) : maBmpBuffered( rParent ), mpLinkField( 0 ), mnAngle( 0 ), + mnCenterX( 0 ), + mnCenterY( 0 ), mbNoRot( false ) { } diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index be81e08..089bb4d 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -385,13 +385,13 @@ void SvxHFPage::Reset( const SfxItemSet& rSet ) aCntSharedBox.SaveValue(); RangeHdl( 0 ); - USHORT nHtmlMode = 0; const SfxPoolItem* pItem = 0; SfxObjectShell* pShell; if(SFX_ITEM_SET == rSet.GetItemState(SID_HTML_MODE, FALSE, &pItem) || ( 0 != (pShell = SfxObjectShell::Current()) && 0 != (pItem = pShell->GetItem(SID_HTML_MODE)))) { + USHORT nHtmlMode = 0; nHtmlMode = ((SfxUInt16Item*)pItem)->GetValue(); if(nHtmlMode && HTMLMODE_ON) { diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx index 8fc0b57..9a6e33f 100644 --- a/svx/source/dialog/hyprlink.cxx +++ b/svx/source/dialog/hyprlink.cxx @@ -809,6 +809,7 @@ void SvxHyperlinkDlg::SetImages() HyperCombo::HyperCombo( SvxHyperlinkDlg* pDialog, const ResId& rResId ) : ComboBox( (Window *)pDialog, rResId ) { + nRatio = 0; pDlg = pDialog; nMaxWidth = GetSizePixel().Width(); diff --git a/svx/source/dialog/imapimp.hxx b/svx/source/dialog/imapimp.hxx index 4887298..51ebf40 100644 --- a/svx/source/dialog/imapimp.hxx +++ b/svx/source/dialog/imapimp.hxx @@ -50,7 +50,7 @@ public: void* pUpdateEditingObject; BOOL bExecState; - IMapOwnData( SvxIMapDlg* pIMapDlg ) : pIMap ( pIMapDlg ) {} + IMapOwnData( SvxIMapDlg* pIMapDlg ) : pIMap ( pIMapDlg ), pUpdateEditingObject( NULL ) {} }; diff --git a/svx/source/dialog/simptabl.cxx b/svx/source/dialog/simptabl.cxx index d1b37a9..30d2c42 100644 --- a/svx/source/dialog/simptabl.cxx +++ b/svx/source/dialog/simptabl.cxx @@ -226,7 +226,6 @@ void SvxSimpleTable::Paint( const Rectangle& rRect ) SvHeaderTabListBox::Paint(rRect ); USHORT nPrivTabCount = TabCount(); - USHORT nPos = 0; USHORT nNewSize = ( nPrivTabCount > 0 ) ? (USHORT)GetTab(0) : 0; long nOffset=-GetXOffset(); @@ -240,6 +239,7 @@ void SvxSimpleTable::Paint( const Rectangle& rRect ) if(nPrivTabCount>aHeaderBar.GetItemCount()) nPrivTabCount=aHeaderBar.GetItemCount(); + USHORT nPos = 0; for(USHORT i=1;i( GetTab(i) ) - nPos; @@ -442,15 +442,14 @@ void SvxSimpleTable::HBarEndDrag() { HideTracking(); USHORT nPrivTabCount=TabCount(); - USHORT nPos=0; - USHORT nNewSize=0; if(nPrivTabCount) { if(nPrivTabCount>aHeaderBar.GetItemCount()) nPrivTabCount=aHeaderBar.GetItemCount(); - //for(USHORT i=1;i<=nPrivTabCount;i++) + USHORT nPos=0; + USHORT nNewSize=0; for(USHORT i=1;i( aHeaderBar.GetItemSize(i) ) + nPos; diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 6440fc5..bc3534b 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -2186,16 +2186,14 @@ ADD_DEBUG_TEXT("lLastLMargin: ", String::CreateFromInt32(pRuler_Imp->lLastLMargi //This includes the left border when the table is not limited //to a lower frame border. int nLimit; - long lLeft; if(GetDragType()==RULER_TYPE_BORDER) { nLimit=nIdx+1; - lLeft=(pBorders[nIdx].nPos+=lDiff); + pBorders[nIdx].nPos+=lDiff; } else { nLimit=0; - lLeft=pRuler_Imp->lLastLMargin+lDiff; } //in vertical tables the left borders have to be moved if(bHorz)