diff options
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchydata.cxx | 17 | ||||
-rw-r--r-- | ucb/source/ucp/hierarchy/hierarchydata.hxx | 4 |
2 files changed, 7 insertions, 14 deletions
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx index bbdde5c2d1ff..3e802a4fd53d 100644 --- a/ucb/source/ucp/hierarchy/hierarchydata.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx @@ -123,7 +123,6 @@ HierarchyEntry::HierarchyEntry( bool HierarchyEntry::hasData() { - osl::Guard< osl::Mutex > aGuard( m_aMutex ); uno::Reference< container::XHierarchicalNameAccess > xRootReadAccess = getRootReadAccess(); @@ -140,8 +139,6 @@ bool HierarchyEntry::getData( HierarchyEntryData& rData ) { try { - osl::Guard< osl::Mutex > aGuard( m_aMutex ); - uno::Reference< container::XHierarchicalNameAccess > xRootReadAccess = getRootReadAccess(); @@ -242,7 +239,7 @@ bool HierarchyEntry::setData( const HierarchyEntryData& rData ) { try { - osl::Guard< osl::Mutex > aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); if ( !m_xConfigProvider.is() ) m_xConfigProvider.set( @@ -454,10 +451,10 @@ bool HierarchyEntry::setData( const HierarchyEntryData& rData ) bool HierarchyEntry::move( const OUString& rNewURL, const HierarchyEntryData& rData ) { - osl::Guard< osl::Mutex > aGuard( m_aMutex ); - OUString aNewPath = createPathFromHierarchyURL( HierarchyUri(rNewURL) ); + std::unique_lock aGuard( m_aMutex ); + if ( aNewPath == m_aPath ) return true; @@ -736,7 +733,7 @@ bool HierarchyEntry::remove() { try { - osl::Guard< osl::Mutex > aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); if ( !m_xConfigProvider.is() ) m_xConfigProvider.set( @@ -844,8 +841,6 @@ bool HierarchyEntry::remove() bool HierarchyEntry::first( iterator & it ) { - osl::Guard< osl::Mutex > aGuard( m_aMutex ); - if ( it.pos == -1 ) { // Init... @@ -912,8 +907,6 @@ bool HierarchyEntry::first( iterator & it ) bool HierarchyEntry::next( iterator& it ) { - osl::Guard< osl::Mutex > aGuard( m_aMutex ); - if ( it.pos == -1 ) return first( it ); @@ -972,7 +965,7 @@ HierarchyEntry::getRootReadAccess() { if ( !m_xRootReadAccess.is() ) { - osl::Guard< osl::Mutex > aGuard( m_aMutex ); + std::unique_lock aGuard( m_aMutex ); if ( !m_xRootReadAccess.is() ) { if ( m_bTriedToGetRootReadAccess ) diff --git a/ucb/source/ucp/hierarchy/hierarchydata.hxx b/ucb/source/ucp/hierarchy/hierarchydata.hxx index 34e24cdb6c35..e81364243d31 100644 --- a/ucb/source/ucp/hierarchy/hierarchydata.hxx +++ b/ucb/source/ucp/hierarchy/hierarchydata.hxx @@ -20,9 +20,9 @@ #pragma once #include <rtl/ustring.hxx> -#include <osl/mutex.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <mutex> namespace com::sun::star { namespace container { @@ -77,7 +77,7 @@ class HierarchyEntry OUString m_aServiceSpecifier; OUString m_aName; OUString m_aPath; - ::osl::Mutex m_aMutex; + std::mutex m_aMutex; css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Reference< css::lang::XMultiServiceFactory > m_xConfigProvider; css::uno::Reference< css::container::XHierarchicalNameAccess > |