Kaydet (Commit) b89311b9 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

coverity#735602-3 Division by zero

Change-Id: I2da9857e4d526b60b3bf50e10ab180c493fb288f
üst 2fe0d7bc
......@@ -115,9 +115,9 @@ void DragMethod_RotateDiagram::MoveSdrDrag(const Point& rPnt)
//calculate new angle
double fX = F_PI / 2.0 * (double)(rPnt.Y() - m_aStartPos.Y())
/ (double)m_aReferenceRect.GetHeight();
/ m_aReferenceRect.GetHeight() > 0 ? (double)m_aReferenceRect.GetHeight() : 1.0;
double fY = F_PI * (double)(rPnt.X() - m_aStartPos.X())
/ (double)m_aReferenceRect.GetWidth();
/ m_aReferenceRect.GetWidth() > 0 ? (double)m_aReferenceRect.GetWidth() : 1.0;
if( m_eRotationDirection != ROTATIONDIRECTION_Y )
m_fAdditionalYAngleRad = fY;
......
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