summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-07-19 22:22:15 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-07-19 22:22:40 +0200
commit83da521ee211bbc7426b4f7f0a3acb033d9d7680 (patch)
tree547984f5190636692b50e582c02bd6916bf5894a /sc
parente674cd3f77ed8cf3aebf8008236188316192ddd6 (diff)
one more simplification
Change-Id: I9aaf67872dde324f403598a7361cd4eda60b82b0
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/helper/xpath.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/sc/qa/unit/helper/xpath.cxx b/sc/qa/unit/helper/xpath.cxx
index 59955ff17c91..c90b7c0b74b1 100644
--- a/sc/qa/unit/helper/xpath.cxx
+++ b/sc/qa/unit/helper/xpath.cxx
@@ -15,6 +15,8 @@
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <test/xmltesttools.hxx>
+
#include <com/sun/star/packages/zip/ZipFileAccess.hpp>
xmlDocPtr XPathHelper::parseExport(ScDocShell* pShell, uno::Reference<lang::XMultiServiceFactory> xSFactory, const OUString& rFile, sal_Int32 nFormat)
@@ -26,18 +28,8 @@ xmlDocPtr XPathHelper::parseExport(ScDocShell* pShell, uno::Reference<lang::XMul
uno::Reference<io::XInputStream> xInputStream(xNameAccess->getByName(rFile), uno::UNO_QUERY);
CPPUNIT_ASSERT(xInputStream.is());
boost::shared_ptr<SvStream> pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
- sal_uInt64 const nSize = pStream->remainingSize();
- OStringBuffer aDocument(nSize);
- char ch;
- for (sal_Size i = 0; i < nSize; ++i)
- {
- pStream->ReadChar( ch );
- aDocument.append(ch);
- }
- CPPUNIT_ASSERT(!aDocument.isEmpty());
-
- // Parse the XML.
- return xmlParseMemory((const char*)aDocument.getStr(), aDocument.getLength());
+
+ return XmlTestTools::parseXmlStream(pStream.get());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */