diff options
-rw-r--r-- | starmath/source/document.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 29dd3f2ef411..59b23522ffa5 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -1544,11 +1544,9 @@ void SmDocShell::Impl_Print(OutputDevice& rOutDev, const SmPrintUIOptions& rPrin case PRINT_SIZE_SCALED: if (!aSize.IsEmpty()) { - Size OutputSize(rOutDev.LogicToPixel(aOutRect.GetSize(), MapMode(SmMapUnit()))); - Size GraphicSize(rOutDev.LogicToPixel(aSize, MapMode(SmMapUnit()))); sal_uInt16 nZ - = std::min(o3tl::convert(OutputSize.Width(), 100, GraphicSize.Width()), - o3tl::convert(OutputSize.Height(), 100, GraphicSize.Height())); + = std::min(o3tl::convert(aOutRect.GetWidth(), 100, aSize.Width()), + o3tl::convert(aOutRect.GetHeight(), 100, aSize.Height())); if (nZ > MINZOOM) nZ -= 10; Fraction aFraction(std::clamp(nZ, MINZOOM, MAXZOOM), 100); @@ -1568,14 +1566,13 @@ void SmDocShell::Impl_Print(OutputDevice& rOutDev, const SmPrintUIOptions& rPrin } } - aSize = rOutDev.PixelToLogic(rOutDev.LogicToPixel(aSize, OutputMapMode), MapMode(SmMapUnit())); + aSize = OutputDevice::LogicToLogic(aSize, OutputMapMode, MapMode(SmMapUnit())); Point aPos(aOutRect.Left() + (aOutRect.GetWidth() - aSize.Width()) / 2, aOutRect.Top() + (aOutRect.GetHeight() - aSize.Height()) / 2); - aPos = rOutDev.PixelToLogic(rOutDev.LogicToPixel(aPos, MapMode(SmMapUnit())), OutputMapMode); - aOutRect - = rOutDev.PixelToLogic(rOutDev.LogicToPixel(aOutRect, MapMode(SmMapUnit())), OutputMapMode); + aPos = OutputDevice::LogicToLogic(aPos, MapMode(SmMapUnit()), OutputMapMode); + aOutRect = OutputDevice::LogicToLogic(aOutRect, MapMode(SmMapUnit()), OutputMapMode); rOutDev.SetMapMode(OutputMapMode); rOutDev.SetClipRegion(vcl::Region(aOutRect)); |