Kaydet (Commit) 024b54d6 authored tarafından Herbert Dürr's avatar Herbert Dürr

#i105098# fix drag&drop insertion of files/images on Mac

Fixed-by: 's avatarManik <mm30f@yahoo.com>
Reviewed-by: 's avatarHerbert Duerr <hdu@apache.org>
üst a80742fb
......@@ -133,7 +133,8 @@ namespace /* private */
-(BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
return mDropTarget->performDragOperation(sender);
(void) sender;
return mDropTarget->performDragOperation();
}
......@@ -235,7 +236,10 @@ NSDragOperation DropTarget::draggingEntered(id sender)
sal_Int8 currentAction = determineDropAction(mDragSourceSupportedActions, sender);
NSRect bounds = [mView bounds];
NSPoint dragLocation = [sender draggedImageLocation];
NSPoint mouseLoc = [NSEvent mouseLocation];
id wnd = [mView window];
NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil];
CocoaToVCL(dragLocation, bounds);
......@@ -274,7 +278,10 @@ NSDragOperation DropTarget::draggingUpdated(id sender)
{
sal_Int8 currentAction = determineDropAction(currentDragSourceActions, sender);
NSRect bounds = [mView bounds];
NSPoint dragLocation = [sender draggedImageLocation];
NSPoint mouseLoc = [NSEvent mouseLocation];
id wnd = [mView window];
NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil];
CocoaToVCL(dragLocation, bounds);
......@@ -326,7 +333,7 @@ BOOL DropTarget::prepareForDragOperation(id /*sender*/)
}
BOOL DropTarget::performDragOperation(id sender)
BOOL DropTarget::performDragOperation()
{
bool bSuccess = false;
......@@ -340,7 +347,10 @@ BOOL DropTarget::performDragOperation(id sender)
}
NSRect bounds = [mView bounds];
NSPoint dragLocation = [sender draggedImageLocation];
NSPoint mouseLoc = [NSEvent mouseLocation];
id wnd = [mView window];
NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil];
CocoaToVCL(dragLocation, bounds);
......
......@@ -133,7 +133,7 @@ public:
virtual NSDragOperation draggingUpdated(id sender);
virtual void draggingExited(id sender);
virtual BOOL prepareForDragOperation(id sender);
virtual BOOL performDragOperation(id sender);
virtual BOOL performDragOperation();
virtual void concludeDragOperation(id sender);
/* If multiple actions are supported by the drag source and
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment