diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-10-23 17:29:14 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-10-23 18:34:36 +0200 |
commit | dc90c5a3955a33e1ae5216640021866be392f2d3 (patch) | |
tree | 81ef046a964e8612c116eb1d27838a52b927767c /svx | |
parent | b66aad4084760f3f43a9db580d637b43d5e38e24 (diff) |
Fraction: Revert "just check if the fraction is < 0"
This reverts commit 8afab33d161ddd39a3e6094b5daa08b156ef0421.
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, 16 insertions, 14 deletions
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 67cc776b8d14..b54e272c79d6 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1580,11 +1580,13 @@ void SdrObjCustomShape::NbcResize( const Point& rRef, const boost::rational<long if ( ( xFact.numerator() != xFact.denominator() ) || ( yFact.numerator()!= yFact.denominator() ) ) { - if ( xFact < 0 ) + if ( ( ( xFact.numerator() < 0 ) && ( xFact.denominator() > 0 ) ) || + ( ( xFact.numerator() > 0 ) && ( xFact.denominator() < 0 ) ) ) { SetMirroredX( IsMirroredX() == false ); } - if ( yFact < 0 ) + if ( ( ( yFact.numerator() < 0 ) && ( yFact.denominator() > 0 ) ) || + ( ( yFact.numerator() > 0 ) && ( yFact.denominator() < 0 ) ) ) { SetMirroredY( IsMirroredY() == false ); } diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index e0153e397c1e..0bf13893da80 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 < 0; - bool bYMirr = yFact < 0; + bool bXMirr = xFact.numerator() < 0; + bool bYMirr = yFact.numerator() < 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 1fb1ce52eb41..1027112e114c 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.nRotationAngle==0 && aGeo.nShearAngle==0); if (meCircleKind!=OBJ_CIRC) { - bool bXMirr = xFact < 0; - bool bYMirr = yFact < 0; + bool bXMirr = xFact.numerator() < 0; + bool bYMirr = yFact.numerator() < 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 5cb5b217a20a..4a56e52910f5 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 < 0; - bool bMirrY = yFact < 0; + bool bMirrX = xFact.numerator() < 0; + bool bMirrY = yFact.numerator() < 0; if( bMirrX != bMirrY ) bMirrored = !bMirrored; diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index a624269bd2a8..dd79cc445854 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 < 0; - bool bYMirr = yFact < 0; + bool bXMirr = xFact.numerator() < 0; + bool bYMirr = yFact.numerator() < 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 < 0; - bool bYMirr = yFact < 0; + bool bXMirr = xFact.numerator() < 0; + bool bYMirr = yFact.numerator() < 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 a54cf4016645..b793121e846e 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -116,8 +116,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 < 0; - bool bYMirr = yFact < 0; + bool bXMirr = xFact.numerator() < 0; + bool bYMirr = yFact.numerator() < 0; if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { |