summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-02-17 08:40:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-17 07:33:24 +0000
commitcf4e1e0bb8145ed1feccc7c916b60cb394a2ee92 (patch)
treed85d718cb388b6bf7b647848ad5d4531f21a804b /package
parentf8dc080dd021e352054d41b3c3f34e46028ecf5a (diff)
osl::Mutex->std::mutex in OHierarchyElement_Impl
Change-Id: I458cab160f337019402659b5fb738ba85f73ea1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'package')
-rw-r--r--package/source/xstor/ohierarchyholder.cxx12
-rw-r--r--package/source/xstor/ohierarchyholder.hxx4
2 files changed, 8 insertions, 8 deletions
diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx
index 209136bcdf36..eafdf4a567f4 100644
--- a/package/source/xstor/ohierarchyholder.cxx
+++ b/package/source/xstor/ohierarchyholder.cxx
@@ -80,7 +80,7 @@ std::vector<OUString> OHierarchyHolder_Impl::GetListPathFromString( std::u16stri
uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStreamHierarchically( sal_Int32 nStorageMode, std::vector<OUString>& aListPath, sal_Int32 nStreamMode, const ::comphelper::SequenceAsHashMap& aEncryptionData )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::unique_lock aGuard( m_aMutex );
if ( !( nStorageMode & embed::ElementModes::WRITE ) && ( nStreamMode & embed::ElementModes::WRITE ) )
throw io::IOException("invalid storage/stream mode combo");
@@ -162,7 +162,7 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea
void OHierarchyElement_Impl::RemoveStreamHierarchically( std::vector<OUString>& aListPath )
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::unique_lock aGuard( m_aMutex );
if ( aListPath.empty() )
throw uno::RuntimeException();
@@ -211,7 +211,7 @@ void OHierarchyElement_Impl::Commit()
uno::Reference< embed::XStorage > xOwnStor;
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::unique_lock aGuard( m_aMutex );
aParent = m_rParent;
xOwnStor = m_xOwnStorage;
}
@@ -229,7 +229,7 @@ void OHierarchyElement_Impl::TestForClosing()
{
::rtl::Reference< OHierarchyElement_Impl > xKeepAlive( this );
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::unique_lock aGuard( m_aMutex );
if ( m_aOpenStreams.empty() && m_aChildren.empty() )
{
@@ -259,7 +259,7 @@ void SAL_CALL OHierarchyElement_Impl::disposing( const lang::EventObject& Source
try
{
{
- osl::MutexGuard aGuard(m_aMutex);
+ std::unique_lock aGuard(m_aMutex);
uno::Reference< embed::XExtendedStorageStream > xStream(Source.Source, uno::UNO_QUERY);
m_aOpenStreams.erase(std::remove_if(m_aOpenStreams.begin(), m_aOpenStreams.end(),
@@ -281,7 +281,7 @@ void SAL_CALL OHierarchyElement_Impl::disposing( const lang::EventObject& Source
void OHierarchyElement_Impl::RemoveElement( const ::rtl::Reference< OHierarchyElement_Impl >& aRef )
{
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ std::unique_lock aGuard( m_aMutex );
OHierarchyElementList_Impl::iterator aIter = m_aChildren.begin();
while (aIter != m_aChildren.end())
{
diff --git a/package/source/xstor/ohierarchyholder.hxx b/package/source/xstor/ohierarchyholder.hxx
index e88632fdbb1d..c3ceddabd1b1 100644
--- a/package/source/xstor/ohierarchyholder.hxx
+++ b/package/source/xstor/ohierarchyholder.hxx
@@ -29,7 +29,7 @@
#include <comphelper/sequenceashashmap.hxx>
#include <rtl/ref.hxx>
-
+#include <mutex>
#include <unordered_map>
#include <utility>
#include <vector>
@@ -44,7 +44,7 @@ typedef ::std::vector< css::uno::WeakReference< css::embed::XExtendedStorageStre
class OHierarchyElement_Impl : public cppu::WeakImplHelper< css::embed::XTransactionListener >
{
- ::osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
::rtl::Reference< OHierarchyElement_Impl > m_rParent;
css::uno::Reference< css::embed::XStorage > m_xOwnStorage;