[Libreoffice-commits] core.git: cui/source
Caolán McNamara
caolanm at redhat.com
Sat May 12 11:33:34 UTC 2018
cui/source/tabpages/grfpage.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 2bc1758239dc3e76ef604fccf9d1c58eeba967e5
Author: Caolán McNamara <caolanm at 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 <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at 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)
More information about the Libreoffice-commits
mailing list