summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2015-09-30 16:10:07 +0200
committerOliver Specht <oliver.specht@cib.de>2015-10-06 07:29:37 +0000
commit89d39bc100aabf5dccbe77c0b5c0c85736e85b39 (patch)
tree871a91210913ecee91530c95392534bf18f80f3f /sot
parent32b9901dae7403453d773f5904de15551a323595 (diff)
tdf#94559: 4th step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in idl, editeng, sc, sd, sw, sfx2, sot, starmath Change-Id: I4a5bba4fdc4829099618c09b690c83f876a3d653 Reviewed-on: https://gerrit.libreoffice.org/19132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stg.cxx4
-rw-r--r--sot/source/sdstor/storage.cxx4
-rw-r--r--sot/source/sdstor/ucbstorage.cxx10
3 files changed, 9 insertions, 9 deletions
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index 3ebd1c21a553..787c5adc3208 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -185,7 +185,7 @@ StorageStream::~StorageStream()
bool StorageStream::Equals( const BaseStorageStream& rStream ) const
{
- const StorageStream* pOther = PTR_CAST( StorageStream, &rStream );
+ const StorageStream* pOther = dynamic_cast<const StorageStream*>( &rStream );
return pOther && ( pOther->pEntry == pEntry );
}
@@ -948,7 +948,7 @@ bool Storage::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
bool Storage::Equals( const BaseStorage& rStorage ) const
{
- const Storage* pOther = PTR_CAST( Storage, &rStorage );
+ const Storage* pOther = dynamic_cast<const Storage*>( &rStorage );
return pOther && ( pOther->pEntry == pEntry );
}
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index 3a337d5e7d2a..3c86fd2c7b9b 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -275,7 +275,7 @@ bool SotStorageStream::Commit()
bool SotStorageStream::SetProperty( const OUString& rName, const ::com::sun::star::uno::Any& rValue )
{
- UCBStorageStream* pStg = PTR_CAST( UCBStorageStream, pOwnStm );
+ UCBStorageStream* pStg = dynamic_cast<UCBStorageStream*>( pOwnStm );
if ( pStg )
{
return pStg->SetProperty( rName, rValue );
@@ -807,7 +807,7 @@ bool SotStorage::Validate()
bool SotStorage::IsOLEStorage() const
{
- UCBStorage* pStg = PTR_CAST( UCBStorage, m_pOwnStg );
+ UCBStorage* pStg = dynamic_cast<UCBStorage*>( m_pOwnStg );
return !pStg;
}
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index ff7a20694e43..f85c87d38079 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1374,7 +1374,7 @@ bool UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
if( !pImp->Init() )
return false;
- UCBStorageStream* pStg = PTR_CAST( UCBStorageStream, pDestStm );
+ UCBStorageStream* pStg = dynamic_cast<UCBStorageStream*>( pDestStm );
if ( pStg )
pStg->pImp->m_aContentType = pImp->m_aContentType;
@@ -2535,8 +2535,8 @@ bool UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, Base
bDeleteStorage = true;
}
- UCBStorage* pUCBDest = PTR_CAST( UCBStorage, pDest );
- UCBStorage* pUCBCopy = PTR_CAST( UCBStorage, pStorage );
+ UCBStorage* pUCBDest = dynamic_cast<UCBStorage*>( pDest );
+ UCBStorage* pUCBCopy = dynamic_cast<UCBStorage*>( pStorage );
bool bOpenUCBStorage = pUCBDest && pUCBCopy;
std::unique_ptr<BaseStorage> pOtherStorage(bOpenUCBStorage ?
@@ -2588,7 +2588,7 @@ bool UCBStorage::CopyTo( BaseStorage* pDestStg ) const
// For UCB storages, the class id and the format id may differ,
// do passing the class id is not sufficient.
- if( pDestStg->ISA( UCBStorage ) )
+ if( dynamic_cast<const UCBStorage *>(pDestStg) != nullptr )
pDestStg->SetClass( pImp->m_aClassId, pImp->m_nFormat,
pImp->m_aUserTypeName );
else
@@ -2787,7 +2787,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const OUString& rEleName, StreamMode
if ( !pElement->m_xStream.Is() )
{
BaseStorageStream* pStr = OpenStream( rEleName, nMode, bDirect );
- UCBStorageStream* pStream = PTR_CAST( UCBStorageStream, pStr );
+ UCBStorageStream* pStream = dynamic_cast<UCBStorageStream*>( pStr );
if ( !pStream )
{
SetError( ( nMode & StreamMode::WRITE ) ? SVSTREAM_CANNOT_MAKE : SVSTREAM_FILE_NOT_FOUND );