summaryrefslogtreecommitdiffstats
path: root/vcl/source/filter/wmf/wmfwr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/filter/wmf/wmfwr.cxx')
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx42
1 files changed, 21 insertions, 21 deletions
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 95473f08f08c..fbfb5caf5d2d 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -1401,37 +1401,37 @@ void WMFWriter::WriteRecords( 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.numerator() );
+ aX += BigInt( aScaleX.GetNumerator()/2 );
+ 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.numerator() );
+ aY += BigInt( aScaleY.GetNumerator()/2 );
+ aY /= BigInt( aScaleY.GetNumerator() );
aOrigin.Y() = (long)aY + aMM.GetOrigin().Y();
aSrcMapMode.SetOrigin( aOrigin );
@@ -1740,7 +1740,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
aTargetMapMode = MapMode( MAP_INCH );
const long nUnit = pVirDev->LogicToPixel( Size( 1, 1 ), aTargetMapMode ).Width();
- const boost::rational<long> aFrac( 1, nUnit );
+ const Fraction aFrac( 1, nUnit );
aTargetMapMode.SetScaleX( aFrac );
aTargetMapMode.SetScaleY( aFrac );
@@ -1824,14 +1824,14 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
sal_uInt16 WMFWriter::CalcSaveTargetMapMode(MapMode& rMapMode,
const Size& rPrefSize)
{
- boost::rational<long> aDivFrac(2, 1);
+ Fraction aDivFrac(2, 1);
sal_uInt16 nDivisor = 1;
Size aSize = OutputDevice::LogicToLogic( rPrefSize, aSrcMapMode, rMapMode );
while( nDivisor <= 64 && (aSize.Width() > 32767 || aSize.Height() > 32767) )
{
- boost::rational<long> aFrac = rMapMode.GetScaleX();
+ Fraction aFrac = rMapMode.GetScaleX();
aFrac *= aDivFrac;
rMapMode.SetScaleX(aFrac);