diff options
-rw-r--r-- | vcl/osx/salinst.cxx | 2 | ||||
-rw-r--r-- | vcl/osx/salprn.cxx | 2 | ||||
-rw-r--r-- | vcl/quartz/salgdiutils.cxx | 4 | ||||
-rw-r--r-- | vcl/quartz/salvd.cxx | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 426aa2972ec6..46a52bd9b213 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -953,7 +953,7 @@ NSImage* CreateNSImage( const Image& rImage ) { [pImage lockFocusFlipped:YES]; NSGraphicsContext* pContext = [NSGraphicsContext currentContext]; - CGContextRef rCGContext = static_cast<CGContextRef>([pContext graphicsPort]); + CGContextRef rCGContext = [pContext CGContext]; const CGRect aDstRect = { {0, 0}, { static_cast<CGFloat>(aSize.Width()), static_cast<CGFloat>(aSize.Height()) } }; CGContextDrawImage( rCGContext, aDstRect, xImage ); diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx index 7fdd072e836f..34f8cbb60e26 100644 --- a/vcl/osx/salprn.cxx +++ b/vcl/osx/salprn.cxx @@ -547,7 +547,7 @@ SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, bool i_b if( i_bNewJobData && i_pSetupData ) SetPrinterData( i_pSetupData ); - CGContextRef rContext = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]); + CGContextRef rContext = [[NSGraphicsContext currentContext] CGContext]; SetupPrinterGraphics( rContext ); diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx index 7e0562b0fed2..22a2ad041f65 100644 --- a/vcl/quartz/salgdiutils.cxx +++ b/vcl/quartz/salgdiutils.cxx @@ -118,7 +118,7 @@ bool AquaSalGraphics::CheckContext() { const CGSize aLayerSize = { static_cast<CGFloat>(nWidth), static_cast<CGFloat>(nHeight) }; NSGraphicsContext* pNSGContext = [NSGraphicsContext graphicsContextWithWindow: mpFrame->getNSWindow()]; - CGContextRef xCGContext = static_cast<CGContextRef>([pNSGContext graphicsPort]); + CGContextRef xCGContext = [pNSGContext CGContext]; mxLayer = CGLayerCreateWithContext( xCGContext, aLayerSize, nullptr ); SAL_INFO( "vcl.cg", "CGLayerCreateWithContext(" << xCGContext << "," << aLayerSize << ",NULL) = " << mxLayer ); if( mxLayer ) @@ -192,7 +192,7 @@ void AquaSalGraphics::UpdateWindow( NSRect& ) NSGraphicsContext* pContext = [NSGraphicsContext currentContext]; if( (mxLayer != nullptr) && (pContext != nullptr) ) { - CGContextRef rCGContext = static_cast<CGContextRef>([pContext graphicsPort]); + CGContextRef rCGContext = [pContext CGContext]; SAL_INFO( "vcl.cg", "[[NSGraphicsContext currentContext] graphicsPort] = " << rCGContext ); CGMutablePathRef rClip = mpFrame->getClipPath(); diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx index 4f7c41acc38e..7b3c68155ffe 100644 --- a/vcl/quartz/salvd.cxx +++ b/vcl/quartz/salvd.cxx @@ -270,7 +270,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY ) NSGraphicsContext* pNSContext = [NSGraphicsContext graphicsContextWithWindow: pNSWindow]; if( pNSContext ) { - xCGContext = static_cast<CGContextRef>([pNSContext graphicsPort]); + xCGContext = [pNSContext CGContext]; } } else |