diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-14 16:56:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-16 14:19:19 +0000 |
commit | 5eab3e5eec67ad97f39f792852e88003fea89d1c (patch) | |
tree | 464308340f1ba6a803b3173e4a20d2320ae4c3a7 /embeddedobj/source/msole/graphconvert.cxx | |
parent | 3b658759c945a5e2da7b2c6acfdecc9c3d9c6a34 (diff) |
clang-cl loplugin: embeddedobj
Change-Id: Id8359ff2bc2ae177837f5c58f949d40b818a8684
Reviewed-on: https://gerrit.libreoffice.org/29869
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'embeddedobj/source/msole/graphconvert.cxx')
-rw-r--r-- | embeddedobj/source/msole/graphconvert.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/embeddedobj/source/msole/graphconvert.cxx b/embeddedobj/source/msole/graphconvert.cxx index d6c93eb45e28..e7d4848c4823 100644 --- a/embeddedobj/source/msole/graphconvert.cxx +++ b/embeddedobj/source/msole/graphconvert.cxx @@ -34,6 +34,7 @@ #include <tools/stream.hxx> #include <vcl/graphicfilter.hxx> +#include <graphconvert.hxx> #include "mtnotification.hxx" #include "oleembobj.hxx" @@ -41,7 +42,7 @@ using namespace ::com::sun::star; -sal_Bool ConvertBufferToFormat( void* pBuf, +bool ConvertBufferToFormat( void* pBuf, sal_uInt32 nBufSize, const OUString& aMimeType, uno::Any& aResult ) @@ -56,11 +57,11 @@ sal_Bool ConvertBufferToFormat( void* pBuf, if (rFilter.CanImportGraphic(OUString(), aMemoryStream, GRFILTER_FORMAT_DONTKNOW, &nRetFormat) == GRFILTER_OK && rFilter.GetImportFormatMediaType(nRetFormat) == aMimeType) { - aResult <<= uno::Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aMemoryStream.GetData() ), aMemoryStream.Seek( STREAM_SEEK_TO_END ) ); - return sal_True; + aResult <<= uno::Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemoryStream.GetData() ), aMemoryStream.Seek( STREAM_SEEK_TO_END ) ); + return true; } - uno::Sequence < sal_Int8 > aData( (sal_Int8*)pBuf, nBufSize ); + uno::Sequence < sal_Int8 > aData( static_cast<sal_Int8*>(pBuf), nBufSize ); uno::Reference < io::XInputStream > xIn = new comphelper::SequenceInputStream( aData ); try { @@ -80,15 +81,15 @@ sal_Bool ConvertBufferToFormat( void* pBuf, aOutMediaProperties[1].Value <<= aMimeType; xGraphicProvider->storeGraphic( xGraphic, aOutMediaProperties ); - aResult <<= uno::Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aNewStream.GetData() ), aNewStream.Seek( STREAM_SEEK_TO_END ) ); - return sal_True; + aResult <<= uno::Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aNewStream.GetData() ), aNewStream.Seek( STREAM_SEEK_TO_END ) ); + return true; } } catch (const uno::Exception&) {} } - return sal_False; + return false; } @@ -116,7 +117,7 @@ void SAL_CALL MainThreadNotificationRequest::notify (const uno::Any& ) throw (un else if ( m_nAspect == embed::Aspects::MSOLE_CONTENT ) m_pObject->OnViewChanged_Impl(); else if ( m_nAspect == embed::Aspects::MSOLE_ICON ) - m_pObject->OnIconChanged_Impl(); + OleEmbeddedObject::OnIconChanged_Impl(); } } catch( const uno::Exception& ) |