[Libreoffice-commits] .: 2 commits - svx/source

Radek Doulík rodo at kemper.freedesktop.org
Wed Jan 5 03:20:12 PST 2011


 svx/source/dialog/dialcontrol.cxx    |    4 ++++
 svx/source/dialog/hdft.cxx           |    2 +-
 svx/source/dialog/hyprlink.cxx       |    1 +
 svx/source/dialog/imapimp.hxx        |    2 +-
 svx/source/dialog/simptabl.cxx       |    7 +++----
 svx/source/dialog/svxruler.cxx       |    4 +---
 svx/source/svdraw/svdfmtf.cxx        |    1 +
 svx/source/svdraw/svdocirc.cxx       |    1 +
 svx/source/svdraw/svdoole2.cxx       |    1 +
 svx/source/toolbars/extrusionbar.cxx |    6 +++---
 10 files changed, 17 insertions(+), 12 deletions(-)

New commits:
commit b9c9c248426daba51e1c24a11333a507083b8550
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Jan 5 12:19:22 2011 +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 76dd98c..bd66b25 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<nPrivTabCount;i++)
         {
             nNewSize = static_cast< USHORT >( 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<nPrivTabCount;i++)
         {
             nNewSize = static_cast< USHORT >( 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)
commit c089f09311e87b920fb45ebe1218954438eb6402
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Wed Jan 5 12:15:24 2011 +0100

    cppcheck cleaning

diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 1ea7fb0..1984b65 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -82,6 +82,7 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport(SdrModel& rModel):
     nLineWidth(0),
     maLineJoin(basegfx::B2DLINEJOIN_NONE),
     maDash(XDASH_RECT, 0, 0, 0, 0, 0),
+    fScaleX(0.0),fScaleY(0.0),
     bFntDirty(TRUE),
     bLastObjWasPolyWithoutLine(FALSE),bNoLine(FALSE),bNoFill(FALSE),bLastObjWasLine(FALSE)
 {
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index e175402..ee5bcb0 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -387,6 +387,7 @@ public:
         nWdt(0),
         nStart(0),
         nEnd(0),
+        nWink(0),
         bRight(FALSE)
     {}
     void SetCreateParams(SdrDragStat& rStat);
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 145519c..66aaa1b 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -700,6 +700,7 @@ public:
 
     SdrOle2ObjImpl()
     : pGraphicObject( NULL )
+    , pLightClient ( NULL )
     // #107645#
     // init to start situation, loading did not fail
     , mbLoadingOLEObjectFailed( sal_False )
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index 63e5219..06296ac 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -686,10 +686,7 @@ void getExtrusionDirectionState( SdrView* pSdrView, SfxItemSet& rSet )
 
             sal_Bool	bParallel = sal_True;
             Position3D	aViewPoint( 3472, -3472, 25000 );
-            double		fOriginX = 0.50;
-            double		fOriginY = -0.50;
             double		fSkewAngle = -135;
-            double		fSkew = 50.0;
 
             pAny = aGeometryItem.GetPropertyValueByName( sExtrusion, sProjectionMode );
             sal_Int16 nProjectionMode = sal_Int16();
@@ -698,6 +695,7 @@ void getExtrusionDirectionState( SdrView* pSdrView, SfxItemSet& rSet )
 
             if( bParallel )
             {
+                double		fSkew = 50.0;
                 EnhancedCustomShapeParameterPair aSkewPropPair;
                 pAny = aGeometryItem.GetPropertyValueByName( sExtrusion, sSkew );
                 if( pAny && ( *pAny >>= aSkewPropPair ) )
@@ -712,6 +710,8 @@ void getExtrusionDirectionState( SdrView* pSdrView, SfxItemSet& rSet )
             }
             else
             {
+                double		fOriginX = 0.50;
+                double		fOriginY = -0.50;
                 pAny = aGeometryItem.GetPropertyValueByName( sExtrusion, sViewPoint );
                 if( pAny )
                     *pAny >>= aViewPoint;


More information about the Libreoffice-commits mailing list