diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-12-24 20:54:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-26 08:21:59 +0100 |
commit | 058c64ad17ef8ed0d7f583a804368aa8d0071e59 (patch) | |
tree | 78aa73dbe46305a699458f61c64730e0214afbba /framework/source/uiconfiguration | |
parent | 9f5188173a4a37a9d41ee90a5555874f1f17136e (diff) |
use comphelper::WeakComponentImplHelper in WindowStateConfiguration
Change-Id: Iada515ab1926aa1e0b7a3f39690d7c6eebf28aea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127465
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/uiconfiguration')
-rw-r--r-- | framework/source/uiconfiguration/windowstateconfiguration.cxx | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index cc6f72f36a11..acb0ae059ff9 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -36,8 +36,7 @@ #include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#include <cppuhelper/basemutex.hxx> -#include <cppuhelper/compbase.hxx> +#include <comphelper/compbase.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> #include <comphelper/propertysequence.hxx> @@ -1222,11 +1221,10 @@ void ConfigurationAccess_WindowState::impl_initializeConfigAccess() } } -typedef ::cppu::WeakComponentImplHelper< css::container::XNameAccess, +typedef comphelper::WeakComponentImplHelper< css::container::XNameAccess, css::lang::XServiceInfo> WindowStateConfiguration_BASE; -class WindowStateConfiguration : private cppu::BaseMutex, - public WindowStateConfiguration_BASE +class WindowStateConfiguration : public WindowStateConfiguration_BASE { public: explicit WindowStateConfiguration( const css::uno::Reference< css::uno::XComponentContext >& rxContext ); @@ -1271,7 +1269,6 @@ private: }; WindowStateConfiguration::WindowStateConfiguration( const Reference< XComponentContext >& rxContext ) : - WindowStateConfiguration_BASE(m_aMutex), m_xContext( rxContext ) { css::uno::Reference< css::frame::XModuleManager2 > xModuleManager = @@ -1317,14 +1314,14 @@ WindowStateConfiguration::WindowStateConfiguration( const Reference< XComponentC WindowStateConfiguration::~WindowStateConfiguration() { - osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex); + std::unique_lock g(m_aMutex); m_aModuleToFileHashMap.clear(); m_aModuleToWindowStateHashMap.clear(); } Any SAL_CALL WindowStateConfiguration::getByName( const OUString& aModuleIdentifier ) { - osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex); + std::unique_lock g(m_aMutex); ModuleToWindowStateFileMap::const_iterator pIter = m_aModuleToFileHashMap.find( aModuleIdentifier ); if ( pIter != m_aModuleToFileHashMap.end() ) @@ -1353,14 +1350,14 @@ Any SAL_CALL WindowStateConfiguration::getByName( const OUString& aModuleIdentif Sequence< OUString > SAL_CALL WindowStateConfiguration::getElementNames() { - osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex); + std::unique_lock g(m_aMutex); return comphelper::mapKeysToSequence( m_aModuleToFileHashMap ); } sal_Bool SAL_CALL WindowStateConfiguration::hasByName( const OUString& aName ) { - osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex); + std::unique_lock g(m_aMutex); ModuleToWindowStateFileMap::const_iterator pIter = m_aModuleToFileHashMap.find( aName ); return ( pIter != m_aModuleToFileHashMap.end() ); |