diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-31 13:16:57 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-31 13:16:57 +0200 |
commit | 0da9460bf0b78e252402d98b609cd988162867b0 (patch) | |
tree | 08722fbbc86e7b3467005538d796beae861cc354 /svtools | |
parent | b95b9cc29817ab19ffd1bafacba5a54b433ab41f (diff) |
Reduce to static_cast any reinterpret_cast from void pointers
Change-Id: If4bc1b998952ff2f86124e68d108869d7749ea5b
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/misc/embedtransfer.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/transfer.cxx | 16 | ||||
-rw-r--r-- | svtools/source/uno/miscservices.cxx | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx index b6d9102872a0..b57181663cd8 100644 --- a/svtools/source/misc/embedtransfer.cxx +++ b/svtools/source/misc/embedtransfer.cxx @@ -165,7 +165,7 @@ bool SvEmbedTransferHelper::GetData( const css::datatransfer::DataFlavor& rFlavo const GDIMetaFile& aMetaFile = m_pGraphic->GetGDIMetaFile(); const_cast<GDIMetaFile*>(&aMetaFile)->Write( aMemStm ); uno::Any aAny; - aAny <<= uno::Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), + aAny <<= uno::Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ); SetAny( aAny, rFlavor ); bRet = true; diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 9de9349cfa1d..70ec0f63f94e 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -361,7 +361,7 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co if( GraphicConverter::Export( aDstStm, aGraphic, CVT_EMF ) == ERRCODE_NONE ) { - maAny <<= ( aSeq = Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aDstStm.GetData() ), + maAny <<= ( aSeq = Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ), aDstStm.Seek( STREAM_SEEK_TO_END ) ) ); bDone = true; } @@ -391,7 +391,7 @@ Any SAL_CALL TransferableHelper::getTransferData2( const DataFlavor& rFlavor, co // taking wmf without file header if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, NULL, false ) ) { - maAny <<= ( aSeq = Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aDstStm.GetData() ), + maAny <<= ( aSeq = Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aDstStm.GetData() ), aDstStm.Seek( STREAM_SEEK_TO_END ) ) ); bDone = true; } @@ -769,7 +769,7 @@ bool TransferableHelper::SetBitmapEx( const BitmapEx& rBitmapEx, const DataFlavo //} } - maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ); + maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ); } return( maAny.hasValue() ); @@ -784,7 +784,7 @@ bool TransferableHelper::SetGDIMetaFile( const GDIMetaFile& rMtf, const DataFlav SvMemoryStream aMemStm( 65535, 65535 ); ( (GDIMetaFile&) rMtf ).Write( aMemStm ); - maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ); + maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ); } return( maAny.hasValue() ); @@ -801,7 +801,7 @@ bool TransferableHelper::SetGraphic( const Graphic& rGraphic, const DataFlavor& aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 ); aMemStm.SetCompressMode( SvStreamCompressFlags::NATIVE ); WriteGraphic( aMemStm, rGraphic ); - maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ); + maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ); } return( maAny.hasValue() ); @@ -815,7 +815,7 @@ bool TransferableHelper::SetImageMap( const ImageMap& rIMap, const ::com::sun::s aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 ); rIMap.Write( aMemStm, OUString() ); - maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ); + maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ); return( maAny.hasValue() ); } @@ -830,7 +830,7 @@ bool TransferableHelper::SetTransferableObjectDescriptor( const TransferableObje SvMemoryStream aMemStm( 1024, 1024 ); WriteTransferableObjectDescriptor( aMemStm, rDesc ); - maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Tell() ); + maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Tell() ); return( maAny.hasValue() ); } @@ -935,7 +935,7 @@ bool TransferableHelper::SetINetImage( const INetImage& rINtImg, aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 ); rINtImg.Write( aMemStm, SotExchange::GetFormat( rFlavor ) ); - maAny <<= Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ); + maAny <<= Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemStm.GetData() ), aMemStm.Seek( STREAM_SEEK_TO_END ) ); return( maAny.hasValue() ); } diff --git a/svtools/source/uno/miscservices.cxx b/svtools/source/uno/miscservices.cxx index 3801ce783aff..26a2d7d39070 100644 --- a/svtools/source/uno/miscservices.cxx +++ b/svtools/source/uno/miscservices.cxx @@ -62,7 +62,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svt_component_getFactory( void * pResult = 0; if (_pServiceManager) { - Reference< XMultiServiceFactory > xSMgr(reinterpret_cast< XMultiServiceFactory * >(_pServiceManager)); + Reference< XMultiServiceFactory > xSMgr(static_cast< XMultiServiceFactory * >(_pServiceManager)); pResult = cppu::component_getFactoryHelper(pImplementationName, _pServiceManager, |