From f004aa99514d385f3ee254bba735f5eaeb7d9ad8 Mon Sep 17 00:00:00 2001 From: Jacek Fraczek Date: Wed, 5 Oct 2016 22:00:51 +0200 Subject: tdf#89307: Removed SvRef::operator T*() Conditional statements are using SvRef::Is() method. Changed static_cast(svRef) occurances to svRef.get(). Added operator == and != to SvRef. SbxObject::Execute is using SbxVariableRef internally. SbxObject::FindQualified is using SbxVariableRef internally. Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395 Reviewed-on: https://gerrit.libreoffice.org/29621 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sot/source/sdstor/storage.cxx | 4 ++-- sot/source/sdstor/ucbstorage.cxx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sot') diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 1c3d5807726a..cba36422b3bc 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -57,7 +57,7 @@ SvLockBytesRef MakeLockBytes_Impl( const OUString & rName, StreamMode nMode ) } SotStorageStream::SotStorageStream( const OUString & rName, StreamMode nMode ) - : SvStream( MakeLockBytes_Impl( rName, nMode ) ) + : SvStream( MakeLockBytes_Impl( rName, nMode ).get() ) , pOwnStm( nullptr ) { if( nMode & StreamMode::WRITE ) @@ -466,7 +466,7 @@ SvMemoryStream * SotStorage::CreateMemoryStream() SvMemoryStream * pStm = nullptr; pStm = new SvMemoryStream( 0x8000, 0x8000 ); tools::SvRef aStg = new SotStorage( *pStm ); - if( CopyTo( aStg ) ) + if( CopyTo( aStg.get() ) ) { aStg->Commit(); } diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 7ecd607a08d9..f0555e5eeb58 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -1816,7 +1816,7 @@ void UCBStorage_Impl::ReadContent() { // older files didn't have that special content type, so they must be detected OpenStream( pElement, StreamMode::STD_READ, m_bDirect ); - if ( Storage::IsStorageFile( pElement->m_xStream ) ) + if ( Storage::IsStorageFile( pElement->m_xStream.get() ) ) pElement->m_bIsStorage = true; else pElement->m_xStream->Free(); @@ -2666,7 +2666,7 @@ BaseStorageStream* UCBStorage::OpenStream( const OUString& rEleName, StreamMode { pElement->m_xStream->PrepareCachedForReopen( nMode ); - return new UCBStorageStream( pElement->m_xStream ); + return new UCBStorageStream( pElement->m_xStream.get() ); } } } @@ -2676,7 +2676,7 @@ BaseStorageStream* UCBStorage::OpenStream( const OUString& rEleName, StreamMode // if name has been changed before creating the stream: set name! pElement->m_xStream->m_aName = rEleName; - return new UCBStorageStream( pElement->m_xStream ); + return new UCBStorageStream( pElement->m_xStream.get() ); } return nullptr; @@ -2795,7 +2795,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const OUString& rEleName, StreamMode } else { - return new UCBStorage( pElement->m_xStorage ); + return new UCBStorage( pElement->m_xStorage.get() ); } } } -- cgit