From 5b025285b3528910a4360899abb2bbbaadc72c97 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Wed, 18 Aug 2021 07:35:05 +0200 Subject: Simplify Rect2Poly Change-Id: Ie20662c6040da8a77db8168a7aa32e001a01ae6e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120589 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- svx/source/svdraw/svdtrans.cxx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'svx/source/svdraw/svdtrans.cxx') 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; -- cgit