From 9ec8bf8f22fe74884185492ef2576ce79b41e4f1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 11 Oct 2018 18:49:34 +0200 Subject: add SvStream::TellEnd and simplify callsites to use it instead of the current "seek to end, find pos, seek back to original pos" pattern Change-Id: Ib5828868f73c341891efc759af8bd4695ae2f33c Reviewed-on: https://gerrit.libreoffice.org/61738 Tested-by: Jenkins Reviewed-by: Noel Grandin --- embeddedobj/source/msole/graphconvert.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'embeddedobj') diff --git a/embeddedobj/source/msole/graphconvert.cxx b/embeddedobj/source/msole/graphconvert.cxx index 7905b786cef0..f5de2b35824d 100644 --- a/embeddedobj/source/msole/graphconvert.cxx +++ b/embeddedobj/source/msole/graphconvert.cxx @@ -56,7 +56,7 @@ bool ConvertBufferToFormat( void* pBuf, if (rFilter.CanImportGraphic(OUString(), aMemoryStream, GRFILTER_FORMAT_DONTKNOW, &nRetFormat) == ERRCODE_NONE && rFilter.GetImportFormatMediaType(nRetFormat) == aMimeType) { - aResult <<= uno::Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemoryStream.GetData() ), aMemoryStream.Seek( STREAM_SEEK_TO_END ) ); + aResult <<= uno::Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aMemoryStream.GetData() ), aMemoryStream.TellEnd() ); return true; } @@ -80,7 +80,7 @@ bool ConvertBufferToFormat( void* pBuf, aOutMediaProperties[1].Value <<= aMimeType; xGraphicProvider->storeGraphic( xGraphic, aOutMediaProperties ); - aResult <<= uno::Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aNewStream.GetData() ), aNewStream.Seek( STREAM_SEEK_TO_END ) ); + aResult <<= uno::Sequence< sal_Int8 >( static_cast< const sal_Int8* >( aNewStream.GetData() ), aNewStream.TellEnd() ); return true; } } -- cgit