diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2018-10-11 18:49:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-15 07:56:42 +0200 |
commit | 9ec8bf8f22fe74884185492ef2576ce79b41e4f1 (patch) | |
tree | 0b162c71c51a55125a2ce6055632d4f96180f431 /sw/source/filter/ww8/wrtww8.cxx | |
parent | a84e3df74eecc8778e3d5be5dd80ad4ddb511edf (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8/wrtww8.cxx')
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index c6dda312b4b1..ca6c7dc4db8f 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3122,8 +3122,7 @@ namespace ErrCode EncryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut) { - rIn.Seek(STREAM_SEEK_TO_END); - sal_uLong nLen = rIn.Tell(); + sal_uLong nLen = rIn.TellEnd(); rIn.Seek(0); sal_uInt8 in[WW_BLOCKSIZE]; @@ -3793,8 +3792,7 @@ void WW8Export::RestoreMacroCmds() if ( pStream && ERRCODE_NONE == pStream->GetError()) { - pStream->Seek(STREAM_SEEK_TO_END); - pFib->m_lcbCmds = pStream->Tell(); + pFib->m_lcbCmds = pStream->TellEnd(); pStream->Seek(0); std::unique_ptr<sal_uInt8[]> pBuffer( new sal_uInt8[pFib->m_lcbCmds] ); |