summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svddrgmt.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-07 09:26:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-07 12:39:11 +0100
commit5404f75a2fa863b97bdf8432f647053f0bff726e (patch)
tree119d2cede534f5ce1173422df99a0e532d6a7a28 /svx/source/svdraw/svddrgmt.cxx
parent39efec060719bb2654ba20844ba02429371a4ffb (diff)
loplugin:collapseif in sdext..svx
Change-Id: I188d9e9b53e00acfbae3c7acd54de28f084c4b3f Reviewed-on: https://gerrit.libreoffice.org/62985 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svddrgmt.cxx')
-rw-r--r--svx/source/svdraw/svddrgmt.cxx44
1 files changed, 19 insertions, 25 deletions
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 6957043cf2f6..6d099d6efb77 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1387,21 +1387,18 @@ bool SdrDragObjOwn::EndSdrDrag(bool /*bCopy*/)
pObj->SendUserCall( SdrUserCallType::Resize, aBoundRect0 );
}
- if(bRet)
+ if(bRet && bUndo )
{
- if( bUndo )
- {
- getSdrDragView().AddUndoActions( std::move(vConnectorUndoActions) );
+ getSdrDragView().AddUndoActions( std::move(vConnectorUndoActions) );
- if ( pUndo )
- {
- getSdrDragView().AddUndo(std::move(pUndo));
- }
+ if ( pUndo )
+ {
+ getSdrDragView().AddUndo(std::move(pUndo));
+ }
- if ( pUndo2 )
- {
- getSdrDragView().AddUndo(std::move(pUndo2));
- }
+ if ( pUndo2 )
+ {
+ getSdrDragView().AddUndo(std::move(pUndo2));
}
}
@@ -3436,20 +3433,17 @@ void SdrDragDistort::MovAllPoints(basegfx::B2DPolyPolygon& rTarget)
{
SdrPageView* pPV = getSdrDragView().GetSdrPageView();
- if(pPV)
+ if(pPV && pPV->HasMarkedObjPageView())
{
- if (pPV->HasMarkedObjPageView())
- {
- basegfx::B2DPolyPolygon aDragPolygon(rTarget);
- const basegfx::B2DRange aOriginalRange(aMarkRect.Left(), aMarkRect.Top(), aMarkRect.Right(), aMarkRect.Bottom());
- const basegfx::B2DPoint aTopLeft(aDistortedRect[0].X(), aDistortedRect[0].Y());
- const basegfx::B2DPoint aTopRight(aDistortedRect[1].X(), aDistortedRect[1].Y());
- const basegfx::B2DPoint aBottomLeft(aDistortedRect[3].X(), aDistortedRect[3].Y());
- const basegfx::B2DPoint aBottomRight(aDistortedRect[2].X(), aDistortedRect[2].Y());
-
- aDragPolygon = basegfx::utils::distort(aDragPolygon, aOriginalRange, aTopLeft, aTopRight, aBottomLeft, aBottomRight);
- rTarget = aDragPolygon;
- }
+ basegfx::B2DPolyPolygon aDragPolygon(rTarget);
+ const basegfx::B2DRange aOriginalRange(aMarkRect.Left(), aMarkRect.Top(), aMarkRect.Right(), aMarkRect.Bottom());
+ const basegfx::B2DPoint aTopLeft(aDistortedRect[0].X(), aDistortedRect[0].Y());
+ const basegfx::B2DPoint aTopRight(aDistortedRect[1].X(), aDistortedRect[1].Y());
+ const basegfx::B2DPoint aBottomLeft(aDistortedRect[3].X(), aDistortedRect[3].Y());
+ const basegfx::B2DPoint aBottomRight(aDistortedRect[2].X(), aDistortedRect[2].Y());
+
+ aDragPolygon = basegfx::utils::distort(aDragPolygon, aOriginalRange, aTopLeft, aTopRight, aBottomLeft, aBottomRight);
+ rTarget = aDragPolygon;
}
}
}