summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2014-01-23 16:56:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-24 11:05:46 +0000
commite4653eee7680831e6d0995d51d80fb63309c03ab (patch)
tree078ef816c2fa12397403361263e87239dbf308d3 /vcl
parent4b0d7b61ba828785064133e40f960a464c1c147a (diff)
Related: #i123895# adjust VCL support for 64bit OSX port
(cherry picked from commit 677d987b931c509c4240840c4f21ccad2b518b12) Conflicts: vcl/aqua/source/a11y/aqua11ywrapperrow.mm vcl/inc/aqua/aquavcltypes.h vcl/inc/quartz/salgdi.h vcl/osx/DropTarget.cxx vcl/osx/salframe.cxx vcl/osx/salinst.cxx vcl/osx/salmenu.cxx vcl/osx/vclnsapp.mm Change-Id: I30d72e7caa1269982d176bc4d3baf604d5e7a84b
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/osx/salframeview.h5
-rw-r--r--vcl/osx/DropTarget.cxx22
-rw-r--r--vcl/osx/a11ywrapperrow.mm3
-rw-r--r--vcl/osx/salframe.cxx12
-rw-r--r--vcl/osx/salmenu.cxx10
-rw-r--r--vcl/osx/vclnsapp.mm14
-rw-r--r--vcl/quartz/salgdiutils.cxx2
7 files changed, 16 insertions, 52 deletions
diff --git a/vcl/inc/osx/salframeview.h b/vcl/inc/osx/salframeview.h
index 3217499b8881..db3d588dec70 100644
--- a/vcl/inc/osx/salframeview.h
+++ b/vcl/inc/osx/salframeview.h
@@ -22,7 +22,7 @@
#include "osx/a11ywrapper.h"
-@interface SalFrameWindow : NSWindow
+@interface SalFrameWindow : NSWindow<NSWindowDelegate>
{
AquaSalFrame* mpFrame;
id mDraggingDestinationHandler;
@@ -38,6 +38,9 @@
-(void)windowDidMiniaturize: (NSNotification*)pNotification;
-(void)windowDidDeminiaturize: (NSNotification*)pNotification;
-(BOOL)windowShouldClose: (NSNotification*)pNotification;
+//-(void)willEncodeRestorableState:(NSCoder*)pCoderState;
+//-(void)didDecodeRestorableState:(NSCoder*)pCoderState;
+//-(void)windowWillEnterVersionBrowser:(NSNotification*)pNotification;
-(void)dockMenuItemTriggered: (id)sender;
-(AquaSalFrame*)getSalFrame;
-(BOOL)containsMouse;
diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx
index e4d3a6bc72a4..3a75f4488e4e 100644
--- a/vcl/osx/DropTarget.cxx
+++ b/vcl/osx/DropTarget.cxx
@@ -285,19 +285,13 @@ NSDragOperation DropTarget::draggingUpdated(id sender)
//NSLog(@"Drag update: Source actions: %x proposed action %x selected action %x", mDragSourceSupportedActions, currentAction, mSelectedDropAction);
}
-#ifndef __LP64__
- // Weird but it appears as if there is no method in Cocoa
- // to create a kThemeCopyArrowCursor hence we have to use
- // Carbon to do it
if (dragOp == NSDragOperationNone)
- SetThemeCursor(kThemeNotAllowedCursor);
+ [[NSCursor operationNotAllowedCursor] set];
else if (dragOp == NSDragOperationCopy)
- SetThemeCursor(kThemeCopyArrowCursor);
+ [[NSCursor dragCopyCursor] set];
else
- SetThemeCursor(kThemeArrowCursor);
-#else
- // FIXME: SetThemeCursor replacement?
-#endif
+ [[NSCursor arrowCursor] set];
+
return dragOp;
}
@@ -308,9 +302,7 @@ void DropTarget::draggingExited(id /*sender*/)
fire_dragExit(dte);
mDragSourceSupportedActions = DNDConstants::ACTION_NONE;
mSelectedDropAction = DNDConstants::ACTION_NONE;
-#ifndef __LP64__
- SetThemeCursor(kThemeArrowCursor);
-#endif
+ [[NSCursor arrowCursor] set];
}
@@ -364,9 +356,7 @@ void DropTarget::concludeDragOperation(id /*sender*/)
mDragSourceSupportedActions = DNDConstants::ACTION_NONE;
mSelectedDropAction = DNDConstants::ACTION_NONE;
mXCurrentDragClipboard = uno::Reference<XClipboard>();
-#ifndef __LP64__
- SetThemeCursor(kThemeArrowCursor);
-#endif
+ [[NSCursor arrowCursor] set];
}
diff --git a/vcl/osx/a11ywrapperrow.mm b/vcl/osx/a11ywrapperrow.mm
index 8bcef8032cd3..98739e6597d1 100644
--- a/vcl/osx/a11ywrapperrow.mm
+++ b/vcl/osx/a11ywrapperrow.mm
@@ -28,7 +28,8 @@
@implementation AquaA11yWrapperRow : AquaA11yWrapper
-(id)disclosingAttribute {
- return NULL; // TODO
+ // TODO: implement
+ return nil;
}
-(NSArray *)accessibilityAttributeNames {
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 6d47cc6f6ee6..6b236d677984 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -200,17 +200,7 @@ void AquaSalFrame::initWindowAndView()
else
[mpNSWindow setAcceptsMouseMovedEvents: YES];
[mpNSWindow setHasShadow: YES];
-
- // WTF? With the 10.6 SDK and gcc 4.2.1, we get: class 'NSWindow'
- // does not implement the 'NSWindowDelegate' protocol. Anyway,
- // having the window object be its own delegate object is
- // apparently what the code does on purpose, see discussion in
- // https://issues.apache.org/ooo/show_bug.cgi?id=91990
-
- // So to silence the warning when compiling with -Werror, instead of:
- // [mpNSWindow setDelegate: mpNSWindow];
- // do this:
- objc_msgSend(mpNSWindow, @selector(setDelegate:), mpNSWindow);
+ [mpNSWindow setDelegate: static_cast<id<NSWindowDelegate> >(mpNSWindow)];
if( [mpNSWindow respondsToSelector: @selector(setRestorable:)])
{
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index db3dd2ef845c..d906727489ae 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -253,15 +253,7 @@ AquaSalMenu::AquaSalMenu( bool bMenuBar ) :
if( ! mbMenuBar )
{
mpMenu = [[SalNSMenu alloc] initWithMenu: this];
- // With the 10.6 SDK and gcc 4.2.1, we get: class 'NSMenu'
- // does not implement the 'NSMenuDelegate' protocol. Anyway,
- // having the menu object be its own delegate object is
- // apparently what the code does on purpose.
-
- // So to silcense the warning, instead of:
- // [mpMenu setDelegate: mpMenu];
- // do this:
- objc_msgSend(mpMenu, @selector(setDelegate:), mpMenu);
+ [mpMenu setDelegate: (id<NSMenuDelegate>)mpMenu];
}
else
{
diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm
index 18079fb1ca9b..0c0fe698a3cc 100644
--- a/vcl/osx/vclnsapp.mm
+++ b/vcl/osx/vclnsapp.mm
@@ -82,19 +82,7 @@
if( nModMask == NSCommandKeyMask
&& [[pEvent charactersIgnoringModifiers] isEqualToString: @"w"] )
{
- // Note: gcc 4.2.1 (in the 10.6 SDK) tells us
- // 'NSWindow' may not respond to
- // '-windowShouldClose:' . Is that a bogus
- // warning, or is this code bogus? No idea.
- // Anyway, so that we can compile also against
- // this SDK with -Werror, use objc_msgSend
- // instead.
-
- // Instead of:
- // [pFrame->getNSWindow() windowShouldClose: nil];
- // do:
- objc_msgSend(pFrame->getNSWindow(), @selector(windowShouldClose:), nil);
-
+ [(SalFrameWindow*)pFrame->getNSWindow() windowShouldClose: nil];
return;
}
}
diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx
index c48089f86588..295719e959ec 100644
--- a/vcl/quartz/salgdiutils.cxx
+++ b/vcl/quartz/salgdiutils.cxx
@@ -166,7 +166,7 @@ void AquaSalGraphics::SetState()
bool AquaSalGraphics::CheckContext()
{
- if( mbWindow && mpFrame != NULL )
+ if( mbWindow && mpFrame && mpFrame->getNSWindow() )
{
const unsigned int nWidth = mpFrame->maGeometry.nWidth;
const unsigned int nHeight = mpFrame->maGeometry.nHeight;