summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/filter/DocumentToGraphicRenderer.cxx4
-rw-r--r--svtools/source/graphic/provider.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx
index 6c95747ef09d..93b6000029e9 100644
--- a/svtools/source/filter/DocumentToGraphicRenderer.cxx
+++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx
@@ -150,8 +150,8 @@ Graphic DocumentToGraphicRenderer::renderToGraphic(
OutputDevice* pOutputDev = VCLUnoHelper::GetOutputDevice( xDevice );
pOutputDev->SetAntialiasing(pOutputDev->GetAntialiasing() | AntialiasingFlags::EnableB2dDraw);
MapMode mm = pOutputDev->GetMapMode();
- mm.SetScaleX( fScaleX );
- mm.SetScaleY( fScaleY );
+ mm.SetScaleX( Fraction(fScaleX) );
+ mm.SetScaleY( Fraction(fScaleY) );
pOutputDev->SetMapMode( mm );
aMtf.Record( pOutputDev );
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index 41e606535600..a77fbd2b5cc6 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -623,8 +623,8 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal
if ( aMtfSize.Width() && aMtfSize.Height() )
{
MapMode aNewMapMode( MapUnit::Map100thMM );
- aNewMapMode.SetScaleX( static_cast< double >( aLogicalSize.Width ) / static_cast< double >( aMtfSize.Width() ) );
- aNewMapMode.SetScaleY( static_cast< double >( aLogicalSize.Height ) / static_cast< double >( aMtfSize.Height() ) );
+ aNewMapMode.SetScaleX( Fraction( aLogicalSize.Width, aMtfSize.Width() ) );
+ aNewMapMode.SetScaleY( Fraction( aLogicalSize.Height, aMtfSize.Height() ) );
aDummyVDev->EnableOutput( false );
aDummyVDev->SetMapMode( aNewMapMode );