diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-10-23 17:41:47 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-10-23 18:34:39 +0200 |
commit | 31af61ea091cc895b893c849f2130aa35792b7db (patch) | |
tree | 6c7b63c5b538034bd5d356c5a8667b7e95d59b9c /svx/source/svdraw/svdotxtr.cxx | |
parent | e92c0d6f9b7a6251e00dc55219a203a7e53c96e2 (diff) |
Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba.
Conflicts:
cui/source/tabpages/transfrm.cxx
svx/source/svdraw/svdedtv1.cxx
svx/source/svdraw/svdibrow.cxx
sw/source/filter/ww1/w1filter.cxx
tools/source/generic/rational.cxx
Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
Diffstat (limited to 'svx/source/svdraw/svdotxtr.cxx')
-rw-r--r-- | svx/source/svdraw/svdotxtr.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index b793121e846e..262012b6f758 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -50,7 +50,7 @@ void SdrTextObj::NbcSetSnapRect(const Rectangle& rRect) long nHgt0=aSR0.Bottom()-aSR0.Top(); long nWdt1=rRect.Right()-rRect.Left(); long nHgt1=rRect.Bottom()-rRect.Top(); - SdrTextObj::NbcResize(maSnapRect.TopLeft(),boost::rational<long>(nWdt1,nWdt0),boost::rational<long>(nHgt1,nHgt0)); + SdrTextObj::NbcResize(maSnapRect.TopLeft(),Fraction(nWdt1,nWdt0),Fraction(nHgt1,nHgt0)); SdrTextObj::NbcMove(Size(rRect.Left()-aSR0.Left(),rRect.Top()-aSR0.Top())); } else @@ -108,7 +108,7 @@ void SdrTextObj::NbcMove(const Size& rSiz) SetRectsDirty(true); } -void SdrTextObj::NbcResize(const Point& rRef, const boost::rational<long>& xFact, const boost::rational<long>& yFact) +void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { bool bNoShearMerk=aGeo.nShearAngle==0; bool bRota90Merk=bNoShearMerk && aGeo.nRotationAngle % 9000 ==0; @@ -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.numerator() < 0; - bool bYMirr = yFact.numerator() < 0; + bool bXMirr=(xFact.GetNumerator()<0) != (xFact.GetDenominator()<0); + bool bYMirr=(yFact.GetNumerator()<0) != (yFact.GetDenominator()<0); if (bXMirr || bYMirr) { Point aRef1(GetSnapRect().Center()); if (bXMirr) { |