vcl/inc/dndlistenercontainer.hxx | 23 ++++++++++++++++++ vcl/source/window/dndlistenercontainer.cxx | 36 +++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+)
New commits: commit 840e2830cb76dabbdd3f75518b9e3de4357a7429 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Fri Jun 25 09:18:37 2021 -0400 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Thu Oct 7 11:42:33 2021 +0200 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.k...@collabora.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/vcl/inc/dndlistenercontainer.hxx b/vcl/inc/dndlistenercontainer.hxx index 28339e7abeb8..6962682ff2eb 100644 --- a/vcl/inc/dndlistenercontainer.hxx +++ b/vcl/inc/dndlistenercontainer.hxx @@ -29,6 +29,29 @@ #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 vcl::unohelper::MutexHelper, public ::cppu::WeakComponentImplHelper< css::datatransfer::dnd::XDragGestureRecognizer, diff --git a/vcl/source/window/dndlistenercontainer.cxx b/vcl/source/window/dndlistenercontainer.cxx index 5d430629c254..e80d94d6a287 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: */