vcl/inc/osx/saldata.hxx | 4 ++-- vcl/inc/quartz/salgdi.h | 7 ++++--- vcl/osx/salframe.cxx | 2 +- vcl/osx/salprn.cxx | 2 +- vcl/quartz/salgdicommon.cxx | 4 ++-- vcl/quartz/salgdiutils.cxx | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-)
New commits: commit bfc7706b4344ec9b9b300213147f2b874ce21c21 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Nov 12 14:34:48 2020 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Sun Nov 15 17:15:23 2020 +0100 DPI values are generally represented as sal_Int32 in VCL cf. e.g. pure virtual SalGraphics::GetResolution (vcl/inc/salgdi.hxx) Change-Id: I77d54ad0a7b80cf8839b253c14ce468ac4e16c84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105748 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/vcl/inc/osx/saldata.hxx b/vcl/inc/osx/saldata.hxx index 483902ff21cf..378741a739d9 100644 --- a/vcl/inc/osx/saldata.hxx +++ b/vcl/inc/osx/saldata.hxx @@ -85,8 +85,8 @@ public: AppleRemoteMainController* mpAppleRemoteMainController; #endif NSObject* mpDockIconClickHandler; - long mnDPIX; // #i100617# read DPI only once per office life - long mnDPIY; // #i100617# read DPI only once per office life + sal_Int32 mnDPIX; // #i100617# read DPI only once per office life + sal_Int32 mnDPIY; // #i100617# read DPI only once per office life css::uno::Reference< css::uno::XInterface > mxClipboard; diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index d10ea2879559..0dbfd0065090 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -143,8 +143,8 @@ class AquaSalGraphics : public SalGraphics int mnHeight; int mnBitmapDepth; // zero unless bitmap /// device resolution of this graphics - long mnRealDPIX; - long mnRealDPIY; + sal_Int32 mnRealDPIX; + sal_Int32 mnRealDPIY; /// path representing current clip region CGMutablePathRef mxClipPath; @@ -190,7 +190,8 @@ public: bool IsBrushVisible() const { return maFillColor.IsVisible(); } void SetWindowGraphics( AquaSalFrame* pFrame ); - void SetPrinterGraphics( CGContextRef, long nRealDPIX, long nRealDPIY ); + void SetPrinterGraphics( + CGContextRef, sal_Int32 nRealDPIX, sal_Int32 nRealDPIY ); void SetVirDevGraphics(CGLayerHolder const & rLayer, CGContextRef, int nBitDepth = 0); #ifdef MACOSX void initResolution( NSWindow* ); diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx index 1ffb1b46dccd..76cd52e65541 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -1189,7 +1189,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP return aRet; } -static vcl::Font getFont( NSFont* pFont, long nDPIY, const vcl::Font& rDefault ) +static vcl::Font getFont( NSFont* pFont, sal_Int32 nDPIY, const vcl::Font& rDefault ) { vcl::Font aResult( rDefault ); if( pFont ) diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx index c0d05fde9fb5..7da42376569f 100644 --- a/vcl/osx/salprn.cxx +++ b/vcl/osx/salprn.cxx @@ -101,7 +101,7 @@ void AquaSalInfoPrinter::SetupPrinterGraphics( CGContextRef i_rContext ) const if( mpPrintInfo ) { // FIXME: get printer resolution - long nDPIX = 720, nDPIY = 720; + sal_Int32 nDPIX = 720, nDPIY = 720; NSSize aPaperSize = [mpPrintInfo paperSize]; NSRect aImageRect = [mpPrintInfo imageablePageBounds]; diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 0e1508fd9104..4b2b59459e1e 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -1353,8 +1353,8 @@ void AquaSalGraphics::initResolution(NSWindow* nsWindow) // Apple suggest to do it this way const CGDirectDisplayID nDisplayID = static_cast<CGDirectDisplayID>([pVal longValue]); const CGSize aSize = CGDisplayScreenSize( nDisplayID ); // => result is in millimeters - mnRealDPIX = static_cast<long>((CGDisplayPixelsWide( nDisplayID ) * 25.4) / aSize.width); - mnRealDPIY = static_cast<long>((CGDisplayPixelsHigh( nDisplayID ) * 25.4) / aSize.height); + mnRealDPIX = static_cast<sal_Int32>((CGDisplayPixelsWide( nDisplayID ) * 25.4) / aSize.width); + mnRealDPIY = static_cast<sal_Int32>((CGDisplayPixelsHigh( nDisplayID ) * 25.4) / aSize.height); } else { diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx index 645cfe4db765..751b14c94921 100644 --- a/vcl/quartz/salgdiutils.cxx +++ b/vcl/quartz/salgdiutils.cxx @@ -40,7 +40,7 @@ void AquaSalGraphics::SetWindowGraphics( AquaSalFrame* pFrame ) mbVirDev = false; } -void AquaSalGraphics::SetPrinterGraphics( CGContextRef xContext, long nDPIX, long nDPIY ) +void AquaSalGraphics::SetPrinterGraphics( CGContextRef xContext, sal_Int32 nDPIX, sal_Int32 nDPIY ) { mbWindow = false; mbPrinter = true; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits