summaryrefslogtreecommitdiff
path: root/svx/source/engine3d/dragmt3d.cxx
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-11-04 15:33:28 +0100
committerDavid Tardon <dtardon@redhat.com>2014-11-04 19:52:46 +0100
commit5f305a053291c8382d791297af95c8523fd98638 (patch)
treee60a813615e175524ff104ff14e3579e0060a0b3 /svx/source/engine3d/dragmt3d.cxx
parent40240d33771f41310b0c7e7ba7f23a48105a0808 (diff)
coverity#735627 coverity#735628 division by zero
Change-Id: If5a1f749ffb57cd4f2f8d53094317c96a787bb33
Diffstat (limited to 'svx/source/engine3d/dragmt3d.cxx')
-rw-r--r--svx/source/engine3d/dragmt3d.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx
index ba4b9b6a2802..39dd69ffdd96 100644
--- a/svx/source/engine3d/dragmt3d.cxx
+++ b/svx/source/engine3d/dragmt3d.cxx
@@ -19,6 +19,7 @@
#include <dragmt3d.hxx>
+#include <o3tl/numeric.hxx>
#include <svx/svdpagv.hxx>
#include <svx/dialmgr.hxx>
#include <svx/svddrgmt.hxx>
@@ -345,6 +346,8 @@ void E3dDragRotate::MoveSdrDrag(const Point& rPnt)
}
else
{
+ if ((maFullBound.GetWidth() == 0) || (maFullBound.GetHeight() == 0))
+ throw o3tl::divide_by_zero();
fWAngle = 90.0 * (double)(rPnt.X() - maLastPos.X())
/ (double)maFullBound.GetWidth();
fHAngle = 90.0 * (double)(rPnt.Y() - maLastPos.Y())