coverity#1430087 Division by zero

Change-Id: Ie29773a3f0a3fcadd633f09e6355b801945933c2
Reviewed-on: https://gerrit.libreoffice.org/54140
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2018-05-11 15:39:45 +01:00
parent ce8b63ed20
commit 2bc1758239

View File

@@ -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)