sw/qa/extras/inc/swmodeltestbase.hxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 492c1da6be6ed7950bb58bd860748b81b52e7264 Author: Jan Holesovsky <ke...@collabora.com> Date: Thu Apr 10 09:54:19 2014 +0200 Off by one. Compared to 4c8d29f4f26bfa30689b2b98414fe874225b9a2e, we do not have to provide 0 to mark the end. Change-Id: I3b9a3de61df48caf271cb06b27cf9cfa174dc4ed diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index 907f3c9..7a2cf9a 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. _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits