summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-11-03 09:55:06 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-11-03 13:41:14 +0100
commitd40d64da771427423786dc62a2f4ad08cab53179 (patch)
tree74b5b460e963ede6b6ecdccaed9cf2c577c7a69c /xmloff
parentbeceac5e0a2075696bbb267830ee952ade18da89 (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 'xmloff')
-rw-r--r--xmloff/qa/unit/draw.cxx12
-rw-r--r--xmloff/qa/unit/style.cxx12
-rw-r--r--xmloff/qa/unit/text.cxx24
3 files changed, 24 insertions, 24 deletions
diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx
index b13109900a41..d5c5ab0bdced 100644
--- a/xmloff/qa/unit/draw.cxx
+++ b/xmloff/qa/unit/draw.cxx
@@ -125,7 +125,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testThemeExport)
utl::TempFileNamed aTempFile = save("impress8");
// Check if the 12 colors are written in the XML:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "styles.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "styles.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 12
@@ -164,7 +164,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testVideoSnapshot)
// Execute ODP export:
utl::TempFileNamed aTempFile = save("impress8");
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Check that the preview was exported:
// Without the accompanying fix in place, this test would have failed with:
@@ -207,7 +207,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testReferToTheme)
utl::TempFileNamed aTempFile = save("impress8");
// Make sure the export result has the theme reference:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//style:style[@style:name='T1']/style:text-properties' no attribute 'theme-color' exist
@@ -318,7 +318,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionMetalTypeExtended)
utl::TempFileNamed aTempFile = save("writer8");
// assert XML.
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
assertXPath(pXmlDoc, "//draw:enhanced-geometry", "extrusion-metal", "true");
assertXPath(pXmlDoc,
@@ -342,7 +342,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionMetalTypeStrict)
utl::TempFileNamed aTempFile = save("writer8");
// assert XML.
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
assertXPath(pXmlDoc, "//draw:enhanced-geometry", "extrusion-metal", "true");
assertXPath(pXmlDoc, "//draw:enhanced-geometry[@loext:extrusion-metal-type]", 0);
@@ -381,7 +381,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionSpecularityExtended)
utl::TempFileNamed aTempFile = save("writer8");
// assert XML.
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
assertXPath(pXmlDoc, "//draw:enhanced-geometry[@draw:extrusion-specularity='100%']");
assertXPath(pXmlDoc,
diff --git a/xmloff/qa/unit/style.cxx b/xmloff/qa/unit/style.cxx
index 016c5d6bb5ed..aeaf9f20866f 100644
--- a/xmloff/qa/unit/style.cxx
+++ b/xmloff/qa/unit/style.cxx
@@ -191,7 +191,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testWritingModeBTLR)
utl::TempFileNamed aTempFile = save("writer8");
// With applied fix for tdf150407 still loext:writing-mode="bt-lr" has to be written.
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "styles.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "styles.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
assertXPath(pXmlDoc,
"/office:document-styles/office:styles/style:style[@style:name='FrameBTLR']/"
@@ -213,7 +213,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testWritingModeBTLR)
// Without the fix an faulty 'writing-mode="bt-lr"' attribute was written in productive build.
// A debug build fails assertion in SvXMLNamespaceMap::GetQNameByKey().
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "styles.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "styles.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
assertXPathNoAttribute(pXmlDoc,
"/office:document-styles/office:styles/"
@@ -247,7 +247,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelBottomMargin)
// With applied fix for tdf150407 still loext:vertical-rel="page-content-bottom" has to be
// written.
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
assertXPath(
pXmlDoc,
@@ -271,7 +271,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelBottomMargin)
// Without the fix an faulty 'vertical-rel="page-content-bottom"' attribute was written in
// productive build. A debug build fails assertion in SvXMLNamespaceMap::GetQNameByKey().
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
assertXPathNoAttribute(pXmlDoc,
"/office:document-content/office:automatic-styles/"
@@ -305,7 +305,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelTopMargin)
// With applied fix for tdf150407 still loext:vertical-rel="page-content-top has to be
// written.
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
assertXPath(
pXmlDoc,
@@ -329,7 +329,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPosRelTopMargin)
// Without the fix an faulty 'vertical-rel="page-content-top"' attribute was written in
// productive build. A debug build fails assertion in SvXMLNamespaceMap::GetQNameByKey().
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
assertXPathNoAttribute(pXmlDoc,
"/office:document-content/office:automatic-styles/"
diff --git a/xmloff/qa/unit/text.cxx b/xmloff/qa/unit/text.cxx
index 99bb4c1a2910..bb86c8df35d4 100644
--- a/xmloff/qa/unit/text.cxx
+++ b/xmloff/qa/unit/text.cxx
@@ -216,7 +216,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testListId)
xStorable->storeToURL(aTempFile.GetURL(), aStoreProps);
// Then make sure that unreferenced xml:id="..." attributes are not written:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Without the accompanying fix in place, this failed with:
// - XPath '//text:list' unexpected 'id' attribute
@@ -244,7 +244,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testClearingBreakExport)
utl::TempFileNamed aTempFile = save("writer8");
// Then make sure the expected markup is used:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Without the accompanying fix in place, this failed with:
// - XPath '//text:line-break' number of nodes is incorrect
@@ -318,7 +318,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testRelativeWidth)
aTempFile.EnableKillingFile();
xStorable->storeToURL(aTempFile.GetURL(), aStoreProps);
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Without the accompanying fix in place, this failed with:
// - Expected: 3.1492in (8cm)
@@ -356,7 +356,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testScaleWidthAndHeight)
xStorable->storeToURL(aTempFile.GetURL(), aStoreProps);
// Then make sure that we still export a non-zero size:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Without the accompanying fix in place, this failed with:
// - Expected: 0.7874in
@@ -386,7 +386,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testContentControlExport)
utl::TempFileNamed aTempFile = save("writer8");
// Then make sure the expected markup is used:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Without the accompanying fix in place, this failed with:
// - XPath '//loext:content-control' number of nodes is incorrect
@@ -449,7 +449,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testCheckboxContentControlExport)
utl::TempFileNamed aTempFile = save("writer8");
// Then make sure the expected markup is used:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
assertXPath(pXmlDoc, "//loext:content-control", "checkbox", "true");
assertXPath(pXmlDoc, "//loext:content-control", "checked", "true");
@@ -536,7 +536,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDropdownContentControlExport)
utl::TempFileNamed aTempFile = save("writer8");
// Then make sure the expected markup is used:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Without the accompanying fix in place, this failed with:
// - Expected: 1
@@ -621,7 +621,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPictureContentControlExport)
utl::TempFileNamed aTempFile = save("writer8");
// Then make sure the expected markup is used:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//loext:content-control' no attribute 'picture' exist
@@ -680,7 +680,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testDateContentControlExport)
utl::TempFileNamed aTempFile = save("writer8");
// Then make sure the expected markup is used:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//loext:content-control' no attribute 'date' exist
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
@@ -747,7 +747,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testPlainTextContentControlExport)
utl::TempFileNamed aTempFile = save("writer8");
// Then make sure the expected markup is used:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//loext:content-control' no attribute 'plain-text' exist
@@ -803,7 +803,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testComboBoxContentControlExport)
utl::TempFileNamed aTempFile = save("writer8");
// Then make sure the expected markup is used:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//loext:content-control' no attribute 'combobox' exist
@@ -833,7 +833,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testAliasContentControlExport)
utl::TempFileNamed aTempFile = save("writer8");
// Then make sure the expected markup is used:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile, "content.xml");
+ std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
// Without the accompanying fix in place, this test would have failed with:
// - Expression: prop