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 | |
parent | efc66942f29c0127691d30a9d4f31b684443b672 (diff) |
drop yet another reimplementation of rtl::Reference (SotMutexHolderRef)
Change-Id: I57f9dff931242405420bd45fae7ec5f13718707f
Diffstat (limited to 'package/source')
-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 | ||||
-rw-r--r-- | package/source/zipapi/XUnbufferedStream.cxx | 4 | ||||
-rw-r--r-- | package/source/zipapi/XUnbufferedStream.hxx | 4 | ||||
-rw-r--r-- | package/source/zipapi/ZipFile.cxx | 10 | ||||
-rw-r--r-- | package/source/zippackage/wrapstreamforshare.cxx | 4 | ||||
-rw-r--r-- | package/source/zippackage/wrapstreamforshare.hxx | 4 |
11 files changed, 33 insertions, 33 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; diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx index 7ce12a285478..3af35f9e8246 100644 --- a/package/source/zipapi/XUnbufferedStream.cxx +++ b/package/source/zipapi/XUnbufferedStream.cxx @@ -41,7 +41,7 @@ using com::sun::star::packages::zip::ZipIOException; XUnbufferedStream::XUnbufferedStream( const uno::Reference< uno::XComponentContext >& xContext, - SotMutexHolderRef aMutexHolder, + const rtl::Reference<SotMutexHolder>& aMutexHolder, ZipEntry & rEntry, Reference < XInputStream > xNewZipStream, const ::rtl::Reference< EncryptionData >& rData, @@ -49,7 +49,7 @@ XUnbufferedStream::XUnbufferedStream( bool bIsEncrypted, const OUString& aMediaType, bool bRecoveryMode ) -: maMutexHolder( aMutexHolder.Is() ? aMutexHolder : SotMutexHolderRef( new SotMutexHolder ) ) +: maMutexHolder( aMutexHolder.is() ? aMutexHolder : rtl::Reference<SotMutexHolder>( new SotMutexHolder ) ) , mxZipStream ( xNewZipStream ) , mxZipSeek ( xNewZipStream, UNO_QUERY ) , maEntry ( rEntry ) diff --git a/package/source/zipapi/XUnbufferedStream.hxx b/package/source/zipapi/XUnbufferedStream.hxx index e64728408bd4..922aa826f5e1 100644 --- a/package/source/zipapi/XUnbufferedStream.hxx +++ b/package/source/zipapi/XUnbufferedStream.hxx @@ -47,7 +47,7 @@ class XUnbufferedStream : public cppu::WeakImplHelper1 > { protected: - SotMutexHolderRef maMutexHolder; + rtl::Reference<SotMutexHolder> maMutexHolder; com::sun::star::uno::Reference < com::sun::star::io::XInputStream > mxZipStream; com::sun::star::uno::Reference < com::sun::star::io::XSeekable > mxZipSeek; @@ -66,7 +66,7 @@ protected: public: XUnbufferedStream( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext, - SotMutexHolderRef aMutexHolder, + const rtl::Reference<SotMutexHolder>& aMutexHolder, ZipEntry & rEntry, com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xNewZipStream, const ::rtl::Reference< EncryptionData >& rData, diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 71442c59dfb5..7d4b9987a82d 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -510,7 +510,7 @@ bool ZipFile::hasValidPassword ( ZipEntry & rEntry, const ::rtl::Reference< Encr } uno::Reference< XInputStream > ZipFile::createUnbufferedStream( - SotMutexHolderRef aMutexHolder, + const rtl::Reference<SotMutexHolder>& aMutexHolder, ZipEntry & rEntry, const ::rtl::Reference< EncryptionData > &rData, sal_Int8 nStreamMode, @@ -530,7 +530,7 @@ ZipEnumeration * SAL_CALL ZipFile::entries( ) uno::Reference< XInputStream > SAL_CALL ZipFile::getInputStream( ZipEntry& rEntry, const ::rtl::Reference< EncryptionData > &rData, bool bIsEncrypted, - SotMutexHolderRef aMutexHolder ) + const rtl::Reference<SotMutexHolder>& aMutexHolder ) throw(IOException, ZipException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -558,7 +558,7 @@ uno::Reference< XInputStream > SAL_CALL ZipFile::getInputStream( ZipEntry& rEntr uno::Reference< XInputStream > SAL_CALL ZipFile::getDataStream( ZipEntry& rEntry, const ::rtl::Reference< EncryptionData > &rData, bool bIsEncrypted, - SotMutexHolderRef aMutexHolder ) + const rtl::Reference<SotMutexHolder>& aMutexHolder ) throw ( packages::WrongPasswordException, IOException, ZipException, @@ -598,7 +598,7 @@ uno::Reference< XInputStream > SAL_CALL ZipFile::getDataStream( ZipEntry& rEntry uno::Reference< XInputStream > SAL_CALL ZipFile::getRawData( ZipEntry& rEntry, const ::rtl::Reference< EncryptionData >& rData, bool bIsEncrypted, - SotMutexHolderRef aMutexHolder ) + const rtl::Reference<SotMutexHolder>& aMutexHolder ) throw(IOException, ZipException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -613,7 +613,7 @@ uno::Reference< XInputStream > SAL_CALL ZipFile::getWrappedRawStream( ZipEntry& rEntry, const ::rtl::Reference< EncryptionData >& rData, const OUString& aMediaType, - SotMutexHolderRef aMutexHolder ) + const rtl::Reference<SotMutexHolder>& aMutexHolder ) throw ( packages::NoEncryptionException, IOException, ZipException, diff --git a/package/source/zippackage/wrapstreamforshare.cxx b/package/source/zippackage/wrapstreamforshare.cxx index c74e4b2de18b..50f160132e5e 100644 --- a/package/source/zippackage/wrapstreamforshare.cxx +++ b/package/source/zippackage/wrapstreamforshare.cxx @@ -30,13 +30,13 @@ using namespace ::com::sun::star; #endif WrapStreamForShare::WrapStreamForShare( const uno::Reference< io::XInputStream >& xInStream, - const SotMutexHolderRef& rMutexRef ) + const rtl::Reference<SotMutexHolder>& rMutexRef ) : m_rMutexRef( rMutexRef ) , m_xInStream( xInStream ) , m_nCurPos( 0 ) { m_xSeekable = uno::Reference< io::XSeekable >( m_xInStream, uno::UNO_QUERY ); - if ( !m_rMutexRef.Is() || !m_xInStream.is() || !m_xSeekable.is() ) + if ( !m_rMutexRef.is() || !m_xInStream.is() || !m_xSeekable.is() ) { OSL_FAIL( "Wrong initialization of wrapping stream!\n" ); throw uno::RuntimeException(THROW_WHERE ); diff --git a/package/source/zippackage/wrapstreamforshare.hxx b/package/source/zippackage/wrapstreamforshare.hxx index ebbb34b136de..79a7fe273f95 100644 --- a/package/source/zippackage/wrapstreamforshare.hxx +++ b/package/source/zippackage/wrapstreamforshare.hxx @@ -30,7 +30,7 @@ class WrapStreamForShare : public cppu::WeakImplHelper2 < ::com::sun::star::io:: , ::com::sun::star::io::XSeekable > { protected: - SotMutexHolderRef m_rMutexRef; + rtl::Reference<SotMutexHolder> m_rMutexRef; ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > m_xInStream; ::com::sun::star::uno::Reference < ::com::sun::star::io::XSeekable > m_xSeekable; @@ -38,7 +38,7 @@ protected: public: WrapStreamForShare( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream, - const SotMutexHolderRef& rMutexRef ); + const rtl::Reference<SotMutexHolder>& rMutexRef ); virtual ~WrapStreamForShare(); // XInputStream |