diff options
author | Noel Grandin <noel@peralex.com> | 2015-06-29 09:15:16 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-29 09:16:18 +0200 |
commit | 371200675c2fb2fef0ac8362ebd7bf4203835440 (patch) | |
tree | f694a17d0837d052be53ae104b3390b189bb846d /package/source/xstor | |
parent | efc66942f29c0127691d30a9d4f31b684443b672 (diff) |
drop yet another reimplementation of rtl::Reference (SotMutexHolderRef)
Change-Id: I57f9dff931242405420bd45fae7ec5f13718707f
Diffstat (limited to 'package/source/xstor')
-rw-r--r-- | package/source/xstor/ocompinstream.cxx | 4 | ||||
-rw-r--r-- | package/source/xstor/ocompinstream.hxx | 2 | ||||
-rw-r--r-- | package/source/xstor/owriteablestream.cxx | 12 | ||||
-rw-r--r-- | package/source/xstor/owriteablestream.hxx | 2 | ||||
-rw-r--r-- | package/source/xstor/xstorage.cxx | 6 | ||||
-rw-r--r-- | package/source/xstor/xstorage.hxx | 14 |
6 files changed, 20 insertions, 20 deletions
diff --git a/package/source/xstor/ocompinstream.cxx b/package/source/xstor/ocompinstream.cxx index 00561849c887..c772cbe472c1 100644 --- a/package/source/xstor/ocompinstream.cxx +++ b/package/source/xstor/ocompinstream.cxx @@ -40,8 +40,8 @@ OInputCompStream::OInputCompStream( OWriteStream_Impl& aImpl, , m_bDisposed( false ) , m_nStorageType( nStorageType ) { - OSL_ENSURE( m_pImpl->m_rMutexRef.Is(), "No mutex is provided!\n" ); - if ( !m_pImpl->m_rMutexRef.Is() ) + OSL_ENSURE( m_pImpl->m_rMutexRef.is(), "No mutex is provided!\n" ); + if ( !m_pImpl->m_rMutexRef.is() ) throw uno::RuntimeException(); // just a disaster assert(m_xStream.is()); diff --git a/package/source/xstor/ocompinstream.hxx b/package/source/xstor/ocompinstream.hxx index bbc5b26d4f5d..6fb15ac550ac 100644 --- a/package/source/xstor/ocompinstream.hxx +++ b/package/source/xstor/ocompinstream.hxx @@ -42,7 +42,7 @@ class OInputCompStream : public cppu::WeakImplHelper4 < ::com::sun::star::io::XI protected: OWriteStream_Impl* m_pImpl; - SotMutexHolderRef m_rMutexRef; + rtl::Reference<SotMutexHolder> m_rMutexRef; ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > m_xStream; diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 59d8de64974a..7b106217e4e8 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -57,13 +57,13 @@ using namespace ::com::sun::star; struct WSInternalData_Impl { - SotMutexHolderRef m_rSharedMutexRef; + rtl::Reference<SotMutexHolder> m_rSharedMutexRef; ::std::unique_ptr< ::cppu::OTypeCollection> m_pTypeCollection; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenersContainer; // list of listeners sal_Int32 m_nStorageType; // the mutex reference MUST NOT be empty - WSInternalData_Impl( const SotMutexHolderRef& rMutexRef, sal_Int32 nStorageType ) + WSInternalData_Impl( const rtl::Reference<SotMutexHolder>& rMutexRef, sal_Int32 nStorageType ) : m_rSharedMutexRef( rMutexRef ) , m_pTypeCollection() , m_aListenersContainer( rMutexRef->GetMutex() ) @@ -1694,9 +1694,9 @@ OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, bool bTransacted ) , m_bTransacted( bTransacted ) { OSL_ENSURE( pImpl, "No base implementation!\n" ); - OSL_ENSURE( m_pImpl->m_rMutexRef.Is(), "No mutex!\n" ); + OSL_ENSURE( m_pImpl->m_rMutexRef.is(), "No mutex!\n" ); - if ( !m_pImpl || !m_pImpl->m_rMutexRef.Is() ) + if ( !m_pImpl || !m_pImpl->m_rMutexRef.is() ) throw uno::RuntimeException(); // just a disaster m_pData.reset(new WSInternalData_Impl(pImpl->m_rMutexRef, m_pImpl->m_nStorageType)); @@ -1710,9 +1710,9 @@ OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, uno::Reference< io::XStrea , m_bTransacted( bTransacted ) { OSL_ENSURE( pImpl && xStream.is(), "No base implementation!\n" ); - OSL_ENSURE( m_pImpl->m_rMutexRef.Is(), "No mutex!\n" ); + OSL_ENSURE( m_pImpl->m_rMutexRef.is(), "No mutex!\n" ); - if ( !m_pImpl || !m_pImpl->m_rMutexRef.Is() ) + if ( !m_pImpl || !m_pImpl->m_rMutexRef.is() ) throw uno::RuntimeException(); // just a disaster m_pData.reset(new WSInternalData_Impl(pImpl->m_rMutexRef, m_pImpl->m_nStorageType)); diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx index 2a5b1cf8def9..9da76c741388 100644 --- a/package/source/xstor/owriteablestream.hxx +++ b/package/source/xstor/owriteablestream.hxx @@ -58,7 +58,7 @@ namespace com { namespace sun { namespace star { namespace uno { struct PreCreationStruct { - SotMutexHolderRef m_rMutexRef; + const rtl::Reference<SotMutexHolder> m_rMutexRef; PreCreationStruct() : m_rMutexRef( new SotMutexHolder ) diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index daca1c31db58..ed2ae1552bee 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -68,7 +68,7 @@ typedef ::std::list< uno::WeakReference< lang::XComponent > > WeakComponentList; struct StorInternalData_Impl { - SotMutexHolderRef m_rSharedMutexRef; + rtl::Reference<SotMutexHolder> m_rSharedMutexRef; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenersContainer; // list of listeners ::std::unique_ptr< ::cppu::OTypeCollection> m_pTypeCollection; bool m_bIsRoot; @@ -82,7 +82,7 @@ struct StorInternalData_Impl ::rtl::Reference< OHierarchyHolder_Impl > m_rHierarchyHolder; // the mutex reference MUST NOT be empty - StorInternalData_Impl( const SotMutexHolderRef& rMutexRef, bool bRoot, sal_Int32 nStorageType, bool bReadOnlyWrap ) + StorInternalData_Impl( const rtl::Reference<SotMutexHolder>& rMutexRef, bool bRoot, sal_Int32 nStorageType, bool bReadOnlyWrap ) : m_rSharedMutexRef( rMutexRef ) , m_aListenersContainer( rMutexRef->GetMutex() ) , m_pTypeCollection() @@ -1902,7 +1902,7 @@ OStorage::OStorage( OStorage_Impl* pImpl, bool bReadOnlyWrap ) : m_pImpl( pImpl ) { // this call can be done only from OStorage_Impl implementation to create child storage - OSL_ENSURE( m_pImpl && m_pImpl->m_rMutexRef.Is(), "The provided pointer & mutex MUST NOT be empty!\n" ); + OSL_ENSURE( m_pImpl && m_pImpl->m_rMutexRef.is(), "The provided pointer & mutex MUST NOT be empty!\n" ); m_pData.reset(new StorInternalData_Impl( m_pImpl->m_rMutexRef, m_pImpl->m_bIsRoot, m_pImpl->m_nStorageType, bReadOnlyWrap)); diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx index d52a839a787b..6e7879f1daa8 100644 --- a/package/source/xstor/xstorage.hxx +++ b/package/source/xstor/xstorage.hxx @@ -117,19 +117,19 @@ struct OStorage_Impl { typedef std::list<StorageHolder_Impl> StorageHoldersType; - SotMutexHolderRef m_rMutexRef; + rtl::Reference<SotMutexHolder> m_rMutexRef; OStorage* m_pAntiImpl; // only valid if external references exists - StorageHoldersType m_aReadOnlyWrapList; // only valid if readonly external reference exists + StorageHoldersType m_aReadOnlyWrapList; // only valid if readonly external reference exists sal_Int32 m_nStorageMode; // open mode ( read/write/trunc/nocreate ) - bool m_bIsModified; // only modified elements will be sent to the original content - bool m_bBroadcastModified; // will be set if notification is required + bool m_bIsModified; // only modified elements will be sent to the original content + bool m_bBroadcastModified; // will be set if notification is required - bool m_bCommited; // sending the streams is coordinated by the root storage of the package + bool m_bCommited; // sending the streams is coordinated by the root storage of the package - bool m_bIsRoot; // marks this storage as root storages that manages all commits and reverts - bool m_bListCreated; + bool m_bIsRoot; // marks this storage as root storages that manages all commits and reverts + bool m_bListCreated; /// Count of registered modification listeners oslInterlockedCount m_nModifiedListenerCount; |