diff options
author | David Tardon <dtardon@redhat.com> | 2014-10-14 15:21:44 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-10-14 17:56:23 +0200 |
commit | 8afab33d161ddd39a3e6094b5daa08b156ef0421 (patch) | |
tree | 4e1331f9fc65513dd6502ebd221b35e9cb3d8e9d /svx | |
parent | 091742e86aeb5287f7236f666fee48946ab4c67b (diff) |
just check if the fraction is < 0
Change-Id: I23f631898f29d8285d3da333686da8d3f28a00f8
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdocirc.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdogrp.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxtr.cxx | 4 |
6 files changed, 14 insertions, 16 deletions
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 858772c5ec14..454b73c5f432 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1583,13 +1583,11 @@ void SdrObjCustomShape::NbcResize( const Point& rRef, const boost::rational<long if ( ( xFact.numerator() != xFact.denominator() ) || ( yFact.numerator()!= yFact.denominator() ) ) { - if ( ( ( xFact.numerator() < 0 ) && ( xFact.denominator() > 0 ) ) || - ( ( xFact.numerator() > 0 ) && ( xFact.denominator() < 0 ) ) ) + if ( xFact < 0 ) { SetMirroredX( IsMirroredX() == false ); } - if ( ( ( yFact.numerator() < 0 ) && ( yFact.denominator() > 0 ) ) || - ( ( yFact.numerator() > 0 ) && ( yFact.denominator() < 0 ) ) ) + if ( yFact < 0 ) { SetMirroredY( IsMirroredY() == false ); } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index c98acb0570b6..2cd9069de14f 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1497,8 +1497,8 @@ void SdrObject::NbcMove(const Size& rSiz) void SdrObject::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) { - bool bXMirr = xFact.numerator() < 0; - bool bYMirr = yFact.numerator() < 0; + bool bXMirr = xFact < 0; + bool bYMirr = yFact < 0; if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 81a9c413a95b..2a072969f6e4 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -818,8 +818,8 @@ void SdrCircObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact SdrTextObj::NbcResize(rRef,xFact,yFact); bNoShearRota|=(aGeo.nDrehWink==0 && aGeo.nShearWink==0); if (meCircleKind!=OBJ_CIRC) { - bool bXMirr = xFact.numerator() < 0; - bool bYMirr = yFact.numerator() < 0; + bool bXMirr = xFact < 0; + bool bYMirr = yFact < 0; if (bXMirr || bYMirr) { // At bXMirr!=bYMirr we should actually swap both line ends. // That, however, is pretty bad (because of forced "hard" formatting). diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index b101d0311bff..50abaeb944a7 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -901,8 +901,8 @@ void SdrGrafObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact { SdrRectObj::NbcResize( rRef, xFact, yFact ); - bool bMirrX = xFact.numerator() < 0; - bool bMirrY = yFact.numerator() < 0; + bool bMirrX = xFact < 0; + bool bMirrY = yFact < 0; if( bMirrX != bMirrY ) bMirrored = !bMirrored; diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index dd79cc445854..a624269bd2a8 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -438,8 +438,8 @@ void SdrObjGroup::NbcMove(const Size& rSiz) void SdrObjGroup::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) { - bool bXMirr = xFact.numerator() < 0; - bool bYMirr = yFact.numerator() < 0; + bool bXMirr = xFact < 0; + bool bYMirr = yFact < 0; if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { @@ -590,8 +590,8 @@ void SdrObjGroup::Move(const Size& rSiz) void SdrObjGroup::Resize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact, bool bUnsetRelative) { if (xFact.numerator()!=xFact.denominator() || yFact.numerator()!=yFact.denominator()) { - bool bXMirr = xFact.numerator() < 0; - bool bYMirr = yFact.numerator() < 0; + bool bXMirr = xFact < 0; + bool bYMirr = yFact < 0; if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index b627d591fbed..e747b3e8bbf2 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -126,8 +126,8 @@ void SdrTextObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact long nVDist=GetTextUpperDistance()+GetTextLowerDistance(); long nTWdt0=aRect.GetWidth ()-1-nHDist; if (nTWdt0<0) nTWdt0=0; long nTHgt0=aRect.GetHeight()-1-nVDist; if (nTHgt0<0) nTHgt0=0; - bool bXMirr = xFact.numerator() < 0; - bool bYMirr = yFact.numerator() < 0; + bool bXMirr = xFact < 0; + bool bYMirr = yFact < 0; if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { |