summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorJacek Fraczek <fraczek.jacek@gmail.com>2016-10-05 22:00:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-10 08:48:30 +0000
commitf004aa99514d385f3ee254bba735f5eaeb7d9ad8 (patch)
treeaacd5792f553b8e9cbf029cc7e0797ed0dd423fe /sot
parent728c7327bd97602a38723553ed044ea4c01d13b2 (diff)
tdf#89307: Removed SvRef::operator T*()
Conditional statements are using SvRef::Is() method. Changed static_cast<T*>(svRef<T>) 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 <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/storage.cxx4
-rw-r--r--sot/source/sdstor/ucbstorage.cxx8
2 files changed, 6 insertions, 6 deletions
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<SotStorage> 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() );
}
}
}