diff options
Diffstat (limited to 'sc/source/ui/view/printfun.cxx')
-rw-r--r-- | sc/source/ui/view/printfun.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index bb379604e695..0e2bda3c4421 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -1593,7 +1593,7 @@ void ScPrintFunc::PrintArea( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, if ( !pPrinter ) { OutputDevice* pRefDev = pDoc->GetPrinter(); // use the printer also for Preview - Fraction aPrintFrac( nZoom, 100 ); // without nManualZoom + boost::rational<long> aPrintFrac( nZoom, 100 ); // without nManualZoom // MapMode, as it would arrive at the printer: pRefDev->SetMapMode( MapMode( MAP_100TH_MM, Point(), aPrintFrac, aPrintFrac ) ); @@ -2543,13 +2543,13 @@ void ScPrintFunc::InitModes() // set MapModes from nZoom etc. long nEffZoom = nZoom * (long) nManualZoom; nScaleX = nScaleY = HMM_PER_TWIPS; // output in 1/100 mm - Fraction aZoomFract( nEffZoom,10000 ); - Fraction aHorFract = aZoomFract; + boost::rational<long> aZoomFract( nEffZoom,10000 ); + boost::rational<long> aHorFract = aZoomFract; if ( !pPrinter && !bIsRender ) // adjust scale for preview { double nFact = pDocShell->GetOutputFactor(); - aHorFract = Fraction( (long)( nEffZoom / nFact ), 10000 ); + aHorFract = boost::rational<long>( long( nEffZoom / nFact ), 10000 ); } aLogicMode = MapMode( MAP_100TH_MM, Point(), aHorFract, aZoomFract ); @@ -2557,7 +2557,7 @@ void ScPrintFunc::InitModes() // set MapModes from nZoom etc. Point aLogicOfs( -aOffset.X(), -aOffset.Y() ); aOffsetMode = MapMode( MAP_100TH_MM, aLogicOfs, aHorFract, aZoomFract ); - Point aTwipsOfs( (long) ( -aOffset.X() / nScaleX + 0.5 ), (long) ( -aOffset.Y() / nScaleY + 0.5 ) ); + Point aTwipsOfs( long( -aOffset.X() / nScaleX + 0.5 ), long( -aOffset.Y() / nScaleY + 0.5 ) ); aTwipMode = MapMode( MAP_TWIP, aTwipsOfs, aHorFract, aZoomFract ); } |