Kaydet (Commit) c61b2066 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#735635 Division or modulo by float zero

and

coverity#735636 Division or modulo by float zero

Change-Id: Ib9c93ea843f63d38bdb8b0e5107f48afc2bdec52
üst f075a3ad
......@@ -21,6 +21,7 @@
#include <math.h>
#include <tools/bigint.hxx>
#include <o3tl/numeric.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include "svx/xattr.hxx"
......@@ -3851,6 +3852,9 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
basegfx::fround(aRangeNewNoShearNoRotate.getMaxY()));
// continue with the old original stuff
if (!aOldRect.GetWidth() || !aOldRect.GetHeight())
throw o3tl::divide_by_zero();
double fScaleX = ( aGraphicSize.Width() - rOldCrop.GetLeft() - rOldCrop.GetRight() ) / (double)aOldRect.GetWidth();
double fScaleY = ( aGraphicSize.Height() - rOldCrop.GetTop() - rOldCrop.GetBottom() ) / (double)aOldRect.GetHeight();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment