summaryrefslogtreecommitdiff
path: root/include/tools/stream.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2018-10-11 18:49:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-15 07:56:42 +0200
commit9ec8bf8f22fe74884185492ef2576ce79b41e4f1 (patch)
tree0b162c71c51a55125a2ce6055632d4f96180f431 /include/tools/stream.hxx
parenta84e3df74eecc8778e3d5be5dd80ad4ddb511edf (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 'include/tools/stream.hxx')
-rw-r--r--include/tools/stream.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 3793094155d6..dc2c926c371e 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -273,6 +273,7 @@ public:
sal_uInt64 Seek( sal_uInt64 nPos );
sal_uInt64 SeekRel( sal_Int64 nPos );
sal_uInt64 Tell() const { return m_nBufFilePos + m_nBufActualPos; }
+ sal_uInt64 TellEnd() { return Tell() + remainingSize(); }
// length between current (Tell()) pos and end of stream
virtual sal_uInt64 remainingSize();
void Flush();