summaryrefslogtreecommitdiff
path: root/framework
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 /framework
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 'framework')
-rw-r--r--framework/source/uielement/buttontoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/statusbarwrapper.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/framework/source/uielement/buttontoolbarcontroller.cxx b/framework/source/uielement/buttontoolbarcontroller.cxx
index d94e5b0ff25f..d100ee17113e 100644
--- a/framework/source/uielement/buttontoolbarcontroller.cxx
+++ b/framework/source/uielement/buttontoolbarcontroller.cxx
@@ -126,7 +126,7 @@ void SAL_CALL ButtonToolbarController::dispose()
{
SolarMutexGuard aSolarMutexGuard;
if ( m_bDisposed )
- throw DisposedException();
+ return;
m_xContext.clear();
m_xURLTransformer.clear();
diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx
index 7627b2f0a110..8ce6e48e5eb1 100644
--- a/framework/source/uielement/statusbarwrapper.cxx
+++ b/framework/source/uielement/statusbarwrapper.cxx
@@ -61,7 +61,7 @@ void SAL_CALL StatusBarWrapper::dispose()
SolarMutexGuard g;
if ( m_bDisposed )
- throw DisposedException();
+ return;
if ( m_xStatusBarManager.is() )
m_xStatusBarManager->dispose();