diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-08-14 22:41:26 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-08-14 22:42:16 +0200 |
commit | d8584f62e28369594c5d1b733e5804837a98dd85 (patch) | |
tree | dbc88e8500cc0dc783995dd3a6de52a491da1212 /vcl/source/outdev | |
parent | 32a92502fdbabe7615330e668357568cc4812e54 (diff) |
fdo#82550 LogicWidthToDeviceCoordinate missed handling of mbMap == false
Change-Id: I98902ed266ae7b2737fa9720d69a4b87cc958d51
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r-- | vcl/source/outdev/map.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
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, |