summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/osx/salinst.cxx4
-rw-r--r--vcl/osx/salprn.cxx4
-rw-r--r--vcl/quartz/salgdiutils.cxx10
-rw-r--r--vcl/quartz/salvd.cxx4
4 files changed, 6 insertions, 16 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index f58f0e43e893..6c2ca65c3050 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -950,9 +950,7 @@ NSImage* CreateNSImage( const Image& rImage )
{
[pImage lockFocusFlipped:YES];
NSGraphicsContext* pContext = [NSGraphicsContext currentContext];
-SAL_WNODEPRECATED_DECLARATIONS_PUSH // 'graphicsPort' is deprecated: first deprecated in macOS 10.14
- CGContextRef rCGContext = static_cast<CGContextRef>([pContext graphicsPort]);
-SAL_WNODEPRECATED_DECLARATIONS_POP
+ 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 4f1981b146ec..27c6735d5c7b 100644
--- a/vcl/osx/salprn.cxx
+++ b/vcl/osx/salprn.cxx
@@ -549,9 +549,7 @@ SalGraphics* AquaSalInfoPrinter::StartPage( ImplJobSetup* i_pSetupData, bool i_b
if( i_bNewJobData && i_pSetupData )
SetPrinterData( i_pSetupData );
-SAL_WNODEPRECATED_DECLARATIONS_PUSH // 'graphicsPort' is deprecated: first deprecated in macOS 10.14
- CGContextRef rContext = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]);
-SAL_WNODEPRECATED_DECLARATIONS_POP
+ CGContextRef rContext = [[NSGraphicsContext currentContext] CGContext];
SetupPrinterGraphics( rContext );
diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx
index 2218d3e936a4..30c5755d1efd 100644
--- a/vcl/quartz/salgdiutils.cxx
+++ b/vcl/quartz/salgdiutils.cxx
@@ -124,9 +124,7 @@ bool AquaSalGraphics::CheckContext()
{
const CGSize aLayerSize = { static_cast<CGFloat>(nWidth), static_cast<CGFloat>(nHeight) };
NSGraphicsContext* pNSGContext = [NSGraphicsContext graphicsContextWithWindow: mpFrame->getNSWindow()];
-SAL_WNODEPRECATED_DECLARATIONS_PUSH // 'graphicsPort' is deprecated: first deprecated in macOS 10.14
- CGContextRef xCGContext = static_cast<CGContextRef>([pNSGContext graphicsPort]);
-SAL_WNODEPRECATED_DECLARATIONS_POP
+ CGContextRef xCGContext = [pNSGContext CGContext];
mxLayer = CGLayerCreateWithContext(xCGContext, aLayerSize, nullptr);
SAL_INFO("vcl.cg", "CGLayerCreateWithContext(" << xCGContext << "," << aLayerSize << ",NULL) = " << mxLayer);
if (mxLayer)
@@ -208,10 +206,8 @@ void AquaSalGraphics::UpdateWindow( NSRect& )
NSGraphicsContext* pContext = [NSGraphicsContext currentContext];
if( (mxLayer != nullptr) && (pContext != nullptr) )
{
-SAL_WNODEPRECATED_DECLARATIONS_PUSH // 'graphicsPort' is deprecated: first deprecated in macOS 10.14
- CGContextRef rCGContext = static_cast<CGContextRef>([pContext graphicsPort]);
-SAL_WNODEPRECATED_DECLARATIONS_POP
- SAL_INFO( "vcl.cg", "[[NSGraphicsContext currentContext] graphicsPort] = " << rCGContext );
+ CGContextRef rCGContext = [pContext CGContext];
+ SAL_INFO( "vcl.cg", "[[NSGraphicsContext currentContext] CGContext] = " << rCGContext );
CGMutablePathRef rClip = mpFrame->getClipPath();
if( rClip )
diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx
index ee1f5e61f96f..96a64ae765b5 100644
--- a/vcl/quartz/salvd.cxx
+++ b/vcl/quartz/salvd.cxx
@@ -263,9 +263,7 @@ bool AquaSalVirtualDevice::SetSize( long nDX, long nDY )
NSGraphicsContext* pNSContext = [NSGraphicsContext graphicsContextWithWindow: pNSWindow];
if( pNSContext )
{
-SAL_WNODEPRECATED_DECLARATIONS_PUSH // 'graphicsPort' is deprecated: first deprecated in macOS 10.14
- xCGContext = static_cast<CGContextRef>([pNSContext graphicsPort]);
-SAL_WNODEPRECATED_DECLARATIONS_POP
+ xCGContext = [pNSContext CGContext];
}
}
}