summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-05-31 15:31:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-31 18:37:34 +0200
commit009b889616561176a230bc041699271697f95bf6 (patch)
treee6c44c7b552f8a0764ce2e5a1afe9483dff5bcb4 /svtools
parent046e37faa295889157f0313f2300d93cb0f83b9e (diff)
do not throw DisposedException when inside a dispose() method
There is no need to do this, as the documentation of css.lang.XComponent::dispose at udkapi/com/sun/star/lang/XComponent.idl states: After this method has been called, the object should behave as passive as possible, thus it should ignore all calls Otherwise, the effect of throwing here is mostly to disturb the flow of logic in caller code, preventing other parts of teardown from proceeding smoothly. Change-Id: I30e6d1b35f85b727debf4405a995fdc0a4fccde6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152450 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/uno/framestatuslistener.cxx2
-rw-r--r--svtools/source/uno/statusbarcontroller.cxx2
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx
index 25152f2f3b4a..166433dff1b9 100644
--- a/svtools/source/uno/framestatuslistener.cxx
+++ b/svtools/source/uno/framestatuslistener.cxx
@@ -83,7 +83,7 @@ void SAL_CALL FrameStatusListener::dispose()
SolarMutexGuard aSolarMutexGuard;
if ( m_bDisposed )
- throw DisposedException();
+ return;
for (auto const& listener : m_aListenerMap)
{
diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx
index 6a8499a353c7..7ab3a2e29c40 100644
--- a/svtools/source/uno/statusbarcontroller.cxx
+++ b/svtools/source/uno/statusbarcontroller.cxx
@@ -179,7 +179,7 @@ void SAL_CALL StatusbarController::dispose()
{
SolarMutexGuard aSolarMutexGuard;
if ( m_bDisposed )
- throw DisposedException();
+ return;
}
css::lang::EventObject aEvent( xThis );
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index b592bb25b859..4c9611ff7dba 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -243,7 +243,7 @@ void SAL_CALL ToolboxController::dispose()
{
SolarMutexGuard aSolarMutexGuard;
if ( m_bDisposed )
- throw DisposedException();
+ return;
}
css::lang::EventObject aEvent( xThis );