diff options
Diffstat (limited to 'filter/source/graphicfilter/epict/epict.cxx')
-rw-r--r-- | filter/source/graphicfilter/epict/epict.cxx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index b0f61f328bc6..1aad8c1e22db 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -1962,48 +1962,48 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) 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 = aSrcMapMode.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(); aSrcMapMode.SetOrigin( aOrigin ); @@ -2183,7 +2183,7 @@ bool PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, F { PictWriterAttrStackMember* pAt; MapMode aMap72( MAP_INCH ); - boost::rational<long> aDPIFrac( 1, 72 ); + Fraction aDPIFrac( 1, 72 ); bStatus=true; nLastPercent=0; |