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 /filter/source/graphicfilter/eos2met/eos2met.cxx | |
parent | Fraction: Revert "-Werror,-Wliteral-conversion (implicit conversion from doub... (diff) | |
download | core-31af61ea091cc895b893c849f2130aa35792b7db.tar.gz core-31af61ea091cc895b893c849f2130aa35792b7db.zip |
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 'filter/source/graphicfilter/eos2met/eos2met.cxx')
-rw-r--r-- | filter/source/graphicfilter/eos2met/eos2met.cxx | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx index 173d2317321c..aa64100a7841 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -2168,50 +2168,50 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) if ( pA->GetMapMode().GetMapUnit() == MAP_RELATIVE ) { MapMode aMM = pA->GetMapMode(); - boost::rational<long> aScaleX = aMM.GetScaleX(); - boost::rational<long> aScaleY = aMM.GetScaleY(); + Fraction aScaleX = aMM.GetScaleX(); + Fraction aScaleY = aMM.GetScaleY(); Point aOrigin = aPictureMapMode.GetOrigin(); BigInt aX( aOrigin.X() ); - aX *= BigInt( aScaleX.denominator() ); + aX *= BigInt( aScaleX.GetDenominator() ); if( aOrigin.X() >= 0 ) { - if( aScaleX.numerator() >= 0 ) - aX += BigInt( aScaleX.numerator()/2 ); + if( aScaleX.GetNumerator() >= 0 ) + aX += BigInt( aScaleX.GetNumerator()/2 ); else - aX -= BigInt( (aScaleX.numerator()+1)/2 ); + aX -= BigInt( (aScaleX.GetNumerator()+1)/2 ); } else { - if( aScaleX.numerator() >= 0 ) - aX -= BigInt( (aScaleX.numerator()-1)/2 ); + if( aScaleX.GetNumerator() >= 0 ) + aX -= BigInt( (aScaleX.GetNumerator()-1)/2 ); else - aX += BigInt( aScaleX.numerator()/2 ); + aX += BigInt( aScaleX.GetNumerator()/2 ); } - aX /= BigInt( aScaleX.numerator() ); + aX /= BigInt( aScaleX.GetNumerator() ); aOrigin.X() = (long) aX + aMM.GetOrigin().X(); BigInt aY( aOrigin.Y() ); - aY *= BigInt( aScaleY.denominator() ); + aY *= BigInt( aScaleY.GetDenominator() ); if( aOrigin.Y() >= 0 ) { - if( aScaleY.numerator() >= 0 ) - aY += BigInt( aScaleY.numerator()/2 ); + if( aScaleY.GetNumerator() >= 0 ) + aY += BigInt( aScaleY.GetNumerator()/2 ); else - aY -= BigInt( (aScaleY.numerator()+1)/2 ); + aY -= BigInt( (aScaleY.GetNumerator()+1)/2 ); } else { - if( aScaleY.numerator() >= 0 ) - aY -= BigInt( (aScaleY.numerator()-1)/2 ); + if( aScaleY.GetNumerator() >= 0 ) + aY -= BigInt( (aScaleY.GetNumerator()-1)/2 ); else - aY += BigInt( aScaleY.numerator()/2 ); + aY += BigInt( aScaleY.GetNumerator()/2 ); } - aY /= BigInt( aScaleY.numerator() ); + aY /= BigInt( aScaleY.GetNumerator() ); aOrigin.Y() = (long)aY + aMM.GetOrigin().Y(); aPictureMapMode.SetOrigin( aOrigin ); |