summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5Frame.cxx
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2018-10-18 01:01:14 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2018-10-19 11:34:02 +0200
commit0fa25c261ad1bac1303f8a35d89261365bb5d849 (patch)
treebc26f6d6f8143da7678f519c01398eb1164e3f6a /vcl/qt5/Qt5Frame.cxx
parentc8d158c05c2d5be5d387b93d03526bf13a1c767d (diff)
Now that initiating drag works, let's also accept drops
Change-Id: Iab328edd799dd4ce04312db4e640f86a8f7fda77 Reviewed-on: https://gerrit.libreoffice.org/61897 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'vcl/qt5/Qt5Frame.cxx')
-rw-r--r--vcl/qt5/Qt5Frame.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index bbf541dea312..a58e7b18d4b4 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -901,4 +901,23 @@ void Qt5Frame::draggingStarted(const int x, const int y)
}
}
+void Qt5Frame::dropping(const int x, const int y)
+{
+ assert(m_pDropTarget);
+
+ css::datatransfer::dnd::DropTargetDropEvent aEvent;
+ aEvent.Source = static_cast<css::datatransfer::dnd::XDropTarget*>(m_pDropTarget);
+ aEvent.Context = static_cast<css::datatransfer::dnd::XDropTargetDropContext*>(m_pDropTarget);
+ aEvent.LocationX = x;
+ aEvent.LocationY = y;
+ aEvent.DropAction = css::datatransfer::dnd::DNDConstants::ACTION_MOVE; //FIXME
+ aEvent.SourceActions = css::datatransfer::dnd::DNDConstants::ACTION_MOVE;
+
+ css::uno::Reference<css::datatransfer::XTransferable> xTransferable;
+ xTransferable = m_pDragSource->GetTransferable();
+ aEvent.Transferable = xTransferable;
+
+ m_pDropTarget->fire_drop(aEvent);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */