diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/win/salgdi.h | 2 | ||||
-rw-r--r-- | vcl/quartz/salgdicommon.cxx | 4 | ||||
-rw-r--r-- | vcl/win/source/gdi/salgdi.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index f29fd94b0ea0..13a9a6433e7c 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -277,7 +277,7 @@ public: // public SalGraphics methods, the interface to the independent vcl part // get device resolution - virtual void GetResolution( long& rDPIX, long& rDPIY ); + virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ); // get the depth of the device virtual sal_uInt16 GetBitCount() const; // get the width of the device diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index a204d7426cd6..75fea3f9738e 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -1229,8 +1229,8 @@ void AquaSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) initResolution( (mbWindow && mpFrame) ? mpFrame->getNSWindow() : nil ); } - rDPIX = static_cast<sal_Int32>(mfFakeDPIScale * mnRealDPIX); - rDPIY = static_cast<sal_Int32>(mfFakeDPIScale * mnRealDPIY); + rDPIX = lrint( mfFakeDPIScale * mnRealDPIX); + rDPIY = lrint( mfFakeDPIScale * mnRealDPIY); } #endif diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx index e3a660f3f7b1..920648c6502b 100644 --- a/vcl/win/source/gdi/salgdi.cxx +++ b/vcl/win/source/gdi/salgdi.cxx @@ -778,7 +778,7 @@ WinSalGraphics::~WinSalGraphics() // ----------------------------------------------------------------------- -void WinSalGraphics::GetResolution( long& rDPIX, long& rDPIY ) +void WinSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) { rDPIX = GetDeviceCaps( getHDC(), LOGPIXELSX ); rDPIY = GetDeviceCaps( getHDC(), LOGPIXELSY ); |