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

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 18 06:54:52 UTC 2021


 svx/source/svdraw/svdotext.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit ca3557bedef8dd968f6455875f574357801902c7
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Wed Aug 18 07:39:41 2021 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Aug 18 08:53:52 2021 +0200

    Simplify SdrTextObj::RecalcSnapRect
    
    Change-Id: Ieab3f3143e96af56c87720451de4194138f0463b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120590
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index d95927545e30..eefee015e866 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1115,10 +1115,7 @@ void SdrTextObj::RecalcSnapRect()
 {
     if (maGeo.nRotationAngle || maGeo.nShearAngle)
     {
-        tools::Polygon aPol(maRect);
-        if (maGeo.nShearAngle) ShearPoly(aPol,maRect.TopLeft(),maGeo.mfTanShearAngle);
-        if (maGeo.nRotationAngle) RotatePoly(aPol,maRect.TopLeft(),maGeo.mfSinRotationAngle,maGeo.mfCosRotationAngle);
-        maSnapRect=aPol.GetBoundRect();
+        maSnapRect = Rect2Poly(maRect, maGeo).GetBoundRect();
     } else {
         maSnapRect = maRect;
     }


More information about the Libreoffice-commits mailing list