From 80c874dc87ad3018df6e6f0edb7cca174f75db37 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 3 Jun 2016 17:15:20 +0200 Subject: remove "object is disposed" warning in OBroadcastHelperVar::removeListener doesn't add anything of value. Change-Id: Ie2dea7c43570640284771c992d0072ab61de425e Reviewed-on: https://gerrit.libreoffice.org/25871 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- include/cppuhelper/interfacecontainer.h | 1 - include/svtools/transfer.hxx | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/cppuhelper/interfacecontainer.h b/include/cppuhelper/interfacecontainer.h index f3986bb5776c..07b296e5b7d2 100644 --- a/include/cppuhelper/interfacecontainer.h +++ b/include/cppuhelper/interfacecontainer.h @@ -476,7 +476,6 @@ struct OBroadcastHelperVar const css::uno::Reference < css::uno::XInterface > & r ) { ::osl::MutexGuard guard( rMutex ); - OSL_ENSURE( !bDisposed, "object is disposed" ); if( ! bInDispose && ! bDisposed ) aLC.removeInterface( key , r ); } diff --git a/include/svtools/transfer.hxx b/include/svtools/transfer.hxx index ea50c8eaa2fd..37aaf4d16093 100644 --- a/include/svtools/transfer.hxx +++ b/include/svtools/transfer.hxx @@ -395,8 +395,9 @@ private: friend class DragSourceHelper::DragGestureListener; private: - + osl::Mutex maMutex; css::uno::Reference< css::datatransfer::dnd::XDragGestureRecognizer > mxDragGestureRecognizer; + css::uno::Reference< css::datatransfer::dnd::XDragGestureListener > mxDragGestureListener; DragSourceHelper& operator=( const DragSourceHelper& rDragSourceHelper ) = delete; @@ -408,6 +409,7 @@ public: virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ); DragSourceHelper( vcl::Window* pWindow ); + void dispose(); virtual ~DragSourceHelper(); }; @@ -444,8 +446,9 @@ private: friend class DropTargetHelper::DropTargetListener; private: - + osl::Mutex maMutex; css::uno::Reference< css::datatransfer::dnd::XDropTarget > mxDropTarget; + css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > mxDropTargetListener; DataFlavorExVector* mpFormats; @@ -468,6 +471,7 @@ public: DropTargetHelper( vcl::Window* pWindow ); DropTargetHelper( const css::uno::Reference< css::datatransfer::dnd::XDropTarget >& rxDropTarget ); + void dispose(); virtual ~DropTargetHelper(); // typically called by the application in ::AcceptDrop and ::ExecuteDrop and (see above) -- cgit