diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-11-03 09:55:06 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-11-03 13:41:14 +0100 |
commit | d40d64da771427423786dc62a2f4ad08cab53179 (patch) | |
tree | 74b5b460e963ede6b6ecdccaed9cf2c577c7a69c /sd | |
parent | beceac5e0a2075696bbb267830ee952ade18da89 (diff) |
swmodeltestbase: remove duplicated code
parseExportStream is already in MacrosTest
Change-Id: Ibde88b176db1521966b6877bda90e06c278c397d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142218
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/filter/eppt/eppt.cxx | 6 | ||||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml1.cxx | 4 | ||||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml3.cxx | 6 | ||||
-rw-r--r-- | sd/qa/unit/sdmodeltestbase.hxx | 2 |
4 files changed, 11 insertions, 7 deletions
diff --git a/sd/qa/filter/eppt/eppt.cxx b/sd/qa/filter/eppt/eppt.cxx index 9b853b058044..eddc93a36668 100644 --- a/sd/qa/filter/eppt/eppt.cxx +++ b/sd/qa/filter/eppt/eppt.cxx @@ -83,7 +83,8 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeExport) utl::TempFileNamed aTempFile = save("Impress Office Open XML"); // Then verify that this color is not lost: - std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "ppt/theme/theme1.xml"); + std::unique_ptr<SvStream> pStream + = parseExportStream(aTempFile.GetURL(), "ppt/theme/theme1.xml"); xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get()); assertXPath(pXmlDoc, "//a:clrScheme/a:lt1/a:srgbClr", "val", "000002"); // Without the fix in place, this test would have failed with: @@ -102,7 +103,8 @@ CPPUNIT_TEST_FIXTURE(Test, testLoopingFromAnimation) utl::TempFileNamed aTempFile = save("Impress Office Open XML"); // Then make sure that the "infinite" repeat count is written: - std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "ppt/slides/slide1.xml"); + std::unique_ptr<SvStream> pStream + = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml"); xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get()); // Without the fix in place, this test would have failed with: // - Expected: 1 diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index a9bec3abfd8e..1ca36d3d07af 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -1306,7 +1306,7 @@ void SdOOXMLExportTest1::testCustomXml() assertXPath(pRelsDoc, "/rels:Relationships/rels:Relationship[@Id='rId1']", "Target", "itemProps1.xml"); - std::unique_ptr<SvStream> pStream = parseExportStream(tempFile, "ddp/ddpfile.xen"); + std::unique_ptr<SvStream> pStream = parseExportStream(tempFile.GetURL(), "ddp/ddpfile.xen"); CPPUNIT_ASSERT(pStream); } @@ -1641,7 +1641,7 @@ void SdOOXMLExportTest1::testNarrationMimeType() // Something like ppt/media/image2.png. OUString aImageRelName; CPPUNIT_ASSERT(aImageAbsName.startsWith("file:///", &aImageRelName)); - std::unique_ptr<SvStream> pImageStream = parseExportStream(aTempFile, aImageRelName); + std::unique_ptr<SvStream> pImageStream = parseExportStream(aTempFile.GetURL(), aImageRelName); vcl::PngImageReader aReader(*pImageStream); BitmapEx aBitmapEx = aReader.read(); // Without the accompanying fix in place, this test would have failed with: diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx index 2f2576ed1ce6..7e76cfb9fe49 100644 --- a/sd/qa/unit/export-tests-ooxml3.cxx +++ b/sd/qa/unit/export-tests-ooxml3.cxx @@ -1072,10 +1072,12 @@ void SdOOXMLExportTest3::testTdf44223() loadFromURL(u"pptx/tdf44223.pptx"); utl::TempFileNamed tempFile = save("Impress Office Open XML"); - std::unique_ptr<SvStream> const pStream1(parseExportStream(tempFile, "ppt/media/audio1.wav")); + std::unique_ptr<SvStream> const pStream1( + parseExportStream(tempFile.GetURL(), "ppt/media/audio1.wav")); CPPUNIT_ASSERT_EQUAL(sal_uInt64(11140), pStream1->remainingSize()); - std::unique_ptr<SvStream> const pStream2(parseExportStream(tempFile, "ppt/media/audio2.wav")); + std::unique_ptr<SvStream> const pStream2( + parseExportStream(tempFile.GetURL(), "ppt/media/audio2.wav")); CPPUNIT_ASSERT_EQUAL(sal_uInt64(28074), pStream2->remainingSize()); xmlDocUniquePtr pXmlContentType = parseExport(tempFile, "[Content_Types].xml"); diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx index 191c56e52eec..094521e70bff 100644 --- a/sd/qa/unit/sdmodeltestbase.hxx +++ b/sd/qa/unit/sdmodeltestbase.hxx @@ -153,7 +153,7 @@ public: xmlDocUniquePtr parseExport(utl::TempFileNamed const& rTempFile, OUString const& rStreamName) { - std::unique_ptr<SvStream> const pStream(parseExportStream(rTempFile, rStreamName)); + std::unique_ptr<SvStream> const pStream(parseExportStream(rTempFile.GetURL(), rStreamName)); xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get()); return pXmlDoc; } |