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 --- drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drawinglayer') diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 87c688d64082..3d956cfa5c93 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -349,7 +349,7 @@ namespace drawinglayer SvMemoryStream aMemStm; WriteSvtGraphicFill( aMemStm, *pSvtGraphicFill ); - mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const sal_uInt8* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); + mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const sal_uInt8* >(aMemStm.GetData()), aMemStm.TellEnd())); mnSvtGraphicFillCount++; } } @@ -536,7 +536,7 @@ namespace drawinglayer SvMemoryStream aMemStm; WriteSvtGraphicStroke( aMemStm, *pSvtGraphicStroke ); - mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const sal_uInt8* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); + mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const sal_uInt8* >(aMemStm.GetData()), aMemStm.TellEnd())); mnSvtGraphicStrokeCount++; } } -- cgit