[Libreoffice-commits] core.git: vcl/inc vcl/quartz vcl/win

Herbert Dürr hdu at apache.org
Tue Dec 17 12:14:38 PST 2013


 vcl/inc/win/salgdi.h          |    2 +-
 vcl/quartz/salgdicommon.cxx   |    4 ++--
 vcl/win/source/gdi/salgdi.cxx |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 802ca8cd36c4b08c629a956a4ed774e70e6c0060
Author: Herbert Dürr <hdu at apache.org>
Date:   Tue Dec 17 15:01:25 2013 +0000

    Related: #i123840# normalize SalFrame resolution type to sal_Int32
    
    (cherry picked from commit 8a7cfd2bded9a531a034222c71ba3eda9df7d436)
    
    Conflicts:
    	vcl/aqua/source/gdi/salgdi.cxx
    	vcl/aqua/source/gdi/salprn.cxx
    	vcl/aqua/source/window/salframe.cxx
    	vcl/inc/aqua/salframe.h
    	vcl/inc/aqua/salgdi.h
    	vcl/inc/os2/salgdi.h
    	vcl/os2/source/gdi/salgdi.cxx
    	vcl/unx/generic/gdi/salgdi3.cxx
    
    Change-Id: I86f2902d765422b4b850619c72119ad4e03452d7

diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index f29fd94..13a9a64 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 a204d74..75fea3f 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 e3a660f..920648c 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 );


More information about the Libreoffice-commits mailing list