diff options
Diffstat (limited to 'dtrans')
-rw-r--r-- | dtrans/source/X11/X11_selection.cxx | 9 | ||||
-rw-r--r-- | dtrans/source/aqua/DropTarget.cxx | 12 | ||||
-rw-r--r-- | dtrans/source/aqua/aqua_clipboard.cxx | 9 |
3 files changed, 22 insertions, 8 deletions
diff --git a/dtrans/source/X11/X11_selection.cxx b/dtrans/source/X11/X11_selection.cxx index affc92e98908..21030a220917 100644 --- a/dtrans/source/X11/X11_selection.cxx +++ b/dtrans/source/X11/X11_selection.cxx @@ -515,6 +515,15 @@ SelectionManager::~SelectionManager() // destroy message window if( m_aWindow ) XDestroyWindow( m_pDisplay, m_aWindow ); + // release cursors + if (m_aMoveCursor != None) + XFreeCursor(m_pDisplay, m_aMoveCursor); + if (m_aCopyCursor != None) + XFreeCursor(m_pDisplay, m_aCopyCursor); + if (m_aLinkCursor != None) + XFreeCursor(m_pDisplay, m_aLinkCursor); + if (m_aNoneCursor != None) + XFreeCursor(m_pDisplay, m_aNoneCursor); // paranoia setting, the drag thread should have // done that already diff --git a/dtrans/source/aqua/DropTarget.cxx b/dtrans/source/aqua/DropTarget.cxx index bb45742732e7..6f973d7aa08f 100644 --- a/dtrans/source/aqua/DropTarget.cxx +++ b/dtrans/source/aqua/DropTarget.cxx @@ -245,8 +245,8 @@ NSDragOperation DropTarget::draggingEntered(id sender) CocoaToVCL(dragLocation, bounds); - sal_Int32 posX = dragLocation.x; - sal_Int32 posY = dragLocation.y; + sal_Int32 posX = static_cast<sal_Int32>(dragLocation.x); + sal_Int32 posY = static_cast<sal_Int32>(dragLocation.y); NSPasteboard* dragPboard = [sender draggingPasteboard]; mXCurrentDragClipboard = new AquaClipboard(mXComponentContext, dragPboard, false); @@ -284,8 +284,8 @@ NSDragOperation DropTarget::draggingUpdated(id sender) CocoaToVCL(dragLocation, bounds); - sal_Int32 posX = dragLocation.x; - sal_Int32 posY = dragLocation.y; + sal_Int32 posX = static_cast<sal_Int32>(dragLocation.x); + sal_Int32 posY = static_cast<sal_Int32>(dragLocation.y); DropTargetDragEvent dtde(static_cast<OWeakObject*>(this), 0, @@ -350,8 +350,8 @@ MacOSBOOL DropTarget::performDragOperation(id sender) CocoaToVCL(dragLocation, bounds); - sal_Int32 posX = dragLocation.x; - sal_Int32 posY = dragLocation.y; + sal_Int32 posX = static_cast<sal_Int32>(dragLocation.x); + sal_Int32 posY = static_cast<sal_Int32>(dragLocation.y); DropTargetDropEvent dtde(static_cast<OWeakObject*>(this), 0, diff --git a/dtrans/source/aqua/aqua_clipboard.cxx b/dtrans/source/aqua/aqua_clipboard.cxx index d0b821099ea0..370edee90eb7 100644 --- a/dtrans/source/aqua/aqua_clipboard.cxx +++ b/dtrans/source/aqua/aqua_clipboard.cxx @@ -323,8 +323,13 @@ void AquaClipboard::fireLostClipboardOwnershipEvent(Reference<XClipboardOwner> o void AquaClipboard::provideDataForType(NSPasteboard* sender, NSString* type) { DataProviderPtr_t dp = mpDataFlavorMapper->getDataProvider(type, mXClipboardContent); - NSData* pBoardData = (NSData*)dp->getSystemData(); - [sender setData: pBoardData forType: type]; + NSData* pBoardData = NULL; + + if (dp.get() != NULL) + { + pBoardData = (NSData*)dp->getSystemData(); + [sender setData: pBoardData forType: type]; + } } |