summaryrefslogtreecommitdiff
path: root/sd/source/filter/eppt/epptso.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-18 11:41:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-19 09:42:23 +0200
commit21ac405d723448d4f725715d27b58015f4bb5764 (patch)
tree65e8ad6c7afcb5931fee782b767823afd24c1a5a /sd/source/filter/eppt/epptso.cxx
parent37afe1443ef35987e289d2419b78b200e6007fd5 (diff)
cid#1448229 Division or modulo by zero
Change-Id: I8d1d7415c82c7d48f8d4bdf7b86e397fce01c015 Reviewed-on: https://gerrit.libreoffice.org/75908 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/filter/eppt/epptso.cxx')
-rw-r--r--sd/source/filter/eppt/epptso.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index bcd4d1cf9711..d477bb2655c4 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1790,7 +1790,12 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
if ( nRadius >= nLength )
nRadius = 0x2a30; // 0x2a30 is PPTs maximum radius
else
- nRadius = ( 0x2a30 * nRadius ) / nLength;
+ {
+ if (nLength != 0)
+ nRadius = ( 0x2a30 * nRadius ) / nLength;
+ else
+ nRadius = 0x2a30; // 0x2a30 is PPTs maximum radius
+ }
aPropOpt.AddOpt( ESCHER_Prop_adjustValue, nRadius );
}
else