diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-06 15:19:00 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-06 20:53:01 +0100 |
commit | 6484dcf4bfd87ab090c94196e7a0d6342b240267 (patch) | |
tree | fd3b985b31cd6b6788efc211338b2a3a49921bc8 /filter | |
parent | 946ae499df08cc632928c5431ba914a1ae6458dd (diff) |
ofz#4983 Divide-by-zero
Change-Id: I2ece697efccd316900761ef327bfc060b6493b97
Reviewed-on: https://gerrit.libreoffice.org/47501
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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 ); } |