summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-12-18 20:07:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-12-20 17:52:30 +0100
commita08f3b10550761d637d27f5d88d554bd949417df (patch)
treef7527e6ddc513bd8d050d54940b6715f21c46c3f /framework
parent361b1aaae1d69a642e2735c862d4fe9243ea4646 (diff)
osl::Mutex->std::mutex in GlobalImageList
Change-Id: I12b3074e77e67bfd0914f74d71ad2dace8d1ac21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127107 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index ae8a5b310fcc..a847ee35ff68 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -85,15 +85,15 @@ namespace framework
static GlobalImageList* pGlobalImageList = nullptr;
-static osl::Mutex& getGlobalImageListMutex()
+static std::mutex& getGlobalImageListMutex()
{
- static osl::Mutex mutex;
+ static std::mutex mutex;
return mutex;
}
static GlobalImageList* getGlobalImageList( const uno::Reference< uno::XComponentContext >& rxContext )
{
- osl::MutexGuard guard( getGlobalImageListMutex() );
+ std::unique_lock guard( getGlobalImageListMutex() );
if ( pGlobalImageList == nullptr )
pGlobalImageList = new GlobalImageList( rxContext );
@@ -183,26 +183,26 @@ GlobalImageList::GlobalImageList( const uno::Reference< uno::XComponentContext >
GlobalImageList::~GlobalImageList()
{
- osl::MutexGuard guard( getGlobalImageListMutex() );
+ std::unique_lock guard( getGlobalImageListMutex() );
// remove global pointer as we destroy the object now
pGlobalImageList = nullptr;
}
Image GlobalImageList::getImageFromCommandURL( vcl::ImageType nImageType, const OUString& rCommandURL )
{
- osl::MutexGuard guard( getGlobalImageListMutex() );
+ std::unique_lock guard( getGlobalImageListMutex() );
return CmdImageList::getImageFromCommandURL( nImageType, rCommandURL );
}
bool GlobalImageList::hasImage( vcl::ImageType nImageType, const OUString& rCommandURL )
{
- osl::MutexGuard guard( getGlobalImageListMutex() );
+ std::unique_lock guard( getGlobalImageListMutex() );
return CmdImageList::hasImage( nImageType, rCommandURL );
}
::std::vector< OUString >& GlobalImageList::getImageCommandNames()
{
- osl::MutexGuard guard( getGlobalImageListMutex() );
+ std::unique_lock guard( getGlobalImageListMutex() );
return CmdImageList::getImageCommandNames();
}