[Libreoffice-commits] core.git: svx/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 19 14:54:55 UTC 2021


 svx/source/svdraw/svdtrans.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 0bb3ccf9148106ce3e5d9e03c23ab5a9602e843c
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Aug 19 15:03:11 2021 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Aug 19 16:54:20 2021 +0200

    Revert "Simplify Rect2Poly"
    
    This reverts commit 5b025285b3528910a4360899abb2bbbaadc72c97.
    
    Reason for revert: the semantics change for empty rectangle is
    significant. See also 9343551f5588ffa4916e2c5d33cbd6fcf56ca99d.
    
    Change-Id: I5df0c07067840d39af0a187ca9a104963cdeefab
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120651
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 3908440126cf..6af3a49ea873 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -475,7 +475,12 @@ void GeoStat::RecalcTan()
 
 tools::Polygon Rect2Poly(const tools::Rectangle& rRect, const GeoStat& rGeo)
 {
-    tools::Polygon aPol(rRect);
+    tools::Polygon aPol(5);
+    aPol[0]=rRect.TopLeft();
+    aPol[1]=rRect.TopRight();
+    aPol[2]=rRect.BottomRight();
+    aPol[3]=rRect.BottomLeft();
+    aPol[4]=rRect.TopLeft();
     if (rGeo.nShearAngle) ShearPoly(aPol,rRect.TopLeft(),rGeo.mfTanShearAngle);
     if (rGeo.nRotationAngle) RotatePoly(aPol,rRect.TopLeft(),rGeo.mfSinRotationAngle,rGeo.mfCosRotationAngle);
     return aPol;


More information about the Libreoffice-commits mailing list