summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-11-03 13:01:06 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-11-03 18:32:28 +0100
commitbe63419810cd6f418d33ef1b7724ba32e867e52b (patch)
tree82f28f263b2ef9205825e8f12ba71b62429f89fb /sfx2
parent57e0b4344111431e0a26622920b35dfc7d9e8ff8 (diff)
qa: remove duplicated code
Change-Id: I13da5ca9d07131a340dcf95ca0b980d75ca6e9d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142229 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/qa/cppunit/test_misc.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx
index 652533db4551..212dc1aea5bf 100644
--- a/sfx2/qa/cppunit/test_misc.cxx
+++ b/sfx2/qa/cppunit/test_misc.cxx
@@ -76,11 +76,7 @@ CPPUNIT_TEST_FIXTURE(MiscTest, testODFCustomMetadata)
xProps->storeToMedium(aTempFile.GetURL(), mimeArgs);
// check that custom metadata is preserved
- uno::Reference<packages::zip::XZipFileAccess2> const xZip(
- packages::zip::ZipFileAccess::createWithURL(m_xContext, aTempFile.GetURL()));
- uno::Reference<io::XInputStream> const xInputStream(xZip->getByName("meta.xml"), uno::UNO_QUERY);
- std::unique_ptr<SvStream> const pStream(utl::UcbStreamHelper::CreateStream(xInputStream, true));
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "meta.xml");
assertXPathContent(pXmlDoc, "/office:document-meta/office:meta/bork", "bork");
assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar", 1);
assertXPath(pXmlDoc, "/office:document-meta/office:meta/foo:bar/baz:foo", 1);