summaryrefslogtreecommitdiff
path: root/framework/source/uielement/menubarmanager.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-03-25 12:18:05 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-03-25 15:38:42 +0100
commit47e6bf0109c686f71b48c550667af707705a777b (patch)
tree455fcdf13c23edc29774d8969446f15e768fc8d1 /framework/source/uielement/menubarmanager.cxx
parentb8720d1e1f0842d52f1830c48ef7551b1868ae6f (diff)
Fold MenuBarManager::Destroy into its only call site
...mainly to demonstrate that its SolarMutexGuard was redundant and that replacing it with DBG_TESTSOLARMUTEX() would be overkill Change-Id: I82f00873cd99cb5da1b644c40ba25f8c210503cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132112 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'framework/source/uielement/menubarmanager.cxx')
-rw-r--r--framework/source/uielement/menubarmanager.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 49b4092f6d46..c363ccffb9b6 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -136,9 +136,12 @@ MenuBarManager::~MenuBarManager()
SAL_WARN_IF( OWeakObject::m_refCount != 0, "fwk.uielement", "Who wants to delete an object with refcount > 0!" );
}
-void MenuBarManager::Destroy()
+// XComponent
+void MenuBarManager::disposing(std::unique_lock<std::mutex>& )
{
- SolarMutexGuard aGuard;
+ Reference< XComponent > xThis( this );
+
+ SolarMutexGuard g;
// stop asynchronous settings timer and
// release deferred item container reference
@@ -152,15 +155,6 @@ void MenuBarManager::Destroy()
{
m_pVCLMenu.disposeAndClear();
}
-}
-
-// XComponent
-void MenuBarManager::disposing(std::unique_lock<std::mutex>& )
-{
- Reference< XComponent > xThis( this );
-
- SolarMutexGuard g;
- Destroy();
if ( m_xDocImageManager.is() )
{