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

coverity#1430087 Division by zero

Change-Id: Ie29773a3f0a3fcadd633f09e6355b801945933c2
Reviewed-on: https://gerrit.libreoffice.org/54140Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst ce8b63ed
......@@ -489,7 +489,7 @@ IMPL_LINK( SvxGrfCropPage, CropHdl, SpinField&, rField, void )
long nLeft = lcl_GetValue( *m_pLeftMF, eUnit );
long nRight = lcl_GetValue( *m_pRightMF, eUnit );
long nWidthZoom = static_cast<long>(m_pWidthZoomMF->GetValue());
if(bZoom && ( ( ( aOrigSize.Width() - (nLeft + nRight )) * nWidthZoom )
if (bZoom && nWidthZoom != 0 && ( ( ( aOrigSize.Width() - (nLeft + nRight )) * nWidthZoom )
/ 100 >= aPageSize.Width() ) )
{
if(&rField == m_pLeftMF)
......
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