vcl/source/components/dtranscomp.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit d08e86e65976d9a10a3c73ba5b01fa66393cc0b2
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Fri Jun 25 09:30:35 2021 -0400
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Thu Oct 7 11:43:05 2021 +0200

    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>

diff --git a/vcl/source/components/dtranscomp.cxx 
b/vcl/source/components/dtranscomp.cxx
index bd89a1404e01..3819253e58dc 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -210,6 +210,7 @@ class GenericDragSource : public 
cppu::WeakComponentImplHelper<
             >
 {
     osl::Mutex                          m_aMutex;
+    css::uno::Reference<css::datatransfer::XTransferable> m_xTrans;
 public:
     GenericDragSource() : WeakComponentImplHelper( m_aMutex ) {}
 
@@ -255,10 +256,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;

Reply via email to