You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by pe...@apache.org on 2015/07/15 02:31:06 UTC
svn commit: r1691118 - in /openoffice/branches/AOO410/main: ./
vcl/aqua/source/dtrans/DropTarget.cxx vcl/aqua/source/dtrans/DropTarget.hxx
Author: pescetti
Date: Wed Jul 15 00:31:06 2015
New Revision: 1691118
URL: http://svn.apache.org/r1691118
Log:
#i105098# fix drag&drop insertion of files/images on Mac
Fixed-by: Manik Malhotra <mm...@yahoo.com>
Reviewed-by: Herbert Duerr <hd...@apache.org>
Modified:
openoffice/branches/AOO410/main/ (props changed)
openoffice/branches/AOO410/main/vcl/aqua/source/dtrans/DropTarget.cxx
openoffice/branches/AOO410/main/vcl/aqua/source/dtrans/DropTarget.hxx
Propchange: openoffice/branches/AOO410/main/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 15 00:31:06 2015
@@ -2,4 +2,4 @@
/openoffice/branches/ia2/main:1417739-1541842
/openoffice/branches/ooxml-osba/main:1546391,1546395,1546574,1546934,1547030,1547392,1551920,1551954,1551958,1552283
/openoffice/branches/rejuvenate01/main:1480411,1534063,1534098,1536312,1549902,1560617
-/openoffice/trunk/main:1571617,1571677,1572569,1572577,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585261,1586242,1586249,1586583,1587468,1589050,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602823,1602850,1603416,1603897,1603941,1604028,1604709,1604786,1605044,1605355,1605689,1606055,1606061,1606706,1607111,1607793,1607836,1608348,1608376,1608730,1608733,1609204,1609208,1609302,1609426,1610347,1610411,1610422,1610671,1611470,1611549,1612070-1612071,1612539,1612801,1616457,1616944,1677190
+/openoffice/trunk/main:1571617,1571677,1572569,1572577,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585261,1586242,1586249,1586583,1587468,1589050,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602823,1602850,1603416,1603897,1603941,1604028,1604709,1604786,1605044,1605355,1605689,1606055,1606061,1606706,1607111,1607793,1607836,1608348,1608376,1608730,1608733,1609204,1609208,1609302,1609426,1610347,1610411,1610422,1610671,1611470,1611549,1612070-1612071,1612539,1612801,1616457,1616944,1677190,1687177
Modified: openoffice/branches/AOO410/main/vcl/aqua/source/dtrans/DropTarget.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/vcl/aqua/source/dtrans/DropTarget.cxx?rev=1691118&r1=1691117&r2=1691118&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/vcl/aqua/source/dtrans/DropTarget.cxx (original)
+++ openoffice/branches/AOO410/main/vcl/aqua/source/dtrans/DropTarget.cxx Wed Jul 15 00:31:06 2015
@@ -133,7 +133,8 @@ namespace /* private */
-(BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
- return mDropTarget->performDragOperation(sender);
+ (void) sender;
+ return mDropTarget->performDragOperation();
}
@@ -235,10 +236,13 @@ NSDragOperation DropTarget::draggingEnte
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);
-
+
sal_Int32 posX = static_cast<sal_Int32>(dragLocation.x);
sal_Int32 posY = static_cast<sal_Int32>(dragLocation.y);
@@ -274,7 +278,10 @@ NSDragOperation DropTarget::draggingUpda
{
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
}
-BOOL DropTarget::performDragOperation(id sender)
+BOOL DropTarget::performDragOperation()
{
bool bSuccess = false;
@@ -340,7 +347,10 @@ BOOL DropTarget::performDragOperation(id
}
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);
Modified: openoffice/branches/AOO410/main/vcl/aqua/source/dtrans/DropTarget.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/vcl/aqua/source/dtrans/DropTarget.hxx?rev=1691118&r1=1691117&r2=1691118&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/vcl/aqua/source/dtrans/DropTarget.hxx (original)
+++ openoffice/branches/AOO410/main/vcl/aqua/source/dtrans/DropTarget.hxx Wed Jul 15 00:31:06 2015
@@ -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