summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-02-13 22:06:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-14 06:59:32 +0000
commit7da5639531303c7de34382c5030b67a489a6e3d5 (patch)
tree580a5ede73b095e72626336e747128d0495e1227 /framework/source
parent862eda5f187d77f8d1f6e2a45fa33f8dd1ad5d5b (diff)
osl::Mutex->std::mutex in ConfigurationAccess_UICommand
Change-Id: Id92161815cd1f336c030aa4491e67a84aaddeb87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146943 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/uielement/uicommanddescription.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx
index 8054cf4bff8d..f37663bc0e54 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -71,7 +71,7 @@ namespace {
class ConfigurationAccess_UICommand : // Order is necessary for right initialization!
public ::cppu::WeakImplHelper<XNameAccess,XContainerListener>
{
- osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
public:
ConfigurationAccess_UICommand( std::u16string_view aModuleName, const Reference< XNameAccess >& xGenericUICommands, const Reference< XComponentContext >& rxContext );
virtual ~ConfigurationAccess_UICommand() override;
@@ -176,7 +176,7 @@ ConfigurationAccess_UICommand::ConfigurationAccess_UICommand( std::u16string_vie
ConfigurationAccess_UICommand::~ConfigurationAccess_UICommand()
{
// SAFE
- osl::MutexGuard g(m_aMutex);
+ std::unique_lock g(m_aMutex);
Reference< XContainer > xContainer( m_xConfigAccess, UNO_QUERY );
if ( xContainer.is() )
xContainer->removeContainerListener(m_xConfigListener);
@@ -188,7 +188,7 @@ ConfigurationAccess_UICommand::~ConfigurationAccess_UICommand()
// XNameAccess
Any ConfigurationAccess_UICommand::getByNameImpl( const OUString& rCommandURL )
{
- osl::MutexGuard g(m_aMutex);
+ std::unique_lock g(m_aMutex);
if ( !m_bConfigAccessInitialized )
{
initializeConfigAccess();
@@ -432,7 +432,7 @@ Any ConfigurationAccess_UICommand::getInfoFromCommand( const OUString& rCommandU
Sequence< OUString > ConfigurationAccess_UICommand::getAllCommands()
{
// SAFE
- osl::MutexGuard g(m_aMutex);
+ std::unique_lock g(m_aMutex);
if ( !m_bConfigAccessInitialized )
{
@@ -523,21 +523,21 @@ void ConfigurationAccess_UICommand::initializeConfigAccess()
// container.XContainerListener
void SAL_CALL ConfigurationAccess_UICommand::elementInserted( const ContainerEvent& )
{
- osl::MutexGuard g(m_aMutex);
+ std::unique_lock g(m_aMutex);
m_bCacheFilled = false;
fillCache();
}
void SAL_CALL ConfigurationAccess_UICommand::elementRemoved( const ContainerEvent& )
{
- osl::MutexGuard g(m_aMutex);
+ std::unique_lock g(m_aMutex);
m_bCacheFilled = false;
fillCache();
}
void SAL_CALL ConfigurationAccess_UICommand::elementReplaced( const ContainerEvent& )
{
- osl::MutexGuard g(m_aMutex);
+ std::unique_lock g(m_aMutex);
m_bCacheFilled = false;
fillCache();
}
@@ -547,7 +547,7 @@ void SAL_CALL ConfigurationAccess_UICommand::disposing( const EventObject& aEven
{
// SAFE
// remove our reference to the config access
- osl::MutexGuard g(m_aMutex);
+ std::unique_lock g(m_aMutex);
Reference< XInterface > xIfac1( aEvent.Source, UNO_QUERY );
Reference< XInterface > xIfac2( m_xConfigAccess, UNO_QUERY );