filter/source/msfilter/svdfppt.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 6484dcf4bfd87ab090c94196e7a0d6342b240267
Author: Caolán McNamara <caol...@redhat.com>
Date:   Sat Jan 6 15:19:00 2018 +0000

    ofz#4983 Divide-by-zero
    
    Change-Id: I2ece697efccd316900761ef327bfc060b6493b97
    Reviewed-on: https://gerrit.libreoffice.org/47501
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 8d99c712d2e8..f7e3da573eff 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3448,7 +3448,11 @@ bool PPTNumberFormatCreator::ImplGetExtNumberFormat( 
SdrPowerPointImport const &
             rNumberFormat.SetGraphicBrush( &aBrush );
             sal_uInt32 nHeight = (sal_uInt32)( (double)nFontHeight * 0.2540 * 
nBulletHeight + 0.5 );
             Size aPrefSize( aGraphic.GetPrefSize() );
-            sal_uInt32 nWidth = ( nHeight * aPrefSize.Width() ) / 
aPrefSize.Height();
+            sal_uInt32 nWidth;
+            if (aPrefSize.Height())
+                nWidth = ( nHeight * aPrefSize.Width() ) / aPrefSize.Height();
+            else
+                nWidth = 0;
             rNumberFormat.SetGraphicSize( Size( nWidth, nHeight ) );
             rNumberFormat.SetNumberingType ( SVX_NUM_BITMAP );
         }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to