summaryrefslogtreecommitdiffstats
path: root/svx/qa/unit
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 /svx/qa/unit
parentloplugin:constfields in oox (diff)
downloadcore-9ec8bf8f22fe74884185492ef2576ce79b41e4f1.tar.gz
core-9ec8bf8f22fe74884185492ef2576ce79b41e4f1.zip
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 'svx/qa/unit')
-rw-r--r--svx/qa/unit/xoutdev.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/svx/qa/unit/xoutdev.cxx b/svx/qa/unit/xoutdev.cxx
index c2f48fbbc5c6..90186df8e831 100644
--- a/svx/qa/unit/xoutdev.cxx
+++ b/svx/qa/unit/xoutdev.cxx
@@ -57,9 +57,7 @@ void XOutdevTest::testPdfGraphicExport()
// Assert that the output looks like a PDF.
SvStream* pStream = aTempFile.GetStream(StreamMode::READ);
- pStream->Seek(STREAM_SEEK_TO_END);
- CPPUNIT_ASSERT(pStream->Tell() > 5);
- pStream->Seek(STREAM_SEEK_TO_BEGIN);
+ CPPUNIT_ASSERT(pStream->TellEnd() > 5);
sal_uInt8 sFirstBytes[5];
pStream->ReadBytes(sFirstBytes, 5);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt8>('%'), sFirstBytes[0]);