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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Jan 14 13:53:12 UTC 2021


 svx/source/svdraw/svddrgmt.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3208ded46864e582f6264a96c9d4578fc58e1984
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jan 14 10:31:08 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jan 14 14:52:30 2021 +0100

    cid#1471680 help coverity see that "Division or modulo by zero" is bogus
    
    Change-Id: I3c349b2cc274de6a74cb1de71b630c4fcb64231e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109268
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index cb07133b8390..4d3453889704 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1056,7 +1056,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
         if (getSdrDragView().IsOrtho() && nSA!=9000_deg100)
             nSA=4500_deg100;
 
-        if (nSA!=0_deg100)
+        if (nSA)
         { // angle snapping
             SdrHdlKind eRef=SdrHdlKind::Ref1;
 
@@ -2126,7 +2126,7 @@ void SdrDragRotate::MoveSdrDrag(const Point& rPnt_)
     if (!getSdrDragView().IsRotateAllowed())
         nSA=9000_deg100;
 
-    if (nSA!=0_deg100)
+    if (nSA)
     { // angle snapping
         nNewAngle += nSA / 2_deg100;
         nNewAngle /= nSA;
@@ -2346,7 +2346,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
     if (bNeg)
         nNewAngle=-nNewAngle;
 
-    if (nSA!=0_deg100)
+    if (nSA)
     { // angle snapping
         nNewAngle += nSA / 2_deg100;
         nNewAngle /= nSA;


More information about the Libreoffice-commits mailing list