diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 75ca0c608459..3b78caee9794 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -245,10 +245,11 @@ tools::Rectangle OutputDevice::ImplDevicePixelToLogic( const tools::Rectangle& r if ( !mpMapper->IsMapModeEnabled() ) { aRetval = tools::Rectangle( - rPixelRect.Left()-mpMapper->GetDeviceOriginX(), - rPixelRect.Top()-mpMapper->GetDeviceOriginY(), - rPixelRect.IsWidthEmpty() ? 0 : rPixelRect.Right()-mpMapper->GetDeviceOriginX(), - rPixelRect.IsHeightEmpty() ? 0 : rPixelRect.Bottom()-mpMapper->GetDeviceOriginY() ); + mpMapper->DeviceToWindowUnitsX(rPixelRect.Left()), + mpMapper->DeviceToWindowUnitsY(rPixelRect.Top()), + rPixelRect.IsWidthEmpty() ? 0 : mpMapper->DeviceToWindowUnitsX(rPixelRect.Right()), + rPixelRect.IsHeightEmpty() ? 0 : mpMapper->DeviceToWindowUnitsY(rPixelRect.Bottom()) + ); } else {