diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-11-21 12:03:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-21 19:42:48 +0100 |
commit | d54a1380d13d8d832841cdc33440aac2e14d3300 (patch) | |
tree | 47a2ad9728a3f5d84f3d85223162cfc1f76bb291 /framework | |
parent | c33b0e928e07387bf60708be3f3dc07d9840663c (diff) |
osl::Mutex->std::mutex in ConfigurationAccess_FactoryManager
Change-Id: I0e7a6eb4700e1108b31dfdf8681e8f4743ab7c5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125618
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/uifactory/configurationaccessfactorymanager.hxx | 3 | ||||
-rw-r--r-- | framework/source/uifactory/uielementfactorymanager.cxx | 20 |
2 files changed, 12 insertions, 11 deletions
diff --git a/framework/inc/uifactory/configurationaccessfactorymanager.hxx b/framework/inc/uifactory/configurationaccessfactorymanager.hxx index 7b12048e1223..9f710d235c8d 100644 --- a/framework/inc/uifactory/configurationaccessfactorymanager.hxx +++ b/framework/inc/uifactory/configurationaccessfactorymanager.hxx @@ -30,6 +30,7 @@ #include <cppuhelper/implbase.hxx> #include <rtl/ustring.hxx> +#include <mutex> #include <string_view> #include <unordered_map> @@ -64,7 +65,7 @@ class ConfigurationAccess_FactoryManager final : public ::cppu::WeakImplHelper< bool impl_getElementProps( const css::uno::Any& rElement, OUString& rType, OUString& rName, OUString& rModule, OUString& rServiceSpecifier ) const; - mutable osl::Mutex m_aMutex; + mutable std::mutex m_aMutex; OUString m_aPropType; OUString m_aPropName; OUString m_aPropModule; diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx index 029d8790943f..a8c40552609f 100644 --- a/framework/source/uifactory/uielementfactorymanager.cxx +++ b/framework/source/uifactory/uielementfactorymanager.cxx @@ -78,7 +78,7 @@ ConfigurationAccess_FactoryManager::ConfigurationAccess_FactoryManager( const Re ConfigurationAccess_FactoryManager::~ConfigurationAccess_FactoryManager() { // SAFE - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); Reference< XContainer > xContainer( m_xConfigAccess, UNO_QUERY ); if ( xContainer.is() ) @@ -88,7 +88,7 @@ ConfigurationAccess_FactoryManager::~ConfigurationAccess_FactoryManager() OUString ConfigurationAccess_FactoryManager::getFactorySpecifierFromTypeNameModule( std::u16string_view rType, const OUString& rName, std::u16string_view rModule ) const { // SAFE - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); FactoryManagerMap::const_iterator pIter = m_aFactoryManagerMap.find( getHashKeyFromStrings( rType, rName, rModule )); @@ -124,7 +124,7 @@ OUString ConfigurationAccess_FactoryManager::getFactorySpecifierFromTypeNameModu void ConfigurationAccess_FactoryManager::addFactorySpecifierToTypeNameModule( std::u16string_view rType, std::u16string_view rName, std::u16string_view rModule, const OUString& rServiceSpecifier ) { // SAFE - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); OUString aHashKey = getHashKeyFromStrings( rType, rName, rModule ); @@ -138,7 +138,7 @@ void ConfigurationAccess_FactoryManager::addFactorySpecifierToTypeNameModule( st void ConfigurationAccess_FactoryManager::removeFactorySpecifierFromTypeNameModule( std::u16string_view rType, std::u16string_view rName, std::u16string_view rModule ) { // SAFE - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); OUString aHashKey = getHashKeyFromStrings( rType, rName, rModule ); @@ -152,7 +152,7 @@ void ConfigurationAccess_FactoryManager::removeFactorySpecifierFromTypeNameModul Sequence< Sequence< PropertyValue > > ConfigurationAccess_FactoryManager::getFactoriesDescription() const { // SAFE - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); Sequence< Sequence< PropertyValue > > aSeqSeq; @@ -198,7 +198,7 @@ void SAL_CALL ConfigurationAccess_FactoryManager::elementInserted( const Contain OUString aService; // SAFE - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); if ( impl_getElementProps( aEvent.Element, aType, aName, aModule, aService )) { @@ -217,7 +217,7 @@ void SAL_CALL ConfigurationAccess_FactoryManager::elementRemoved ( const Contain OUString aService; // SAFE - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); if ( impl_getElementProps( aEvent.Element, aType, aName, aModule, aService )) { @@ -236,7 +236,7 @@ void SAL_CALL ConfigurationAccess_FactoryManager::elementReplaced( const Contain OUString aService; // SAFE - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); if ( impl_getElementProps( aEvent.Element, aType, aName, aModule, aService )) { @@ -253,14 +253,14 @@ void SAL_CALL ConfigurationAccess_FactoryManager::disposing( const EventObject& { // SAFE // remove our reference to the config access - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); m_xConfigAccess.clear(); } void ConfigurationAccess_FactoryManager::readConfigurationData() { // SAFE - osl::MutexGuard g(m_aMutex); + std::unique_lock g(m_aMutex); if ( !m_bConfigAccessInitialized ) { |