summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-10-23 17:23:52 +0200
committerJan Holesovsky <kendy@collabora.com>2014-10-23 18:34:35 +0200
commit62dc73d56920699a27ebeb75bc43a266244e9318 (patch)
tree155d8844d53876c4cc75625d893560d773e189e9 /svx
parent858c2a2977d5e4671959724ecd2a453837dadddf (diff)
Fraction: Revert "make sure the denominator is not 0"
This reverts commit a3dc4db870ac3c08c480131ed18d144e42ec18b2.
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/unoshape.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 1e90c2f2b11c..a1b6a7b3e07e 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1219,12 +1219,8 @@ void SAL_CALL SvxShape::setSize( const awt::Size& rSize )
if(mpObj->GetObjInventor() == SdrInventor && mpObj->GetObjIdentifier() == OBJ_MEASURE )
{
- boost::rational<long> aWdt;
- if (aRect.Right()-aRect.Left() > 0)
- aWdt.assign(aLocalSize.Width(),aRect.Right()-aRect.Left());
- boost::rational<long> aHgt;
- if (aRect.Bottom()-aRect.Top() > 0)
- aHgt.assign(aLocalSize.Height(),aRect.Bottom()-aRect.Top());
+ boost::rational<long> aWdt(aLocalSize.Width(),aRect.Right()-aRect.Left());
+ boost::rational<long> aHgt(aLocalSize.Height(),aRect.Bottom()-aRect.Top());
Point aPt = mpObj->GetSnapRect().TopLeft();
mpObj->Resize(aPt,aWdt,aHgt);
}