diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-07-25 12:04:19 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-07-25 12:09:03 +0200 |
commit | e32a795eee3d6b2c4c4be112674d37b39d3e315f (patch) | |
tree | 4792ba7b616ef15ef3795c33674b0c51a72bbbbf /sd | |
parent | d54fdb0b1b9c8115c7766061d7d698d84c21c887 (diff) |
Revert "loplugin:unreffun"
This reverts commit eeb852ea1ecb77c2980d44075429b06e7d420c3a.
Only the function in export-tests.cxx which is now used.
Change-Id: I0751a4fd2d651676cfee42dd077b1d438a98fc92
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 459801422b64..7d1cb39c8306 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -133,6 +133,22 @@ public: reinterpret_cast<xmlChar const *>(namespaces[i].pURI)); } } + + xmlDocPtr parseExport(utl::TempFile & rTempFile, OUString const& rStreamName) + { + OUString const url(rTempFile.GetURL()); + uno::Reference<packages::zip::XZipFileAccess2> const xZipNames( + packages::zip::ZipFileAccess::createWithURL( + comphelper::getComponentContext(m_xSFactory), url)); + uno::Reference<io::XInputStream> const xInputStream( + xZipNames->getByName(rStreamName), uno::UNO_QUERY); + std::unique_ptr<SvStream> const pStream( + utl::UcbStreamHelper::CreateStream(xInputStream, true)); + xmlDocPtr const pXmlDoc = parseXmlStream(pStream.get()); + pXmlDoc->name = reinterpret_cast<char *>(xmlStrdup( + reinterpret_cast<xmlChar const *>(OUStringToOString(url, RTL_TEXTENCODING_UTF8).getStr()))); + return pXmlDoc; + } }; void SdExportTest::testN821567() |