summaryrefslogtreecommitdiff
path: root/vcl/osx/salprn.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-12-11 20:12:18 +0200
committerTor Lillqvist <tml@collabora.com>2018-12-11 20:34:28 +0200
commit311490855235a85bceb05e6009d3c37f79b3bc2a (patch)
tree0836015062f4b3b225e5248fbac2d2297cf0c176 /vcl/osx/salprn.cxx
parente760ee23a41e7ca64b8a38866d3eb231ad854ec1 (diff)
Do as the docs say: Use the CGContext property instead of graphicsPort
The graphicsPort property of NSGraphicsContext is deprecated in 10.14. CGContext is there since 10.10 so we can use it unconditionally. But sadly this did not enable me to un-comment the assert() a few lines below. Wonder if this deprecation is just a cleanup of the API, and functionality-wise the CGContext property is exactly the same as graphicsPort? Change-Id: I2d5d0c766c343faa2d8cabea3a0729ce5b3a34e3
Diffstat (limited to 'vcl/osx/salprn.cxx')
-rw-r--r--vcl/osx/salprn.cxx4
1 files changed, 1 insertions, 3 deletions
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 );