diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-06 12:47:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-06 14:20:06 +0200 |
commit | bfc298d02ca6275588d5897d97ced9498a3e91aa (patch) | |
tree | 45f290e8a753a2e382b940ed7f3c43b2bac959cd /svx/source/svdraw/svdopath.cxx | |
parent | ee9cb297c583cb5a2e6ed388af31fffc79f282ca (diff) |
loplugin:flatten in svx/svdraw
Change-Id: I8379e5ebaee2090d2b4dbd05d55b55000915cd7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100233
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svdopath.cxx')
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 93b08170fcb6..f197462c76ab 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -2454,27 +2454,27 @@ void SdrPathObj::NbcSetPoint(const Point& rPnt, sal_uInt32 nHdlNum) { sal_uInt32 nPoly,nPnt; - if(PolyPolygonEditor::GetRelativePolyPoint(GetPathPoly(), nHdlNum, nPoly, nPnt)) - { - basegfx::B2DPolygon aNewPolygon(GetPathPoly().getB2DPolygon(nPoly)); - aNewPolygon.setB2DPoint(nPnt, basegfx::B2DPoint(rPnt.X(), rPnt.Y())); - maPathPolygon.setB2DPolygon(nPoly, aNewPolygon); + if(!PolyPolygonEditor::GetRelativePolyPoint(GetPathPoly(), nHdlNum, nPoly, nPnt)) + return; - if(meKind==OBJ_LINE) - { - ImpForceLineAngle(); - } - else + basegfx::B2DPolygon aNewPolygon(GetPathPoly().getB2DPolygon(nPoly)); + aNewPolygon.setB2DPoint(nPnt, basegfx::B2DPoint(rPnt.X(), rPnt.Y())); + maPathPolygon.setB2DPolygon(nPoly, aNewPolygon); + + if(meKind==OBJ_LINE) + { + ImpForceLineAngle(); + } + else + { + if(GetPathPoly().count()) { - if(GetPathPoly().count()) - { - // #i10659# for SdrTextObj, keep aRect up to date - maRect = lcl_ImpGetBoundRect(GetPathPoly()); - } + // #i10659# for SdrTextObj, keep aRect up to date + maRect = lcl_ImpGetBoundRect(GetPathPoly()); } - - SetRectsDirty(); } + + SetRectsDirty(); } sal_uInt32 SdrPathObj::NbcInsPointOld(const Point& rPos, bool bNewObj) |