diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-04 11:23:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-05-04 12:14:56 +0200 |
commit | 97f391d4e5ed89425ca6c5ad52d159a7ce8fdee2 (patch) | |
tree | f9ac19fde17d7c25fc36e065f0b220f034ce7532 /svx | |
parent | 214e0847f5d1666b4cf23a833bb757f6bace04d0 (diff) |
loplugin:checkunusedparams in svx(part1)
Change-Id: Ie98ec3be5ece2579feca050563c5ab7776ad6a7e
Reviewed-on: https://gerrit.libreoffice.org/37227
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape3d.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/dlgctl3d.cxx | 2 | ||||
-rw-r--r-- | svx/source/engine3d/obj3d.cxx | 4 | ||||
-rw-r--r-- | svx/source/engine3d/objfac3d.cxx | 2 | ||||
-rw-r--r-- | svx/source/engine3d/scene3d.cxx | 23 | ||||
-rw-r--r-- | svx/source/engine3d/sphere3d.cxx | 2 | ||||
-rw-r--r-- | svx/source/engine3d/view3d.cxx | 5 | ||||
-rw-r--r-- | svx/source/items/customshapeitem.cxx | 18 |
8 files changed, 17 insertions, 41 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 6989760ad093..da6ad1357d8c 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -326,7 +326,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con a3DDefaultAttr.SetDefaultLatheCharacterMode( true ); a3DDefaultAttr.SetDefaultExtrudeCharacterMode( true ); - E3dScene* pScene = new E3dScene( a3DDefaultAttr ); + E3dScene* pScene = new E3dScene; bool bSceneHasObjects ( false ); bool bUseTwoFillStyles( false ); diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 4c704e318eee..258fe69f1c4a 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -97,7 +97,7 @@ void Svx3DPreviewControl::Construct() mp3DView->SetBufferedOverlayAllowed(true); // 3D Scene - mpScene = new E3dScene(mp3DView->Get3DDefaultAttributes()); + mpScene = new E3dScene; // initially create object SetObjectType(SvxPreviewObjectType::SPHERE); diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 0f5680b726b1..8267a14d9ad0 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -748,10 +748,10 @@ void E3dObject::NbcRotate(const Point& rRef, long nAngle, double sn, double cs) // take no part in the rotation of the scene. To ensure this, there is the // SetGlueReallyAbsolute(sal_True); - double fWinkelInRad = nAngle/100.0 * F_PI180; + double fAngleInRad = nAngle/100.0 * F_PI180; basegfx::B3DHomMatrix aRotateZ; - aRotateZ.rotate(0.0, 0.0, fWinkelInRad); + aRotateZ.rotate(0.0, 0.0, fAngleInRad); NbcSetTransform(aRotateZ * GetTransform()); SetRectsDirty(); // This forces a recalculation of all BoundRects diff --git a/svx/source/engine3d/objfac3d.cxx b/svx/source/engine3d/objfac3d.cxx index bf214a12b608..1e0e426f876a 100644 --- a/svx/source/engine3d/objfac3d.cxx +++ b/svx/source/engine3d/objfac3d.cxx @@ -63,7 +63,7 @@ IMPL_STATIC_LINK( E3dObjFactory, MakeObject, SdrObjCreatorParams, aParams, SdrOb // determined only after loading the members. This will result // in that the first sphere will be immediately destroyed, // although it was never used. - return new E3dSphereObj(123); + return new E3dSphereObj(E3dSphereObj::DUMMY); case E3D_EXTRUDEOBJ_ID: return new E3dExtrudeObj(); case E3D_LATHEOBJ_ID: diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index 93d005e663b9..e8d707392db1 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -177,21 +177,10 @@ E3dScene::E3dScene() bDrawOnlySelected(false) { // Set defaults - E3dDefaultAttributes aDefault; - SetDefaultAttributes(aDefault); + SetDefaultAttributes(); } -E3dScene::E3dScene(E3dDefaultAttributes& rDefault) -: E3dObject(), - aCamera(basegfx::B3DPoint(0.0, 0.0, 4.0), basegfx::B3DPoint()), - mp3DDepthRemapper(nullptr), - bDrawOnlySelected(false) -{ - // Set defaults - SetDefaultAttributes(rDefault); -} - -void E3dScene::SetDefaultAttributes(E3dDefaultAttributes& /*rDefault*/) +void E3dScene::SetDefaultAttributes() { // For WIN95/NT turn off the FP-Exceptions #if defined(_WIN32) @@ -503,7 +492,7 @@ void E3dScene::Notify(SfxBroadcaster &rBC, const SfxHint &rHint) E3dObject::Notify(rBC, rHint); } -void E3dScene::RotateScene (const Point& rRef, long /*nAngle*/, double sn, double cs) +void E3dScene::RotateScene (const Point& rRef, double sn, double cs) { Point UpperLeft, LowerRight, Center, NewCenter; @@ -605,11 +594,11 @@ void E3dScene::NbcRotate(const Point& rRef, long nAngle, double sn, double cs) // objects. So going through the entire list and rotate around the Z axis // through the enter of aOutRect's (Steiner's theorem), so RotateZ - RotateScene (rRef, nAngle, sn, cs); // Rotates the scene - double fWinkelInRad = nAngle/100.0 * F_PI180; + RotateScene (rRef, sn, cs); // Rotates the scene + double fAngleInRad = nAngle/100.0 * F_PI180; basegfx::B3DHomMatrix aRotation; - aRotation.rotate(0.0, 0.0, fWinkelInRad); + aRotation.rotate(0.0, 0.0, fAngleInRad); NbcSetTransform(aRotation * GetTransform()); SetRectsDirty(); // This forces a recalculation of all BoundRects diff --git a/svx/source/engine3d/sphere3d.cxx b/svx/source/engine3d/sphere3d.cxx index 17a776e91172..854a677b7c5a 100644 --- a/svx/source/engine3d/sphere3d.cxx +++ b/svx/source/engine3d/sphere3d.cxx @@ -67,7 +67,7 @@ E3dSphereObj::E3dSphereObj(E3dDefaultAttributes& rDefault, const basegfx::B3DPoi // of segments is not even known yet. This was until 10.02.1997 a (small) // memory leak. -E3dSphereObj::E3dSphereObj(int /*dummy*/) +E3dSphereObj::E3dSphereObj(Dummy /*dummy*/) // the parameters it needs to be able to distinguish which // constructors of the two is meant. The above is the default. { diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 8c61c239b913..deb4ffe1d24d 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -838,7 +838,7 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1 BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_LATHE)); // Create a new scene for the created 3D object - E3dScene* pScene = new E3dScene(Get3DDefaultAttributes()); + E3dScene* pScene = new E3dScene; // Determine rectangle and possibly correct it tools::Rectangle aRect = GetAllMarkedRect(); @@ -1292,7 +1292,6 @@ bool E3dView::BegDragObj(const Point& rPnt, OutputDevice* pOut, E3dScene* E3dView::SetCurrent3DObj(E3dObject* p3DObj) { DBG_ASSERT(p3DObj != nullptr, "Who puts in a NULL-pointer here"); - E3dScene* pScene = nullptr; // get transformed BoundVolume of the object basegfx::B3DRange aVolume(p3DObj->GetBoundVolume()); @@ -1302,7 +1301,7 @@ E3dScene* E3dView::SetCurrent3DObj(E3dObject* p3DObj) tools::Rectangle aRect(0,0, (long) fW, (long) fH); - pScene = new E3dScene(Get3DDefaultAttributes()); + E3dScene* pScene = new E3dScene; InitScene(pScene, fW, fH, aVolume.getMaxZ() + ((fW + fH) / 4.0)); diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx index 3bf513d2b335..9efc2c3eb01a 100644 --- a/svx/source/items/customshapeitem.cxx +++ b/svx/source/items/customshapeitem.cxx @@ -243,14 +243,6 @@ void SdrCustomShapeGeometryItem::ClearPropertyValue( const OUString& rPropName ) SdrCustomShapeGeometryItem::~SdrCustomShapeGeometryItem() { } -SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem( SvStream& /*rIn*/, sal_uInt16 nVersion ): - SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) -{ - if ( nVersion ) - { - - } -} bool SdrCustomShapeGeometryItem::operator==( const SfxPoolItem& rCmp ) const { bool bRet = SfxPoolItem::operator==( rCmp ); @@ -274,17 +266,13 @@ bool SdrCustomShapeGeometryItem::GetPresentation( return false; } -SfxPoolItem* SdrCustomShapeGeometryItem::Create( SvStream& rIn, sal_uInt16 nItemVersion ) const +SfxPoolItem* SdrCustomShapeGeometryItem::Create( SvStream& /*rIn*/, sal_uInt16 /*nItemVersion*/ ) const { - return new SdrCustomShapeGeometryItem( rIn, nItemVersion ); + return new SdrCustomShapeGeometryItem; } -SvStream& SdrCustomShapeGeometryItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) const +SvStream& SdrCustomShapeGeometryItem::Store( SvStream& rOut, sal_uInt16 /*nItemVersion*/ ) const { - if ( nItemVersion ) - { - - } return rOut; } |