From d8584f62e28369594c5d1b733e5804837a98dd85 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Thu, 14 Aug 2014 22:41:26 +0200 Subject: fdo#82550 LogicWidthToDeviceCoordinate missed handling of mbMap == false Change-Id: I98902ed266ae7b2737fa9720d69a4b87cc958d51 --- vcl/source/outdev/map.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'vcl/source/outdev') diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx index 819f7dbfd8cb..deaddcbacc1a 100644 --- a/vcl/source/outdev/map.cxx +++ b/vcl/source/outdev/map.cxx @@ -2144,11 +2144,12 @@ long Window::ImplLogicUnitToPixelY( long nY, MapUnit eUnit ) DeviceCoordinate OutputDevice::LogicWidthToDeviceCoordinate( long nWidth ) const { + if ( !mbMap ) + return (DeviceCoordinate)nWidth; + #if VCL_FLOAT_DEVICE_PIXEL return (double)nWidth * maMapRes.mfScaleX * mnDPIX; #else - if ( !mbMap ) - return nWidth; return ImplLogicToPixel( nWidth, mnDPIX, maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX, @@ -2158,11 +2159,11 @@ DeviceCoordinate OutputDevice::LogicWidthToDeviceCoordinate( long nWidth ) const DeviceCoordinate OutputDevice::LogicHeightToDeviceCoordinate( long nHeight ) const { + if ( !mbMap ) + return (DeviceCoordinate)nHeight; #if VCL_FLOAT_DEVICE_PIXEL return (double)nHeight * maMapRes.mfScaleY * mnDPIY; #else - if ( !mbMap ) - return nHeight; return ImplLogicToPixel( nHeight, mnDPIY, maMapRes.mnMapScNumY, maMapRes.mnMapScDenomY, -- cgit