summaryrefslogtreecommitdiff
path: root/scripting/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-08-01 12:58:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-01 21:01:23 +0200
commit933cf264b29307ce5cdf489ff89f5da889f5d298 (patch)
treef92080d4450a3b8c4675676f371134b70cabb513 /scripting/source
parent86d66c60043f97fcdeb7cabd40fe86c03216655a (diff)
osl::Mutex->std::mutex in ProviderCache
Change-Id: Icf3afc783804c376fae94d0132e5040453e0d47a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119820 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting/source')
-rw-r--r--scripting/source/provider/ProviderCache.cxx6
-rw-r--r--scripting/source/provider/ProviderCache.hxx4
2 files changed, 5 insertions, 5 deletions
diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx
index 4291d811c7a8..765de8c155d0 100644
--- a/scripting/source/provider/ProviderCache.cxx
+++ b/scripting/source/provider/ProviderCache.cxx
@@ -62,7 +62,7 @@ ProviderCache::~ProviderCache()
Reference< provider::XScriptProvider >
ProviderCache::getProvider( const OUString& providerName )
{
- ::osl::Guard< osl::Mutex > aGuard( m_mutex );
+ std::lock_guard aGuard( m_mutex );
Reference< provider::XScriptProvider > provider;
ProviderDetails_hash::iterator h_it = m_hProviderDetailsCache.find( providerName );
if ( h_it != m_hProviderDetailsCache.end() )
@@ -86,7 +86,7 @@ ProviderCache::getAllProviders()
// need to create providers that haven't been created already
// so check what providers exist and what ones don't
- ::osl::Guard< osl::Mutex > aGuard( m_mutex );
+ std::lock_guard aGuard( m_mutex );
Sequence < Reference< provider::XScriptProvider > > providers ( m_hProviderDetailsCache.size() );
// should assert if size !> 0
if ( !m_hProviderDetailsCache.empty() )
@@ -132,7 +132,7 @@ ProviderCache::populateCache()
{
// wrong name in services.rdb
OUString serviceName;
- ::osl::Guard< osl::Mutex > aGuard( m_mutex );
+ std::lock_guard aGuard( m_mutex );
try
{
Reference< container::XContentEnumerationAccess > xEnumAccess( m_xMgr, UNO_QUERY_THROW );
diff --git a/scripting/source/provider/ProviderCache.hxx b/scripting/source/provider/ProviderCache.hxx
index 5e00217875a2..6b5059370c05 100644
--- a/scripting/source/provider/ProviderCache.hxx
+++ b/scripting/source/provider/ProviderCache.hxx
@@ -19,13 +19,13 @@
#pragma once
-#include <osl/mutex.hxx>
#include <rtl/ustring.hxx>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/script/provider/XScriptProvider.hpp>
+#include <mutex>
#include <unordered_map>
namespace func_provider
@@ -68,7 +68,7 @@ private:
bool isInDenyList( const OUString& serviceName );
css::uno::Sequence< OUString > m_sDenyList;
ProviderDetails_hash m_hProviderDetailsCache;
- osl::Mutex m_mutex;
+ std::mutex m_mutex;
css::uno::Sequence< css::uno::Any > m_Sctx;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
css::uno::Reference< css::lang::XMultiComponentFactory > m_xMgr;