vcl/inc/dndlistenercontainer.hxx | 25 ++++++++++++++++++++ vcl/source/window/dndlistenercontainer.cxx | 36 +++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+)
New commits: commit 03bcc8ad7a3347a817f087b4e444d7bed95ca973 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Fri Jun 25 09:18:37 2021 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Thu Feb 10 15:55:41 2022 +0100 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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117893 Tested-by: Jenkins Reviewed-by: Henry Castro <hcas...@collabora.com> 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: */