cui/source/tabpages/grfpage.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 2bc1758239dc3e76ef604fccf9d1c58eeba967e5 Author: Caolán McNamara <caol...@redhat.com> Date: Fri May 11 15:39:45 2018 +0100 coverity#1430087 Division by zero Change-Id: Ie29773a3f0a3fcadd633f09e6355b801945933c2 Reviewed-on: https://gerrit.libreoffice.org/54140 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index 51a393db83a4..6b148013bb00 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits