summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorDouglas Mencken <dougmencken@gmail.com>2014-07-02 05:40:09 -0400
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-07-02 21:41:52 +0000
commitf711b333cfa24f3c7134f799b39a634ca1a0a885 (patch)
tree85287a4a167c839cfcbf3ca6940c59be0bf0845e /vcl
parent9746dc9ad62e7f3a39961733f2ac204e90289034 (diff)
fix 'NSImage' may not respond to '-lockFocusFlipped:'
related commit: b3818f53812053e94196a58bbe474e2c3b72ac69 Change-Id: Ica27b3c2e474ebb85a69149e35021835f8183b69 Reviewed-on: https://gerrit.libreoffice.org/10011 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/osx/salinst.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 9e9b35cc2fc6..3104733c0cdc 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -1049,8 +1049,12 @@ NSImage* CreateNSImage( const Image& rImage )
NSImage* pImage = [[NSImage alloc] initWithSize: NSMakeSize( aSize.Width(), aSize.Height() )];
if( pImage )
{
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+ [pImage setFlipped:YES];
+ [pImage lockFocus];
+#else
[pImage lockFocusFlipped:YES];
-
+#endif
NSGraphicsContext* pContext = [NSGraphicsContext currentContext];
CGContextRef rCGContext = reinterpret_cast<CGContextRef>([pContext graphicsPort]);