summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-06-25 09:18:37 -0400
committerHenry Castro <hcastro@collabora.com>2022-02-10 15:55:41 +0100
commit03bcc8ad7a3347a817f087b4e444d7bed95ca973 (patch)
tree33bd1d1e3d1c50aecc295b6374a49dc1e2aa7d7a /vcl
parent9c2d5c877d61965d6e5fc9ef2d81299f0e04892c (diff)
lok: add generic class DragContext, DropContext
In tiled rendering case, there is no exists a generic dummy to fire drag over and drag drop events. Change-Id: I1d334df8316a09950c11bc365f12f28f0352dfc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118860 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117893 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/dndlistenercontainer.hxx25
-rw-r--r--vcl/source/window/dndlistenercontainer.cxx36
2 files changed, 61 insertions, 0 deletions
diff --git a/vcl/inc/dndlistenercontainer.hxx b/vcl/inc/dndlistenercontainer.hxx
index 1e23dfa6c9bc..870cc05dfacb 100644
--- a/vcl/inc/dndlistenercontainer.hxx
+++ b/vcl/inc/dndlistenercontainer.hxx
@@ -28,6 +28,31 @@
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/basemutex.hxx>
+#include <vcl/unohelp2.hxx>
+
+class GenericDropTargetDropContext :
+ public ::cppu::WeakImplHelper<css::datatransfer::dnd::XDropTargetDropContext>
+{
+public:
+ GenericDropTargetDropContext();
+
+ // XDropTargetDropContext
+ virtual void SAL_CALL acceptDrop( sal_Int8 dragOperation ) override;
+ virtual void SAL_CALL rejectDrop() override;
+ virtual void SAL_CALL dropComplete( sal_Bool success ) override;
+};
+
+class GenericDropTargetDragContext :
+ public ::cppu::WeakImplHelper<css::datatransfer::dnd::XDropTargetDragContext>
+{
+public:
+ GenericDropTargetDragContext();
+
+ // XDropTargetDragContext
+ virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation ) override;
+ virtual void SAL_CALL rejectDrag() override;
+};
+
class DNDListenerContainer final : public cppu::BaseMutex,
public ::cppu::WeakComponentImplHelper<
css::datatransfer::dnd::XDragGestureRecognizer,
diff --git a/vcl/source/window/dndlistenercontainer.cxx b/vcl/source/window/dndlistenercontainer.cxx
index 7e38dae842f2..d3147aac5288 100644
--- a/vcl/source/window/dndlistenercontainer.cxx
+++ b/vcl/source/window/dndlistenercontainer.cxx
@@ -448,4 +448,40 @@ void SAL_CALL DNDListenerContainer::dropComplete( sal_Bool success )
}
}
+/*
+ * GenericDropTargetDropContext
+ */
+
+GenericDropTargetDropContext::GenericDropTargetDropContext()
+{
+}
+
+void GenericDropTargetDropContext::acceptDrop( sal_Int8 /*dragOperation*/ )
+{
+}
+
+void GenericDropTargetDropContext::rejectDrop()
+{
+}
+
+void GenericDropTargetDropContext::dropComplete( sal_Bool /*success*/ )
+{
+}
+
+/*
+ * GenericDropTargetDragContext
+ */
+
+GenericDropTargetDragContext::GenericDropTargetDragContext()
+{
+}
+
+void GenericDropTargetDragContext::acceptDrag( sal_Int8 /*dragOperation*/ )
+{
+}
+
+void GenericDropTargetDragContext::rejectDrag()
+{
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */