summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-04-10 09:54:19 +0200
committerJan Holesovsky <kendy@collabora.com>2014-04-10 11:03:42 +0200
commit492c1da6be6ed7950bb58bd860748b81b52e7264 (patch)
treebe5dbd1b3f8c6503bffe08a9268d28c7239906d1
parentf767d4580e455b91506cc43d11783093cead6d6c (diff)
Off by one.
Compared to 4c8d29f4f26bfa30689b2b98414fe874225b9a2e, we do not have to provide 0 to mark the end. Change-Id: I3b9a3de61df48caf271cb06b27cf9cfa174dc4ed
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 907f3c938c15..7a2cf9a438a5 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -572,11 +572,11 @@ protected:
// Read the XML stream we're interested in.
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), m_aTempFile.GetURL());
uno::Reference<io::XInputStream> xInputStream(xNameAccess->getByName(rStreamName), uno::UNO_QUERY);
+
boost::shared_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
- pStream->Seek(STREAM_SEEK_TO_END);
- sal_Size nSize = pStream->Tell();
- pStream->Seek(0);
- rtl::ByteSequence aBuffer(nSize + 1);
+ sal_Size nSize = pStream->remainingSize();
+
+ rtl::ByteSequence aBuffer(nSize);
pStream->Read(aBuffer.getArray(), nSize);
// Parse the XML.