summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-06-19 13:52:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-06-19 18:13:52 +0200
commit7af0f1514407660a43cde90320bbe00c36c3be28 (patch)
treefbcf41d83527196920ca0a6daeffb2bce36f20cc /sw
parent8fa14ac550ddc43790b65858f18d23f522aff1f2 (diff)
use more TellEnd()
which has the potential to be more efficient than STREAM_SEEK_TO_END Change-Id: I64d84632bc4751e07309332c9dff7a02bcd507fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117496 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 6c72ed5321eb..e7e559d586a4 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -84,9 +84,8 @@ static bool SwWw8ReadScaling(tools::Long& rX, tools::Long& rY, tools::SvRef<SotS
StreamMode::STD_READ );
SotStorageStream* pS = xSrc3.get();
pS->SetEndian( SvStreamEndian::LITTLE );
- pS->Seek( STREAM_SEEK_TO_END );
- OSL_ENSURE( pS->Tell() >= 76, "+OLE-PIC-Stream is shorter than 76 Byte" );
+ OSL_ENSURE( pS->TellEnd() >= 76, "+OLE-PIC-Stream is shorter than 76 Byte" );
sal_Int32 nOrgWidth,
nOrgHeight,
@@ -406,9 +405,8 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
if (bOleOk)
{
sal_uLong nOldPos = m_pDataStream->Tell();
- m_pDataStream->Seek(STREAM_SEEK_TO_END);
SvStream *pTmpData = nullptr;
- if (m_nObjLocFc < m_pDataStream->Tell())
+ if (m_nObjLocFc < m_pDataStream->TellEnd())
{
pTmpData = m_pDataStream;
pTmpData->Seek( m_nObjLocFc );