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 /sfx2/source/bastyp | |
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 'sfx2/source/bastyp')
-rw-r--r-- | sfx2/source/bastyp/sfxhtml.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx index 82b81e93b45d..e6b94f77bd71 100644 --- a/sfx2/source/bastyp/sfxhtml.cxx +++ b/sfx2/source/bastyp/sfxhtml.cxx @@ -242,11 +242,9 @@ bool SfxHTMLParser::FinishFileDownload( OUString& rStr ) if( pStream ) aStream.WriteStream( *pStream ); - aStream.Seek( STREAM_SEEK_TO_END ); - sal_uInt64 const nLen = aStream.Tell(); + sal_uInt64 const nLen = aStream.TellEnd(); aStream.Seek( 0 ); - OString sBuffer = read_uInt8s_ToOString(aStream, nLen); - rStr = OStringToOUString( sBuffer, RTL_TEXTENCODING_UTF8 ); + rStr = read_uInt8s_ToOUString(aStream, nLen, RTL_TEXTENCODING_UTF8); } pDLMedium.reset(); |