Kaydet (Commit) afd1a6b5 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#4582 Floating-point-exception

Change-Id: I808022d970dc6e35839a032f4ebf024a48fadd11
üst e068d96f
......@@ -875,26 +875,30 @@ static sal_uInt32 lcl_GetRealHeight_Impl(sal_uInt32 nHeight, sal_uInt16 nProp, M
switch( eProp )
{
case MapUnit::MapRelative:
nRet *= 100;
nRet /= nProp;
break;
if (nProp)
{
nRet *= 100;
nRet /= nProp;
}
break;
case MapUnit::MapPoint:
{
short nTemp = (short)nProp;
nDiff = nTemp * 20;
if(!bCoreInTwip)
nDiff = (short)convertTwipToMm100((long)nDiff);
break;
}
break;
case MapUnit::Map100thMM:
//then the core is surely also in 1/100 mm
nDiff = (short)nProp;
break;
break;
case MapUnit::MapTwip:
// Here surely TWIP
nDiff = ((short)nProp);
break;
default: ;//prevent warning
break;
default:
break;
}
nRet = (nDiff < 0 || nRet >= static_cast<unsigned short>(nDiff))
? nRet - nDiff : 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment