summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdtrans.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-08-18 07:35:05 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-08-18 08:26:21 +0200
commit5b025285b3528910a4360899abb2bbbaadc72c97 (patch)
treea6ef3c341024c2578c051dd5ad07c32543232015 /svx/source/svdraw/svdtrans.cxx
parent28a7fec1f6465f8bfee417d447eb2e684ffe040b (diff)
Simplify Rect2Poly
Change-Id: Ie20662c6040da8a77db8168a7aa32e001a01ae6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120589 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/source/svdraw/svdtrans.cxx')
-rw-r--r--svx/source/svdraw/svdtrans.cxx7
1 files changed, 1 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 6af3a49ea873..3908440126cf 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -475,12 +475,7 @@ void GeoStat::RecalcTan()
tools::Polygon Rect2Poly(const tools::Rectangle& rRect, const GeoStat& rGeo)
{
- tools::Polygon aPol(5);
- aPol[0]=rRect.TopLeft();
- aPol[1]=rRect.TopRight();
- aPol[2]=rRect.BottomRight();
- aPol[3]=rRect.BottomLeft();
- aPol[4]=rRect.TopLeft();
+ tools::Polygon aPol(rRect);
if (rGeo.nShearAngle) ShearPoly(aPol,rRect.TopLeft(),rGeo.mfTanShearAngle);
if (rGeo.nRotationAngle) RotatePoly(aPol,rRect.TopLeft(),rGeo.mfSinRotationAngle,rGeo.mfCosRotationAngle);
return aPol;