summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-03 17:15:20 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-08 06:40:25 +0000
commit80c874dc87ad3018df6e6f0edb7cca174f75db37 (patch)
treefa119fc641f9708332a0d931533684bab07c9e87 /svtools/source
parent7fb70ff650ce3a1e4a39bd1b936f511d6be8986c (diff)
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 <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/brwbox/brwbox1.cxx2
-rw-r--r--svtools/source/brwbox/datwin.cxx2
-rw-r--r--svtools/source/contnr/treelistbox.cxx2
-rw-r--r--svtools/source/misc/transfer2.cxx31
4 files changed, 32 insertions, 5 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 16cbb639603c..37deeb509c49 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -162,6 +162,8 @@ void BrowseBox::dispose()
delete pColSel;
if ( bMultiSelection )
delete uRow.pSel;
+ DragSourceHelper::dispose();
+ DropTargetHelper::dispose();
Control::dispose();
}
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index 11b43f6a92e6..d15817bf2322 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -229,6 +229,8 @@ void BrowserDataWin::dispose()
pHeaderBar.clear();
pEventWin.clear();
pCornerWin.clear();
+ DragSourceHelper::dispose();
+ DropTargetHelper::dispose();
Control::dispose();
}
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 29b5ee1d0ba5..6021d6b1ea3e 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1481,6 +1481,8 @@ void SvTreeListBox::dispose()
mpImpl.reset();
}
+ DropTargetHelper::dispose();
+ DragSourceHelper::dispose();
Control::dispose();
}
diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx
index 5b7a3daa7899..e8fcdc13e1b2 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -78,10 +78,21 @@ DragSourceHelper::DragSourceHelper( vcl::Window* pWindow ) :
}
+void DragSourceHelper::dispose()
+{
+ Reference<XDragGestureRecognizer> xTmp;
+ {
+ osl::MutexGuard aGuard( maMutex );
+ xTmp = mxDragGestureRecognizer;
+ mxDragGestureRecognizer.clear();
+ }
+ if( xTmp.is() )
+ xTmp->removeDragGestureListener( mxDragGestureListener );
+}
+
DragSourceHelper::~DragSourceHelper()
{
- if( mxDragGestureRecognizer.is() )
- mxDragGestureRecognizer->removeDragGestureListener( mxDragGestureListener );
+ dispose();
}
@@ -240,11 +251,21 @@ DropTargetHelper::DropTargetHelper( const Reference< XDropTarget >& rxDropTarget
}
-DropTargetHelper::~DropTargetHelper()
+void DropTargetHelper::dispose()
{
- if( mxDropTarget.is() )
- mxDropTarget->removeDropTargetListener( mxDropTargetListener );
+ Reference< XDropTarget > xTmp;
+ {
+ osl::MutexGuard aGuard( maMutex );
+ xTmp = mxDropTarget;
+ mxDropTarget.clear();
+ }
+ if( xTmp.is() )
+ xTmp->removeDropTargetListener( mxDropTargetListener );
+}
+DropTargetHelper::~DropTargetHelper()
+{
+ dispose();
delete mpFormats;
}