diff options
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 d1a145941272..33f5f514b713 100644 --- a/filter/source/graphicfilter/eos2met/eos2met.cxx +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -2169,50 +2169,50 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF ) if ( pA->GetMapMode().GetMapUnit() == MAP_RELATIVE ) { MapMode aMM = pA->GetMapMode(); - Fraction aScaleX = aMM.GetScaleX(); - Fraction aScaleY = aMM.GetScaleY(); + boost::rational<long> aScaleX = aMM.GetScaleX(); + boost::rational<long> aScaleY = aMM.GetScaleY(); Point aOrigin = aPictureMapMode.GetOrigin(); BigInt aX( aOrigin.X() ); - aX *= BigInt( aScaleX.GetDenominator() ); + aX *= BigInt( aScaleX.denominator() ); if( aOrigin.X() >= 0 ) { - if( aScaleX.GetNumerator() >= 0 ) - aX += BigInt( aScaleX.GetNumerator()/2 ); + if( aScaleX.numerator() >= 0 ) + aX += BigInt( aScaleX.numerator()/2 ); else - aX -= BigInt( (aScaleX.GetNumerator()+1)/2 ); + aX -= BigInt( (aScaleX.numerator()+1)/2 ); } else { - if( aScaleX.GetNumerator() >= 0 ) - aX -= BigInt( (aScaleX.GetNumerator()-1)/2 ); + if( aScaleX.numerator() >= 0 ) + aX -= BigInt( (aScaleX.numerator()-1)/2 ); else - aX += BigInt( aScaleX.GetNumerator()/2 ); + aX += BigInt( aScaleX.numerator()/2 ); } - aX /= BigInt( aScaleX.GetNumerator() ); + aX /= BigInt( aScaleX.numerator() ); aOrigin.X() = (long) aX + aMM.GetOrigin().X(); BigInt aY( aOrigin.Y() ); - aY *= BigInt( aScaleY.GetDenominator() ); + aY *= BigInt( aScaleY.denominator() ); if( aOrigin.Y() >= 0 ) { - if( aScaleY.GetNumerator() >= 0 ) - aY += BigInt( aScaleY.GetNumerator()/2 ); + if( aScaleY.numerator() >= 0 ) + aY += BigInt( aScaleY.numerator()/2 ); else - aY -= BigInt( (aScaleY.GetNumerator()+1)/2 ); + aY -= BigInt( (aScaleY.numerator()+1)/2 ); } else { - if( aScaleY.GetNumerator() >= 0 ) - aY -= BigInt( (aScaleY.GetNumerator()-1)/2 ); + if( aScaleY.numerator() >= 0 ) + aY -= BigInt( (aScaleY.numerator()-1)/2 ); else - aY += BigInt( aScaleY.GetNumerator()/2 ); + aY += BigInt( aScaleY.numerator()/2 ); } - aY /= BigInt( aScaleY.GetNumerator() ); + aY /= BigInt( aScaleY.numerator() ); aOrigin.Y() = (long)aY + aMM.GetOrigin().Y(); aPictureMapMode.SetOrigin( aOrigin ); |