vcl/source/components/dtranscomp.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 1000a4fa834c8d7b20ed235b124d9c4fe9cd2e26 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Fri Jun 25 09:30:35 2021 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Fri Feb 11 12:42:21 2022 +0100 lok: add private member transfer data to GenericDragSource In tiled rendering case, the class GenericDragSource is created by default, but it does not hold the transfer data and it cancels the drag & drop. Change-Id: Ib96f426a42e1fdae823e2412dc5280d70b59c44f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118866 Tested-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117894 Tested-by: Jenkins Reviewed-by: Henry Castro <hcas...@collabora.com> diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx index a01fde73a649..5e9e30e8c8a7 100644 --- a/vcl/source/components/dtranscomp.cxx +++ b/vcl/source/components/dtranscomp.cxx @@ -211,6 +211,7 @@ class GenericDragSource : public cppu::WeakComponentImplHelper< > { osl::Mutex m_aMutex; + css::uno::Reference<css::datatransfer::XTransferable> m_xTrans; public: GenericDragSource() : WeakComponentImplHelper( m_aMutex ) {} @@ -256,10 +257,15 @@ sal_Int32 GenericDragSource::getDefaultCursor( sal_Int8 ) void GenericDragSource::startDrag( const datatransfer::dnd::DragGestureEvent&, sal_Int8 /*sourceActions*/, sal_Int32 /*cursor*/, sal_Int32 /*image*/, - const Reference< datatransfer::XTransferable >&, + const Reference< datatransfer::XTransferable >& rTrans, const Reference< datatransfer::dnd::XDragSourceListener >& listener ) { + if (comphelper::LibreOfficeKit::isActive()) { + m_xTrans = rTrans; + return; + } + datatransfer::dnd::DragSourceDropEvent aEv; aEv.DropAction = datatransfer::dnd::DNDConstants::ACTION_COPY; aEv.DropSuccess = false;