summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/qa/extras/charttest.hxx7
-rw-r--r--emfio/qa/cppunit/emf/EmfImportTest.cxx7
-rw-r--r--filter/qa/unit/svg.cxx7
-rw-r--r--include/test/unoapixml_test.hxx30
-rw-r--r--oox/qa/unit/export.cxx94
-rw-r--r--sc/qa/extras/macros-test.cxx14
-rw-r--r--sc/qa/unit/SparklineImportExportTest.cxx16
-rw-r--r--sc/qa/unit/jumbosheets-test.cxx24
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx11
-rw-r--r--sd/qa/filter/eppt/eppt.cxx15
-rw-r--r--sd/qa/unit/HtmlExportTest.cxx7
-rw-r--r--sd/qa/unit/SVGExportTests.cxx7
-rw-r--r--sd/qa/unit/ShapeImportExportTest.cxx6
-rw-r--r--sd/qa/unit/activex-controls-tests.cxx4
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx116
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx118
-rw-r--r--sd/qa/unit/export-tests-ooxml3.cxx140
-rw-r--r--sd/qa/unit/export-tests.cxx40
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx4
-rw-r--r--sd/qa/unit/import-tests.cxx4
-rw-r--r--sd/qa/unit/import-tests2.cxx4
-rw-r--r--sd/qa/unit/layout-tests.cxx7
-rw-r--r--sd/qa/unit/misc-tests.cxx29
-rw-r--r--sd/qa/unit/sdmodeltestbase.hxx29
-rw-r--r--sd/qa/unit/tiledrendering/LOKitSearchTest.cxx9
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx11
-rw-r--r--sfx2/qa/cppunit/test_misc.cxx8
-rw-r--r--svx/qa/unit/sdr.cxx7
-rw-r--r--svx/qa/unit/svdraw.cxx7
-rw-r--r--svx/qa/unit/table.cxx7
-rw-r--r--svx/qa/unit/unodraw.cxx7
-rw-r--r--test/Library_subsequenttest.mk2
-rw-r--r--test/source/unoapixml_test.cxx36
-rw-r--r--xmloff/qa/unit/draw.cxx25
-rw-r--r--xmloff/qa/unit/style.cxx25
-rw-r--r--xmloff/qa/unit/text.cxx43
36 files changed, 443 insertions, 484 deletions
diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx
index 3662027dbf07..2cacd4e43243 100644
--- a/chart2/qa/extras/charttest.hxx
+++ b/chart2/qa/extras/charttest.hxx
@@ -9,8 +9,7 @@
#pragma once
-#include <test/unoapi_test.hxx>
-#include <test/xmltesttools.hxx>
+#include <test/unoapixml_test.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
@@ -110,11 +109,11 @@ OUString findChartFile(const OUString& rDir, uno::Reference< container::XNameAcc
}
-class ChartTest : public UnoApiTest, public XmlTestTools
+class ChartTest : public UnoApiXmlTest
{
public:
ChartTest(OUString path)
- : UnoApiTest(path)
+ : UnoApiXmlTest(path)
{
}
diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index 6c1e30d57ca4..99adda32e834 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -10,8 +10,7 @@
#include <sal/config.h>
#include <config_fonts.h>
-#include <test/unoapi_test.hxx>
-#include <test/xmltesttools.hxx>
+#include <test/unoapixml_test.hxx>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
@@ -38,7 +37,7 @@ using namespace css::graphic;
using drawinglayer::primitive2d::Primitive2DSequence;
using drawinglayer::primitive2d::Primitive2DContainer;
-class Test : public UnoApiTest, public XmlTestTools
+class Test : public UnoApiXmlTest
{
const OString aXPathPrefix = "/primitive2D/metafile/transform/";
@@ -90,7 +89,7 @@ class Test : public UnoApiTest, public XmlTestTools
public:
Test()
- : UnoApiTest("/emfio/qa/cppunit/emf/data/")
+ : UnoApiXmlTest("/emfio/qa/cppunit/emf/data/")
{
}
diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx
index fc932d80793e..90de658cf50f 100644
--- a/filter/qa/unit/svg.cxx
+++ b/filter/qa/unit/svg.cxx
@@ -11,8 +11,7 @@
#include <string_view>
-#include <test/unoapi_test.hxx>
-#include <test/xmltesttools.hxx>
+#include <test/unoapixml_test.hxx>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XStorable.hpp>
@@ -28,7 +27,7 @@
using namespace ::com::sun::star;
/// SVG filter tests.
-class SvgFilterTest : public UnoApiTest, public XmlTestTools
+class SvgFilterTest : public UnoApiXmlTest
{
public:
SvgFilterTest();
@@ -36,7 +35,7 @@ public:
};
SvgFilterTest::SvgFilterTest()
- : UnoApiTest("/filter/qa/unit/data/")
+ : UnoApiXmlTest("/filter/qa/unit/data/")
{
}
diff --git a/include/test/unoapixml_test.hxx b/include/test/unoapixml_test.hxx
new file mode 100644
index 000000000000..36fb334a75cd
--- /dev/null
+++ b/include/test/unoapixml_test.hxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_TEST_UNOAPIXML_TEST_HXX
+#define INCLUDED_TEST_UNOAPIXML_TEST_HXX
+
+#include <sal/config.h>
+
+#include <test/unoapi_test.hxx>
+#include <test/xmltesttools.hxx>
+
+// basic uno api xml test class
+
+class OOO_DLLPUBLIC_TEST UnoApiXmlTest : public UnoApiTest, public XmlTestTools
+{
+public:
+ UnoApiXmlTest(OUString path);
+
+ xmlDocUniquePtr parseExport(OUString const& rTempFile, OUString const& rStreamName);
+};
+
+#endif // INCLUDED_TEST_UNOAPIXML_TEST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx
index 711b73922d91..3b01de830343 100644
--- a/oox/qa/unit/export.cxx
+++ b/oox/qa/unit/export.cxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/unoapi_test.hxx>
-#include <test/xmltesttools.hxx>
+#include <test/unoapixml_test.hxx>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XStorable.hpp>
@@ -21,11 +20,11 @@ using namespace ::com::sun::star;
namespace
{
/// Covers ooox/source/export/ fixes.
-class Test : public UnoApiTest, public XmlTestTools
+class Test : public UnoApiXmlTest
{
public:
Test()
- : UnoApiTest("/oox/qa/unit/data/")
+ : UnoApiXmlTest("/oox/qa/unit/data/")
{
}
@@ -45,8 +44,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPolylineConnectorPosition)
utl::TempFileNamed aTempFile = save("Office Open XML Text");
// Then make sure polyline and connector have the correct position.
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "word/document.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "word/document.xml");
// For child elements of groups in Writer the position has to be adapted to be relative
// to group instead of being relative to anchor. That was missing for polyline and
@@ -75,8 +73,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRotatedShapePosition)
utl::TempFileNamed aTempFile = save("Office Open XML Text");
// Then make sure the rotated child shape has the correct position.
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "word/document.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "word/document.xml");
// For a group itself and for shapes outside of groups, the position calculation is done in
// DocxSdrExport. For child elements of groups it has to be done in
@@ -99,8 +96,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDmlGroupshapePolygon)
// Then make sure that the group shape, the group shape's child size and the child shape's size
// match:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "word/document.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "word/document.xml");
assertXPath(pXmlDoc, "//wpg:grpSpPr/a:xfrm/a:ext", "cx", "5328360");
// Without the accompanying fix in place, this test would have failed, the <a:chExt> element was
// not written.
@@ -120,8 +116,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomShapeArrowExport)
utl::TempFileNamed aTempFile = save("Office Open XML Text");
// Then the shapes should retain their correct control values.
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "word/document.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "word/document.xml");
// Without the fix the output OOXML would have no <a:prstGeom> tags in it.
@@ -306,9 +301,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCameraRevolutionGrabBag)
// When saving that document:
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// Then make sure the revolution is exported without a problem:
// First shape textbox:
assertXPath(pXmlDoc, "//p:sp[1]/p:spPr/a:scene3d/a:camera/a:rot", "rev", "5400000");
@@ -333,9 +326,7 @@ CPPUNIT_TEST_FIXTURE(Test, testReferToTheme)
// When saving that document:
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// Then make sure the shape text color is a scheme color:
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
@@ -382,9 +373,7 @@ CPPUNIT_TEST_FIXTURE(Test, testReferToThemeShapeFill)
// - Actual : 0
// i.e. the <a:schemeClr> element was not written. Note that this was already working from PPTX
// files via grab-bags, so this test intentionally uses an ODP file as input.
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "//p:sp[1]/p:spPr/a:solidFill/a:schemeClr", "val", "accent1");
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//p:sp[1]/p:spPr/a:solidFill/a:schemeClr/a:lumMod' number of nodes is incorrect
@@ -401,9 +390,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146690_endParagraphRunPropertiesNewLinesTextSi
// When saving that document:
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// Make sure the text size is exported correctly:
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 500
@@ -422,9 +409,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_endsubpath)
// When saving that document:
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// Then make sure the pathLst has two child elements,
// Without the accompanying fix in place, only one element a:path was exported.
assertXPathChildren(pXmlDoc, "//a:pathLst", 2);
@@ -441,9 +426,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandA)
// When saving that document:
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// Then make sure the path has a child element arcTo. Prior to the fix that part of the curve was
// not exported at all. In odp it is a command A. Such does not exist in OOXML and is therefore
// exported as a:lnTo followed by a:arcTo
@@ -465,9 +448,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandT)
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
// Verify the markup:
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// File has draw:viewBox="0 0 216 216"
assertXPath(pXmlDoc, "//a:pathLst/a:path", "w", "216");
assertXPath(pXmlDoc, "//a:pathLst/a:path", "h", "216");
@@ -496,9 +477,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandXY)
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
// Verify the markup:
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// File has draw:viewBox="0 0 10 10"
assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "w", "10");
assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "h", "10");
@@ -532,9 +511,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandHIJK)
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
// Verify the markup:
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// File has draw:viewBox="0 0 80 80"
assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "w", "80");
assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "h", "80");
@@ -556,9 +533,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_subpath)
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
// Verify the markup:
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// File should have four subpaths with increasing path size
assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "w", "10");
assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "h", "10");
@@ -578,9 +553,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf100391TextAreaRect)
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
// Verify the markup. Without fix the values were l="l", t="t", r="r", b="b"
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "//a:custGeom/a:rect", "l", "textAreaLeft");
assertXPath(pXmlDoc, "//a:custGeom/a:rect", "t", "textAreaTop");
assertXPath(pXmlDoc, "//a:custGeom/a:rect", "r", "textAreaRight");
@@ -605,8 +578,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf109169_OctagonBevel)
utl::TempFileNamed aTempFile = save("Office Open XML Text");
// Verify the markup:
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "word/document.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "word/document.xml");
// File should have six subpaths, one with stroke and five with fill
assertXPath(pXmlDoc, "//a:pathLst/a:path[1]", "stroke", "0");
assertXPath(pXmlDoc, "//a:pathLst/a:path[2]", "fill", "darkenLess");
@@ -627,9 +599,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFaultyPathCommandsAWT)
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
// Verify the markup:
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// First child of a:path should be a moveTo in all four shapes.
assertXPath(pXmlDoc, "//p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo");
assertXPath(pXmlDoc, "//p:spTree/p:sp[2]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo");
@@ -647,9 +617,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchXY)
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
// Verify the markup.
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// x-position of last segment should be same as path width. It was 21600 without fix.
sal_Int32 nWidth
@@ -685,9 +653,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchCommandQ)
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
// Verify the markup.
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// x-position of second quadBezTo control should be same as path width. It was 21600 without fix.
sal_Int32 nWidth
@@ -726,9 +692,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchCommandVW)
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
// Verify the markup.
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// wR of first ArcTo in first shape should be same as path width/2. It was 10800 without fix.
sal_Int32 nHalfWidth
@@ -762,9 +726,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149551VertPadding)
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
// Verify the markup. The values must be the same as in the original file.
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
for (sal_Int32 i = 1; i <= 2; i++)
{
OString sElement = "//p:spTree/p:sp[" + OString::number(i) + "]/p:txBody/a:bodyPr";
@@ -786,9 +748,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149538upright)
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
// Verify the markup. The values must be the same as in the original file.
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "//p:spTree/p:sp/p:txBody/a:bodyPr", "upright", "1");
assertXPathNoAttribute(pXmlDoc, "//p:spTree/p:sp/p:txBody/a:bodyPr", "rot");
}
@@ -797,9 +757,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf151008VertAnchor)
{
loadFromURL(u"tdf151008_eaVertAnchor.pptx");
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
- std::unique_ptr<SvStream> pStream
- = parseExportStream(aTempFile.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// The order of the shapes in the file is by name "Right", "Center", "Left", "RightMiddle",
// "CenterMiddle" and "LeftMiddle". I access the shapes here by index, because the XPath is
// easier then.
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 3c8e01fbf7ff..6c9d179db336 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -8,7 +8,7 @@
*/
#include <sal/config.h>
-#include <test/unoapi_test.hxx>
+#include <test/unoapixml_test.hxx>
#include <sal/log.hxx>
#include <unotools/tempfile.hxx>
#include <svx/svdpage.hxx>
@@ -28,14 +28,12 @@
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <editeng/brushitem.hxx>
-#include <helper/xpath.hxx>
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
/* Implementation of Macros test */
-class ScMacrosTest : public UnoApiTest, public XmlTestTools
+class ScMacrosTest : public UnoApiXmlTest
{
protected:
void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override;
@@ -230,10 +228,10 @@ void ScMacrosTest::testMacroButtonFormControlXlsxExport()
loadFromURL(u"macro-button-form-control.xlsm");
// When exporting to XLSM:
- auto pTempFile = std::make_shared<utl::TempFileNamed>(save("Calc MS Excel 2007 VBA XML"));
+ utl::TempFileNamed tempFile = save("Calc MS Excel 2007 VBA XML");
// Then make sure that the macro is associated with the control:
- xmlDocUniquePtr pSheetDoc = XPathHelper::parseExport(pTempFile, m_xSFactory, "xl/worksheets/sheet1.xml");
+ xmlDocUniquePtr pSheetDoc = parseExport(tempFile.GetURL(), "xl/worksheets/sheet1.xml");
CPPUNIT_ASSERT(pSheetDoc);
// Without the fix in place, this test would have failed with:
// - XPath '//x:controlPr' no attribute 'macro' exist
@@ -242,7 +240,7 @@ void ScMacrosTest::testMacroButtonFormControlXlsxExport()
// Then also make sure that there is no defined name for the macro, which is only needed for
// XLS:
- xmlDocUniquePtr pWorkbookDoc = XPathHelper::parseExport(pTempFile, m_xSFactory, "xl/workbook.xml");
+ xmlDocUniquePtr pWorkbookDoc = parseExport(tempFile.GetURL(), "xl/workbook.xml");
CPPUNIT_ASSERT(pWorkbookDoc);
assertXPath(pWorkbookDoc, "//x:workbook/definedNames", 0);
}
@@ -901,7 +899,7 @@ void ScMacrosTest::testFunctionAccessIndirect()
}
ScMacrosTest::ScMacrosTest()
- : UnoApiTest("/sc/qa/extras/testdocuments")
+ : UnoApiXmlTest("/sc/qa/extras/testdocuments")
{
}
diff --git a/sc/qa/unit/SparklineImportExportTest.cxx b/sc/qa/unit/SparklineImportExportTest.cxx
index 4d8f9be3da5f..63302f79f361 100644
--- a/sc/qa/unit/SparklineImportExportTest.cxx
+++ b/sc/qa/unit/SparklineImportExportTest.cxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/unoapi_test.hxx>
-#include "helper/xpath.hxx"
+#include <test/unoapixml_test.hxx>
#include <com/sun/star/lang/XComponent.hpp>
#include <docsh.hxx>
@@ -18,11 +17,11 @@
using namespace css;
/** Test import, export or roundtrip of sparklines for ODF and OOXML */
-class SparklineImportExportTest : public UnoApiTest, public XmlTestTools
+class SparklineImportExportTest : public UnoApiXmlTest
{
public:
SparklineImportExportTest()
- : UnoApiTest("sc/qa/unit/data")
+ : UnoApiXmlTest("sc/qa/unit/data")
{
}
@@ -168,8 +167,8 @@ void SparklineImportExportTest::testSparklinesExportODS()
loadFromURL(u"xlsx/Sparklines.xlsx");
// Save as ODS and check content.xml with XPath
- auto pXPathFile = std::make_shared<utl::TempFileNamed>(save("calc8"));
- xmlDocUniquePtr pXmlDoc = XPathHelper::parseExport(pXPathFile, m_xSFactory, "content.xml");
+ utl::TempFileNamed tempFile = save("calc8");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
// We have 3 sparkline groups = 3 tables that contain sparklines
assertXPath(pXmlDoc, "//table:table/calcext:sparkline-groups", 3);
@@ -234,9 +233,8 @@ void SparklineImportExportTest::testNoSparklinesInDocumentXLSX()
// Load the document containing NO sparklines
loadFromURL(u"xlsx/empty.xlsx");
- auto pXPathFile = std::make_shared<utl::TempFileNamed>(save("Calc Office Open XML"));
- xmlDocUniquePtr pXmlDoc
- = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/worksheets/sheet1.xml");
+ utl::TempFileNamed tempFile = save("Calc Office Open XML");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "xl/worksheets/sheet1.xml");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/x:worksheet", 1);
diff --git a/sc/qa/unit/jumbosheets-test.cxx b/sc/qa/unit/jumbosheets-test.cxx
index 1cf820895ed5..d6470f3ebe1d 100644
--- a/sc/qa/unit/jumbosheets-test.cxx
+++ b/sc/qa/unit/jumbosheets-test.cxx
@@ -8,7 +8,7 @@
*/
#include <sal/config.h>
-#include <test/unoapi_test.hxx>
+#include <test/unoapixml_test.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <vcl/scheduler.hxx>
#include <vcl/keycodes.hxx>
@@ -16,7 +16,6 @@
#include <comphelper/propertyvalue.hxx>
#include <svx/svdoole2.hxx>
#include <svx/svdpage.hxx>
-#include <test/xmltesttools.hxx>
#include <docsh.hxx>
#include <defaultsoptions.hxx>
@@ -26,14 +25,12 @@
#include <com/sun/star/frame/Desktop.hpp>
#include <scdll.hxx>
-#include "helper/xpath.hxx"
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
/* Tests for sheets larger than 1024 columns and/or 1048576 rows. */
-class ScJumboSheetsTest : public UnoApiTest, public XmlTestTools
+class ScJumboSheetsTest : public UnoApiXmlTest
{
public:
ScJumboSheetsTest();
@@ -132,7 +129,7 @@ void ScJumboSheetsTest::testRoundtripColumnRangeOds()
CPPUNIT_ASSERT_EQUAL(OUString("=SUM(C:C)"), pDoc->GetFormula(1, 0, 0));
}
- auto pExportedFile = std::make_shared<utl::TempFileNamed>(saveAndReload("calc8"));
+ utl::TempFileNamed tempFile = saveAndReload("calc8");
{
ScModelObj* pModelObj = dynamic_cast<ScModelObj*>(mxComponent.get());
CPPUNIT_ASSERT(pModelObj);
@@ -140,8 +137,7 @@ void ScJumboSheetsTest::testRoundtripColumnRangeOds()
ScDocument* pDoc = pModelObj->GetDocument();
CPPUNIT_ASSERT_EQUAL(OUString("=SUM(2:2)"), pDoc->GetFormula(0, 0, 0));
CPPUNIT_ASSERT_EQUAL(OUString("=SUM(C:C)"), pDoc->GetFormula(1, 0, 0));
- xmlDocUniquePtr pXmlDoc
- = XPathHelper::parseExport(pExportedFile, m_xSFactory, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc,
"/office:document-content/office:body/office:spreadsheet/table:table/"
@@ -157,8 +153,7 @@ void ScJumboSheetsTest::testRoundtripColumnRangeOds()
void ScJumboSheetsTest::testRoundtripColumnRangeXlsx()
{
loadFromURL(u"ods/sum-whole-column-row.ods");
- auto pExportedFile
- = std::make_shared<utl::TempFileNamed>(saveAndReload("Calc Office Open XML"));
+ utl::TempFileNamed tempFile = saveAndReload("Calc Office Open XML");
{
ScModelObj* pModelObj = dynamic_cast<ScModelObj*>(mxComponent.get());
CPPUNIT_ASSERT(pModelObj);
@@ -166,8 +161,7 @@ void ScJumboSheetsTest::testRoundtripColumnRangeXlsx()
ScDocument* pDoc = pModelObj->GetDocument();
CPPUNIT_ASSERT_EQUAL(OUString("=SUM(2:2)"), pDoc->GetFormula(0, 0, 0));
CPPUNIT_ASSERT_EQUAL(OUString("=SUM(C:C)"), pDoc->GetFormula(1, 0, 0));
- xmlDocUniquePtr pXmlDoc
- = XPathHelper::parseExport(pExportedFile, m_xSFactory, "xl/worksheets/sheet1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "xl/worksheets/sheet1.xml");
CPPUNIT_ASSERT(pXmlDoc);
assertXPathContent(pXmlDoc, "/x:worksheet/x:sheetData/x:row[1]/x:c[1]/x:f", "SUM(2:2)");
assertXPathContent(pXmlDoc, "/x:worksheet/x:sheetData/x:row[1]/x:c[2]/x:f", "SUM(C:C)");
@@ -364,13 +358,13 @@ void ScJumboSheetsTest::testTdf109061()
}
ScJumboSheetsTest::ScJumboSheetsTest()
- : UnoApiTest("/sc/qa/unit/data/")
+ : UnoApiXmlTest("/sc/qa/unit/data/")
{
}
void ScJumboSheetsTest::setUp()
{
- UnoApiTest::setUp();
+ UnoApiXmlTest::setUp();
//Init before GetDefaultsOptions
ScDLL::Init();
@@ -386,7 +380,7 @@ void ScJumboSheetsTest::tearDown()
aDefaultsOption.SetInitJumboSheets(false);
SC_MOD()->SetDefaultsOptions(aDefaultsOption);
- UnoApiTest::tearDown();
+ UnoApiXmlTest::tearDown();
}
void ScJumboSheetsTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index f288e1ffc538..0408e0e731c5 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -7,9 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/unoapi_test.hxx>
+#include <test/unoapixml_test.hxx>
#include <test/helper/transferable.hxx>
-#include <test/xmltesttools.hxx>
#include <boost/property_tree/json_parser.hpp>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
@@ -63,7 +62,7 @@ static std::ostream& operator<<(std::ostream& os, ViewShellId const & id)
namespace
{
-class ScTiledRenderingTest : public UnoApiTest, public XmlTestTools
+class ScTiledRenderingTest : public UnoApiXmlTest
{
public:
ScTiledRenderingTest();
@@ -204,14 +203,14 @@ private:
};
ScTiledRenderingTest::ScTiledRenderingTest()
- : UnoApiTest("/sc/qa/unit/tiledrendering/data/"),
+ : UnoApiXmlTest("/sc/qa/unit/tiledrendering/data/"),
m_callbackWrapper(&callback, this)
{
}
void ScTiledRenderingTest::setUp()
{
- UnoApiTest::setUp();
+ UnoApiXmlTest::setUp();
comphelper::LibreOfficeKit::setActive(true);
}
@@ -227,7 +226,7 @@ void ScTiledRenderingTest::tearDown()
m_callbackWrapper.clear();
comphelper::LibreOfficeKit::setActive(false);
- UnoApiTest::tearDown();
+ UnoApiXmlTest::tearDown();
}
ScModelObj* ScTiledRenderingTest::createDoc(const char* pName)
diff --git a/sd/qa/filter/eppt/eppt.cxx b/sd/qa/filter/eppt/eppt.cxx
index eddc93a36668..a47edcf5f1c4 100644
--- a/sd/qa/filter/eppt/eppt.cxx
+++ b/sd/qa/filter/eppt/eppt.cxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/unoapi_test.hxx>
-#include <test/xmltesttools.hxx>
+#include <test/unoapixml_test.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
@@ -26,7 +25,7 @@ using namespace ::com::sun::star;
namespace
{
/// Covers sd/source/filter/eppt/ fixes.
-class Test : public UnoApiTest, public XmlTestTools
+class Test : public UnoApiXmlTest
{
public:
Test();
@@ -39,7 +38,7 @@ void Test::registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
}
Test::Test()
- : UnoApiTest("/sd/qa/filter/eppt/data/")
+ : UnoApiXmlTest("/sd/qa/filter/eppt/data/")
{
}
@@ -83,9 +82,7 @@ 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.GetURL(), "ppt/theme/theme1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/theme/theme1.xml");
assertXPath(pXmlDoc, "//a:clrScheme/a:lt1/a:srgbClr", "val", "000002");
// Without the fix in place, this test would have failed with:
// - Expected: 1
@@ -103,9 +100,7 @@ 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.GetURL(), "ppt/slides/slide1.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// Without the fix in place, this test would have failed with:
// - Expected: 1
// - Actual : 0
diff --git a/sd/qa/unit/HtmlExportTest.cxx b/sd/qa/unit/HtmlExportTest.cxx
index 2e7885e062d8..9a680bdba1c9 100644
--- a/sd/qa/unit/HtmlExportTest.cxx
+++ b/sd/qa/unit/HtmlExportTest.cxx
@@ -7,17 +7,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/unoapi_test.hxx>
+#include <test/unoapixml_test.hxx>
#include <test/htmltesttools.hxx>
-#include <test/xmltesttools.hxx>
using namespace css;
-class SdHTMLFilterTest : public UnoApiTest, public XmlTestTools, public HtmlTestTools
+class SdHTMLFilterTest : public UnoApiXmlTest, public HtmlTestTools
{
public:
SdHTMLFilterTest()
- : UnoApiTest("/sd/qa/unit/data/")
+ : UnoApiXmlTest("/sd/qa/unit/data/")
{
}
diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx
index 64e3147710d0..9dfe60abfd82 100644
--- a/sd/qa/unit/SVGExportTests.cxx
+++ b/sd/qa/unit/SVGExportTests.cxx
@@ -10,10 +10,9 @@
#include <sal/config.h>
#include <string_view>
-#include <test/unoapi_test.hxx>
+#include <test/unoapixml_test.hxx>
#include <sal/macros.h>
-#include <test/xmltesttools.hxx>
#include <unotools/mediadescriptor.hxx>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/frame/Desktop.hpp>
@@ -68,7 +67,7 @@ bool isValidTiledBackgroundId(const OUString& sId)
}
-class SdSVGFilterTest : public UnoApiTest, public XmlTestTools
+class SdSVGFilterTest : public UnoApiXmlTest
{
class Resetter
{
@@ -95,7 +94,7 @@ class SdSVGFilterTest : public UnoApiTest, public XmlTestTools
public:
SdSVGFilterTest()
- : UnoApiTest("/sd/qa/unit/data/odp/")
+ : UnoApiXmlTest("/sd/qa/unit/data/odp/")
{
}
diff --git a/sd/qa/unit/ShapeImportExportTest.cxx b/sd/qa/unit/ShapeImportExportTest.cxx
index 535f3f4eda7e..a0e6b63b4ccb 100644
--- a/sd/qa/unit/ShapeImportExportTest.cxx
+++ b/sd/qa/unit/ShapeImportExportTest.cxx
@@ -19,11 +19,11 @@
using namespace css;
/// Shape / SdrObject import and export tests
-class ShapeImportExportTest : public SdUnoApiTestXml
+class ShapeImportExportTest : public SdModelTestBase
{
public:
ShapeImportExportTest()
- : SdUnoApiTestXml("/sd/qa/unit/data/")
+ : SdModelTestBase("/sd/qa/unit/data/")
{
}
@@ -261,7 +261,7 @@ void ShapeImportExportTest::testTextDistancesOOXML_Export()
loadFromURL(u"TextDistancesInsets3.pptx");
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
CPPUNIT_ASSERT(pXmlDoc);
//Check shape Top/Bottom - 0cm, 4cm
diff --git a/sd/qa/unit/activex-controls-tests.cxx b/sd/qa/unit/activex-controls-tests.cxx
index 5f3b4ab53264..20f1025bf4a2 100644
--- a/sd/qa/unit/activex-controls-tests.cxx
+++ b/sd/qa/unit/activex-controls-tests.cxx
@@ -24,11 +24,11 @@
#include <com/sun/star/graphic/XGraphic.hpp>
-class SdActiveXControlsTest: public SdUnoApiTest
+class SdActiveXControlsTest: public SdModelTestBase
{
public:
SdActiveXControlsTest()
- : SdUnoApiTest("/sd/qa/unit/data/")
+ : SdModelTestBase("/sd/qa/unit/data/")
{
}
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 1ca36d3d07af..937a59e58347 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -45,11 +45,11 @@
using namespace css;
-class SdOOXMLExportTest1 : public SdUnoApiTestXml
+class SdOOXMLExportTest1 : public SdModelTestBase
{
public:
SdOOXMLExportTest1()
- : SdUnoApiTestXml("/sd/qa/unit/data/")
+ : SdModelTestBase("/sd/qa/unit/data/")
{
}
@@ -230,7 +230,7 @@ void SdOOXMLExportTest1::testTdf149311()
loadFromURL(u"odp/tdf149311.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pRelsDoc = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pRelsDoc = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide1.xml.rels");
assertXPath(pRelsDoc, "/rels:Relationships/rels:Relationship[@Id='rId1']", "Target",
"slide2.xml");
@@ -241,7 +241,7 @@ void SdOOXMLExportTest1::testTdf149128()
loadFromURL(u"odp/tdf149128.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn", "id",
"42");
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn", "idx",
@@ -257,7 +257,7 @@ void SdOOXMLExportTest1::testTdf66228()
loadFromURL(u"odp/tdf66228.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:spPr/a:prstGeom", "prst",
"bentConnector3");
}
@@ -267,7 +267,7 @@ void SdOOXMLExportTest1::testTdf147919()
loadFromURL(u"odp/tdf147919.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:cxnSp[1]/p:spPr/a:prstGeom", "prst",
"bentConnector2");
@@ -336,7 +336,7 @@ void SdOOXMLExportTest1::testTdf130165()
loadFromURL(u"pptx/tdf146223.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "/p:sld", "showMasterSp", "0");
}
@@ -345,11 +345,11 @@ void SdOOXMLExportTest1::testTdf124781()
loadFromURL(u"odp/tdf124781.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[1]/a:r[2]/a:rPr", "baseline",
"33000");
- xmlDocUniquePtr pXmlDoc2 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc2 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc2, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[2]/a:r[2]/a:rPr", "baseline",
"-8000");
}
@@ -359,37 +359,37 @@ void SdOOXMLExportTest1::testTdf144914()
loadFromURL(u"pptx/tdf144616.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:nvSpPr/p:cNvPr/a:hlinkClick", "action",
"ppaction://hlinkshowjump?jump=firstslide");
- xmlDocUniquePtr pXmlDoc2 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc2 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:nvSpPr/p:cNvPr/a:hlinkClick", "action",
"ppaction://hlinkshowjump?jump=lastslide");
- xmlDocUniquePtr pXmlDoc3 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc3 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc3, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:nvSpPr/p:cNvPr/a:hlinkClick", "action",
"ppaction://hlinkshowjump?jump=nextslide");
- xmlDocUniquePtr pXmlDoc4 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc4 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc4, "/p:sld/p:cSld/p:spTree/p:sp[4]/p:nvSpPr/p:cNvPr/a:hlinkClick", "action",
"ppaction://hlinkshowjump?jump=previousslide");
- xmlDocUniquePtr pXmlDoc5 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc5 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc5, "/p:sld/p:cSld/p:spTree/p:sp[5]/p:nvSpPr/p:cNvPr/a:hlinkClick", "action",
"ppaction://hlinksldjump");
- xmlDocUniquePtr pRelsDoc5 = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pRelsDoc5 = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide1.xml.rels");
assertXPath(pRelsDoc5, "/rels:Relationships/rels:Relationship[@Id='rId1']", "Target",
"slide2.xml");
- xmlDocUniquePtr pXmlDoc6 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc6 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc6, "/p:sld/p:cSld/p:spTree/p:sp[6]/p:nvSpPr/p:cNvPr/a:hlinkClick", "action",
"ppaction://hlinkshowjump?jump=endshow");
- xmlDocUniquePtr pXmlDoc7 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc7 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc7, "/p:sld/p:cSld/p:spTree/p:sp[7]/p:nvSpPr/p:cNvPr/a:hlinkClick", "id",
"rId2");
- xmlDocUniquePtr pRelsDoc7 = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pRelsDoc7 = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide1.xml.rels");
assertXPath(pRelsDoc7, "/rels:Relationships/rels:Relationship[@Id='rId2']", "Target",
"http://www.example.com/");
}
@@ -399,37 +399,37 @@ void SdOOXMLExportTest1::testTdf124232()
loadFromURL(u"pptx/tdf141704.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick", "action",
"ppaction://hlinkshowjump?jump=lastslide");
- xmlDocUniquePtr pXmlDoc2 = parseExport(tempFile, "ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDoc2 = parseExport(tempFile.GetURL(), "ppt/slides/slide2.xml");
assertXPath(pXmlDoc2, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick", "action",
"ppaction://hlinkshowjump?jump=nextslide");
- xmlDocUniquePtr pXmlDoc3 = parseExport(tempFile, "ppt/slides/slide3.xml");
+ xmlDocUniquePtr pXmlDoc3 = parseExport(tempFile.GetURL(), "ppt/slides/slide3.xml");
assertXPath(pXmlDoc3, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick", "action",
"ppaction://hlinkshowjump?jump=previousslide");
- xmlDocUniquePtr pXmlDoc4 = parseExport(tempFile, "ppt/slides/slide4.xml");
+ xmlDocUniquePtr pXmlDoc4 = parseExport(tempFile.GetURL(), "ppt/slides/slide4.xml");
assertXPath(pXmlDoc4, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick", "id",
"rId1");
- xmlDocUniquePtr pRelsDoc4 = parseExport(tempFile, "ppt/slides/_rels/slide4.xml.rels");
+ xmlDocUniquePtr pRelsDoc4 = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide4.xml.rels");
assertXPath(pRelsDoc4, "/rels:Relationships/rels:Relationship[@Id='rId1']", "Target",
"http://www.example.com/");
- xmlDocUniquePtr pXmlDoc5 = parseExport(tempFile, "ppt/slides/slide5.xml");
+ xmlDocUniquePtr pXmlDoc5 = parseExport(tempFile.GetURL(), "ppt/slides/slide5.xml");
assertXPath(pXmlDoc5, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick", "action",
"ppaction://hlinksldjump");
- xmlDocUniquePtr pRelsDoc5 = parseExport(tempFile, "ppt/slides/_rels/slide5.xml.rels");
+ xmlDocUniquePtr pRelsDoc5 = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide5.xml.rels");
assertXPath(pRelsDoc5, "/rels:Relationships/rels:Relationship[@Id='rId1']", "Target",
"slide6.xml");
- xmlDocUniquePtr pXmlDoc6 = parseExport(tempFile, "ppt/slides/slide6.xml");
+ xmlDocUniquePtr pXmlDoc6 = parseExport(tempFile.GetURL(), "ppt/slides/slide6.xml");
assertXPath(pXmlDoc6, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick", "action",
"ppaction://hlinkshowjump?jump=endshow");
- xmlDocUniquePtr pXmlDoc7 = parseExport(tempFile, "ppt/slides/slide7.xml");
+ xmlDocUniquePtr pXmlDoc7 = parseExport(tempFile.GetURL(), "ppt/slides/slide7.xml");
assertXPath(pXmlDoc7, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:cNvPr/a:hlinkClick", "action",
"ppaction://hlinkshowjump?jump=firstslide");
}
@@ -439,7 +439,7 @@ void SdOOXMLExportTest1::testTdf143624()
loadFromURL(u"pptx/tdf143624.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/presProps.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/presProps.xml");
assertXPath(pXmlDoc, "/p:presentationPr/p:showPr", "useTimings", "0");
@@ -459,7 +459,7 @@ void SdOOXMLExportTest1::testTdf142648()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pRelsDoc = parseExport(tempFile, "ppt/slides/_rels/slide2.xml.rels");
+ xmlDocUniquePtr pRelsDoc = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide2.xml.rels");
assertXPath(pRelsDoc, "/rels:Relationships/rels:Relationship[@Id='rId1']", "Target",
"slide1.xml");
@@ -470,7 +470,7 @@ void SdOOXMLExportTest1::testTdf47365()
loadFromURL(u"pptx/loopNoPause.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/presProps.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/presProps.xml");
assertXPath(pXmlDoc, "/p:presentationPr/p:showPr", "loop", "1");
@@ -482,7 +482,7 @@ void SdOOXMLExportTest1::testTdf125071()
loadFromURL(u"pptx/tdf125071.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/presentation.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/presentation.xml");
assertXPath(pXmlDoc, "/p:presentation/p:custShowLst/p:custShow[1]", "name", "Custom1");
assertXPath(pXmlDoc, "/p:presentation/p:custShowLst/p:custShow[2]", "name", "Custom2");
@@ -493,8 +493,8 @@ void SdOOXMLExportTest1::testTdf54037()
loadFromURL(u"pptx/tdf54037.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
- xmlDocUniquePtr pRelsDoc = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pRelsDoc = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide1.xml.rels");
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[1]/a:r/a:rPr/a:hlinkClick",
"action", "ppaction://hlinksldjump");
@@ -1242,8 +1242,8 @@ void SdOOXMLExportTest1::testTdf112633()
loadFromURL(u"pptx/tdf112633.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
- xmlDocUniquePtr pRelsDoc = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pRelsDoc = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide1.xml.rels");
// Check image with artistic effect exists in the slide
assertXPath(pXmlDoc,
@@ -1272,7 +1272,7 @@ void SdOOXMLExportTest1::testTdf128952()
loadFromURL(u"pptx/tdf128952.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm/a:off", "x", "360");
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm/a:off", "y", "-360");
@@ -1285,7 +1285,7 @@ void SdOOXMLExportTest1::testTdf127090()
loadFromURL(u"pptx/tdf127090.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:bodyPr", "rot", "-5400000");
}
@@ -1296,9 +1296,9 @@ void SdOOXMLExportTest1::testCustomXml()
loadFromURL(u"pptx/customxml.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "customXml/item1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "customXml/item1.xml");
CPPUNIT_ASSERT(pXmlDoc);
- xmlDocUniquePtr pRelsDoc = parseExport(tempFile, "customXml/_rels/item1.xml.rels");
+ xmlDocUniquePtr pRelsDoc = parseExport(tempFile.GetURL(), "customXml/_rels/item1.xml.rels");
CPPUNIT_ASSERT(pRelsDoc);
// Check there is a relation to itemProps1.xml.
@@ -1426,7 +1426,7 @@ void SdOOXMLExportTest1::testRoundtripPrstDash()
const OUString sOriginal[]
= { "dash", "dashDot", "dot", "lgDash", "lgDashDot",
"lgDashDotDot", "sysDash", "sysDashDot", "sysDashDotDot", "sysDot" };
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OString sStart = "/p:sld/p:cSld/p:spTree/p:sp[";
const OString sEnd = "]/p:spPr/a:ln/a:prstDash";
for (sal_uInt16 i = 0; i < 10; i++)
@@ -1460,7 +1460,7 @@ void SdOOXMLExportTest1::testDashOnHairline()
loadFromURL(u"odp/tdf127267DashOnHairline.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:ln/a:custDash/a:ds", 11);
}
@@ -1478,7 +1478,7 @@ void SdOOXMLExportTest1::testCustomshapeBitmapfillSrcrect()
loadFromURL(u"pptx/customshape-bitmapfill-srcrect.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
// tdf#132680
// We are preventing the side effect of DOCX improvement to PPTX case.
@@ -1511,7 +1511,7 @@ void SdOOXMLExportTest1::testTdf100348FontworkBitmapFill()
// Make sure the fontwork shape has a blip bitmap fill and a colored outline.
// Without the patch, fill and outline were black.
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr");
assertXPath(pXmlDoc, sPathStart + "/a:blipFill/a:blip", 1);
assertXPath(pXmlDoc, sPathStart + "/a:ln/a:solidFill/a:srgbClr", "val", "ffbf00");
@@ -1524,7 +1524,7 @@ void SdOOXMLExportTest1::testTdf100348FontworkGradientGlow()
// Make sure the fontwork shape has a gradient fill and a colored glow.
// Without the patch, fill was black and no glow applied.
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr");
assertXPath(pXmlDoc, sPathStart + "/a:gradFill/a:gsLst/a:gs[1]/a:srgbClr", "val", "8d281e");
assertXPath(pXmlDoc, sPathStart + "/a:effectLst/a:glow", "rad", "63360");
@@ -1537,7 +1537,7 @@ void SdOOXMLExportTest1::testTdf128345FullTransparentGradient()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
// Make sure the shape has no fill. Without the patch, fill was solid red.
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:noFill");
}
@@ -1547,7 +1547,7 @@ void SdOOXMLExportTest1::testTdf128345GradientLinear()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
// Make sure the shape has a lin fill. Without the patch, fill was solid red.
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:gradFill");
assertXPath(pXmlDoc, sPathStart + "/a:lin", "ang", "3600000");
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2);
@@ -1566,7 +1566,7 @@ void SdOOXMLExportTest1::testTdf128345GradientRadial()
// Make sure the shape has transparency. In OOXML alpha means 'opacity' with default
// 100000 for full opak, so only the full transparency with val 0 should be written.
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:gradFill");
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr", "val", "ff0000");
@@ -1596,7 +1596,7 @@ void SdOOXMLExportTest1::testTdf134969TransparencyOnColorGradient()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
// Make sure the shape has a transparency in gradient stops.
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:gradFill");
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs", 2);
assertXPath(pXmlDoc, sPathStart + "/a:gsLst/a:gs[1]/a:srgbClr/a:alpha", "val", "60000");
@@ -1608,7 +1608,7 @@ void SdOOXMLExportTest1::testArcTo()
loadFromURL(u"pptx/arc-validiert.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OString sPath("//a:custGeom/a:pathLst/a:path/a:arcTo");
assertXPath(pXmlDoc, sPath, "wR", "3");
assertXPath(pXmlDoc, sPath, "hR", "3");
@@ -1620,7 +1620,7 @@ void SdOOXMLExportTest1::testNarrationMimeType()
{
loadFromURL(u"pptx/narration.pptx");
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "[Content_Types].xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "[Content_Types].xml");
// Without the accompanying fix in place, this test would have failed with:
// - Expected: audio/mp4
// - Actual : application/vnd.sun.star.media
@@ -1630,10 +1630,10 @@ void SdOOXMLExportTest1::testNarrationMimeType()
"ContentType", "audio/mp4");
// Check if the bitmap of the media shape is exported correctly.
- xmlDocUniquePtr pSlideDoc = parseExport(aTempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pSlideDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
OUString aImageId
= getXPath(pSlideDoc, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip", "embed");
- xmlDocUniquePtr pRelsDoc = parseExport(aTempFile, "ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pRelsDoc = parseExport(aTempFile.GetURL(), "ppt/slides/_rels/slide1.xml.rels");
OUString aImagePath = "/rels:Relationships/rels:Relationship[@Id='" + aImageId + "']";
// Something like ../media/image2.png.
OUString aImageStreamName = getXPath(pRelsDoc, aImagePath.toUtf8(), "Target");
@@ -1682,7 +1682,7 @@ void SdOOXMLExportTest1::testTdf140865Wordart3D()
{
loadFromURL(u"pptx/tdf140865Wordart3D.pptx");
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
// without the fix in place a:sp3d was lost on round trip, and so extrusion was lost.
constexpr OStringLiteral sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:bodyPr");
@@ -1701,7 +1701,7 @@ void SdOOXMLExportTest1::testTdf124457()
loadFromURL(u"pptx/tdf124457.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/"
@@ -1719,7 +1719,7 @@ void SdOOXMLExportTest1::testTdf143126()
loadFromURL(u"pptx/tdf143126.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/presProps.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/presProps.xml");
assertXPath(pXmlDoc, "/p:presentationPr/p:showPr", "showNarration", "1");
assertXPath(pXmlDoc, "/p:presentationPr/p:showPr/p:sldRg", "st", "2");
@@ -1731,7 +1731,7 @@ void SdOOXMLExportTest1::testTdf143129()
loadFromURL(u"pptx/tdf143129.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/presProps.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/presProps.xml");
assertXPath(pXmlDoc, "/p:presentationPr/p:showPr", "showNarration", "1");
assertXPath(pXmlDoc, "/p:presentationPr/p:showPr/p:custShow", "id", "0");
@@ -1742,7 +1742,7 @@ void SdOOXMLExportTest1::testTdf118045()
loadFromURL(u"odp/tdf118045.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:pPr/a:lnSpc/a:spcPct", "val",
"110000");
}
@@ -1752,7 +1752,7 @@ void SdOOXMLExportTest1::testTdf137675()
loadFromURL(u"pptx/tdf137675.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path", "fill",
"none");
}
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 900a4040c0df..5ddbcdb4fae9 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -68,11 +68,11 @@ static void assertMotionPath(std::u16string_view rStr1, std::u16string_view rStr
assertEquals(sal_Int32(-1), nIdx2, rSourceLine, sMessage.getStr());
}
-class SdOOXMLExportTest2 : public SdUnoApiTestXml
+class SdOOXMLExportTest2 : public SdModelTestBase
{
public:
SdOOXMLExportTest2()
- : SdUnoApiTestXml("/sd/qa/unit/data/")
+ : SdModelTestBase("/sd/qa/unit/data/")
{
}
@@ -227,7 +227,7 @@ void SdOOXMLExportTest2::testTdf151492()
loadFromURL(u"odp/tdf151492.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:cxnSp/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn",
"idx", "0");
}
@@ -237,7 +237,7 @@ void SdOOXMLExportTest2::testTdf149697()
loadFromURL(u"pptx/tdf149697.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:cxnSp[1]/p:nvCxnSpPr/p:cNvCxnSpPr/a:stCxn", "idx", "5");
assertXPath(pXmlDocContent,
@@ -255,7 +255,7 @@ void SdOOXMLExportTest2::testTdf149126()
loadFromURL(u"odp/tdf149126.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom", "prst",
"triangle");
}
@@ -265,7 +265,7 @@ void SdOOXMLExportTest2::testTdf131905()
loadFromURL(u"pptx/tdf131905.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(
pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl/a:tr[1]/a:tc/a:tcPr",
@@ -300,19 +300,20 @@ void SdOOXMLExportTest2::testBnc822341()
// Export an LO specific ole object (imported from an ODP document)
{
- xmlDocUniquePtr pXmlDocCT = parseExport(tempFile, "[Content_Types].xml");
+ xmlDocUniquePtr pXmlDocCT = parseExport(tempFile.GetURL(), "[Content_Types].xml");
assertXPath(pXmlDocCT,
"/ContentType:Types/ContentType:Override[@ContentType='application/"
"vnd.openxmlformats-officedocument.wordprocessingml.document']",
"PartName", "/ppt/embeddings/oleObject1.docx");
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlDocRels
+ = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide1.xml.rels");
assertXPath(
pXmlDocRels,
"/rels:Relationships/rels:Relationship[@Target='../embeddings/oleObject1.docx']",
"Type", "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/p:oleObj",
"progId", "Word.Document.12");
@@ -328,19 +329,20 @@ void SdOOXMLExportTest2::testBnc822341()
// Export an MS specific ole object (imported from a PPTX document)
{
- xmlDocUniquePtr pXmlDocCT = parseExport(tempFile2, "[Content_Types].xml");
+ xmlDocUniquePtr pXmlDocCT = parseExport(tempFile2.GetURL(), "[Content_Types].xml");
assertXPath(pXmlDocCT,
"/ContentType:Types/ContentType:Override[@ContentType='application/"
"vnd.openxmlformats-officedocument.wordprocessingml.document']",
"PartName", "/ppt/embeddings/oleObject1.docx");
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlDocRels
+ = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide1.xml.rels");
assertXPath(
pXmlDocRels,
"/rels:Relationships/rels:Relationship[@Target='../embeddings/oleObject1.docx']",
"Type", "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/p:oleObj",
"progId", "Word.Document.12");
@@ -361,7 +363,7 @@ void SdOOXMLExportTest2::testMathObject()
// Export an LO specific ole object (imported from an ODP document)
{
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice",
"Requires", "a14");
assertXPathContent(pXmlDocContent,
@@ -379,7 +381,7 @@ void SdOOXMLExportTest2::testMathObject()
// Export an MS specific ole object (imported from a PPTX document)
{
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile2, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile2.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice",
"Requires", "a14");
assertXPathContent(pXmlDocContent,
@@ -402,7 +404,7 @@ void SdOOXMLExportTest2::testMathObjectPPT2010()
// Export an MS specific ole object (imported from a PPTX document)
{
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/mc:AlternateContent/mc:Choice",
"Requires", "a14");
assertXPathContent(pXmlDocContent,
@@ -763,7 +765,7 @@ void SdOOXMLExportTest2::testPresetShapesExport()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocCT = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocCT = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OString sPattern(
"/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom[@prst='_T_']/a:avLst/a:gd[_N_]");
const OString sT("_T_");
@@ -1008,7 +1010,7 @@ void SdOOXMLExportTest2::testTdf59046()
{
loadFromURL(u"odp/tdf59046.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path", 1);
}
@@ -1016,7 +1018,7 @@ void SdOOXMLExportTest2::testTdf133502()
{
loadFromURL(u"odp/tdf133502.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/comments/comment1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(tempFile.GetURL(), "ppt/comments/comment1.xml");
assertXPathContent(pXmlDocRels, "/p:cmLst/p:cm/p:text", "Test for creator-initials");
@@ -1083,7 +1085,7 @@ void SdOOXMLExportTest2::testPptmContentType()
utl::TempFileNamed tempFile = save("Impress MS PowerPoint 2007 XML VBA");
// Assert that the content type is the one of PPTM
- xmlDocUniquePtr pXmlContentType = parseExport(tempFile, "[Content_Types].xml");
+ xmlDocUniquePtr pXmlContentType = parseExport(tempFile.GetURL(), "[Content_Types].xml");
assertXPath(pXmlContentType,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/presentation.xml']",
"ContentType", "application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml");
@@ -1093,7 +1095,7 @@ void SdOOXMLExportTest2::testTdf111798()
{
loadFromURL(u"odp/tdf111798.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OUString data[][11] = { { "2700000", "2458080", "2414880", "1439640", "1440000", "gd[1]",
"adj1", "val 50000", "gd[2]", "adj2", "val 25000" },
@@ -1143,7 +1145,7 @@ void SdOOXMLExportTest2::testTdf111863()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
// check that transition attribute didn't change from 'out' to 'in'
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/"
"p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:animEffect",
@@ -1155,7 +1157,7 @@ void SdOOXMLExportTest2::testTdf111518()
loadFromURL(u"pptx/tdf111518.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
OUString sActual = getXPath(pXmlDocRels,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/"
"p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/"
@@ -1168,7 +1170,7 @@ void SdOOXMLExportTest2::testTdf100387()
{
loadFromURL(u"odp/tdf100387.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn",
"dur", "indefinite");
@@ -1220,7 +1222,7 @@ void SdOOXMLExportTest2::testClosingShapesAndLineCaps()
{
loadFromURL(u"odp/closed-shapes.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:custGeom/a:pathLst/a:path/a:moveTo/a:pt",
1);
@@ -1267,7 +1269,7 @@ void SdOOXMLExportTest2::testRotateFlip()
{
loadFromURL(u"odp/rotate_flip.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OUString data[][4] = { // flipH flipV x y
{ "0", "1", "1170000", "1035720" },
@@ -1331,7 +1333,7 @@ void SdOOXMLExportTest2::testTdf106867()
CPPUNIT_ASSERT(xNameAccess->hasByName("ppt/media/media1.avi"));
// both the ooxml and the extended markup
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:nvPr/a:videoFile");
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:nvPr/p:extLst/p:ext/p14:media");
@@ -1350,7 +1352,7 @@ void SdOOXMLExportTest2::testTdf112280()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
// check the animRot value
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/p:par/"
"p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:animRot",
@@ -1363,7 +1365,7 @@ void SdOOXMLExportTest2::testTdf112088()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
// check gradient stops
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPathChildren(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:gradFill/a:gsLst",
2);
}
@@ -1373,7 +1375,7 @@ void SdOOXMLExportTest2::testTdf112333()
loadFromURL(u"pptx/tdf112333.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
OUString sTo = getXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/"
@@ -1421,7 +1423,7 @@ void SdOOXMLExportTest2::testTdf112552()
loadFromURL(u"odp/tdf112552.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path",
"w", "21600");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:custGeom/a:pathLst/a:path",
@@ -1440,7 +1442,8 @@ void SdOOXMLExportTest2::testTdf112557()
loadFromURL(u"odp/tdf112557.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slideMasters/slideMaster1.xml");
+ xmlDocUniquePtr pXmlDocContent
+ = parseExport(tempFile.GetURL(), "ppt/slideMasters/slideMaster1.xml");
assertXPath(pXmlDocContent, "/p:sldMaster/p:cSld/p:spTree/p:sp", 2); // title and object
}
@@ -1449,7 +1452,7 @@ void SdOOXMLExportTest2::testTdf128049()
loadFromURL(u"odp/tdf128049.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:custGeom", 0);
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:spPr/a:prstGeom", "prst",
"noSmoking");
@@ -1464,7 +1467,8 @@ void SdOOXMLExportTest2::testTdf106026()
loadFromURL(u"odp/tdf106026.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlMasterContent = parseExport(tempFile, "ppt/slideMasters/slideMaster1.xml");
+ xmlDocUniquePtr pXmlMasterContent
+ = parseExport(tempFile.GetURL(), "ppt/slideMasters/slideMaster1.xml");
assertXPath(pXmlMasterContent,
"/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[1]/a:pPr/a:spcBef/a:spcPts", "val",
"1417");
@@ -1487,7 +1491,7 @@ void SdOOXMLExportTest2::testTdf106026()
"/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[7]/a:pPr/a:spcBef/a:spcPts", "val",
"283");
- xmlDocUniquePtr pXmlSlideContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlSlideContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlSlideContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr/a:spcAft/a:spcPts", "val",
"11339");
@@ -1504,7 +1508,7 @@ void SdOOXMLExportTest2::testTdf112334()
loadFromURL(u"pptx/tdf112334.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
OUString sAttributeName = getXPathContent(
pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
@@ -1518,7 +1522,7 @@ void SdOOXMLExportTest2::testTdf112089()
loadFromURL(u"pptx/tdf112089.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
OUString sID = getXPath(
pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:cNvPr", "id");
@@ -1535,7 +1539,7 @@ void SdOOXMLExportTest2::testTdf112086()
loadFromURL(u"pptx/tdf112086.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
OUString sVal = getXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/"
@@ -1583,7 +1587,7 @@ void SdOOXMLExportTest2::testGroupRotation()
loadFromURL(u"odp/group_rotation.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPathNoAttribute(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:grpSpPr/a:xfrm",
"rot");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[1]/p:spPr/a:xfrm", "rot",
@@ -1597,7 +1601,7 @@ void SdOOXMLExportTest2::testTdf104788()
loadFromURL(u"pptx/tdf104788.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide6.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide6.xml");
OUString sVal = getXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/"
@@ -1627,7 +1631,7 @@ void SdOOXMLExportTest2::testSmartartRotation2()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPathContent(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[4]/p:txBody/a:p/a:r/a:t", "Text");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[4]/p:txBody/a:bodyPr", "rot",
@@ -1647,7 +1651,7 @@ void SdOOXMLExportTest2::testTdf91999_rotateShape()
loadFromURL(u"pptx/tdf91999_rotateShape.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:nvSpPr/p:cNvPr", "name",
"CustomShape 2");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:spPr/a:xfrm", "rot", "10800000");
@@ -1664,7 +1668,7 @@ void SdOOXMLExportTest2::testTdf114845_rotateShape()
loadFromURL(u"pptx/tdf114845_rotateShape.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:cxnSp[2]/p:nvCxnSpPr/p:cNvPr", "name",
"Straight Arrow Connector 9");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:cxnSp[2]/p:spPr/a:xfrm", "flipV", "1");
@@ -1683,7 +1687,7 @@ void SdOOXMLExportTest2::testGroupsPosition()
loadFromURL(u"pptx/group.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp[1]/p:sp[1]/p:spPr/a:xfrm/a:off",
"x", "5004000");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp[1]/p:sp[1]/p:spPr/a:xfrm/a:off",
@@ -1699,7 +1703,7 @@ void SdOOXMLExportTest2::testGroupsRotatedPosition()
loadFromURL(u"pptx/group-rot.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:spPr/a:xfrm/a:off", "x",
"2857320");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:grpSp/p:sp[3]/p:spPr/a:xfrm/a:off", "y",
@@ -1711,16 +1715,16 @@ void SdOOXMLExportTest2::testAccentColor()
loadFromURL(u"pptx/accent-color.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp/p:style/a:fillRef/a:schemeClr", "val",
"accent6");
- xmlDocUniquePtr pXmlDocContent2 = parseExport(tempFile, "ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDocContent2 = parseExport(tempFile.GetURL(), "ppt/slides/slide2.xml");
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:spTree/p:sp/p:style/a:fillRef/a:schemeClr", "val",
"accent6");
- xmlDocUniquePtr pXmlDocTheme1 = parseExport(tempFile, "ppt/theme/theme1.xml");
+ xmlDocUniquePtr pXmlDocTheme1 = parseExport(tempFile.GetURL(), "ppt/theme/theme1.xml");
assertXPath(pXmlDocTheme1, "/a:theme/a:themeElements/a:clrScheme/a:accent6/a:srgbClr", "val",
"70ad47");
- xmlDocUniquePtr pXmlDocTheme2 = parseExport(tempFile, "ppt/theme/theme2.xml");
+ xmlDocUniquePtr pXmlDocTheme2 = parseExport(tempFile.GetURL(), "ppt/theme/theme2.xml");
assertXPath(pXmlDocTheme2, "/a:theme/a:themeElements/a:clrScheme/a:accent6/a:srgbClr", "val",
"deb340");
@@ -1737,7 +1741,7 @@ void SdOOXMLExportTest2::testThemeColors()
loadFromURL(u"pptx/tdf84205.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocTheme2 = parseExport(tempFile, "ppt/theme/theme2.xml");
+ xmlDocUniquePtr pXmlDocTheme2 = parseExport(tempFile.GetURL(), "ppt/theme/theme2.xml");
assertXPath(pXmlDocTheme2, "/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr", "val",
"44546a");
assertXPath(pXmlDocTheme2, "/a:theme/a:themeElements/a:clrScheme/a:accent3/a:srgbClr", "val",
@@ -1749,7 +1753,7 @@ void SdOOXMLExportTest2::testTdf111785()
loadFromURL(u"odp/tdf111785.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
// Without the fix in place, this test would have failed with
// - Expected: ed1c24
@@ -1762,7 +1766,7 @@ void SdOOXMLExportTest2::testTdf118825()
{
loadFromURL(u"odp/tdf118825-motionpath.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
CPPUNIT_ASSERT_MOTIONPATH(
u"M 0.0449285714285714 0.00368253968253968 C 0.0575714285714285 -0.00095238095238096 "
@@ -1840,7 +1844,7 @@ void SdOOXMLExportTest2::testTextColumns_tdf140852()
xColProps->getPropertyValue("AutomaticDistance"));
}
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr", "numCol", "1");
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr", "spcCol",
"360000");
@@ -1887,7 +1891,7 @@ void SdOOXMLExportTest2::testTextColumns_3columns()
CPPUNIT_ASSERT_LESS(sal_Int16(100), nScale);
}
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr", "numCol", "3");
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr", "spcCol",
"108000");
@@ -1912,12 +1916,13 @@ void SdOOXMLExportTest2::testTdf59323_slideFooters()
}
// Test placeholder indexes
- xmlDocUniquePtr pXmlDocMaster = parseExport(tempFile, "ppt/slideMasters/slideMaster1.xml");
+ xmlDocUniquePtr pXmlDocMaster
+ = parseExport(tempFile.GetURL(), "ppt/slideMasters/slideMaster1.xml");
assertXPath(pXmlDocMaster, "//p:ph [@type='dt']", "idx", "1");
assertXPath(pXmlDocMaster, "//p:ph [@type='ftr']", "idx", "2");
assertXPath(pXmlDocMaster, "//p:ph [@type='sldNum']", "idx", "3");
- xmlDocUniquePtr pXmlDocSlide1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocSlide1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocSlide1, "//p:ph [@type='dt']", "idx", "1");
assertXPath(pXmlDocSlide1, "//p:ph [@type='ftr']", "idx", "2");
assertXPath(pXmlDocSlide1, "//p:ph [@type='sldNum']", "idx", "3");
@@ -1948,7 +1953,8 @@ void SdOOXMLExportTest2::testTdf53970()
loadFromURL(u"odp/tdf53970_linked.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlRels = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlRels
+ = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide1.xml.rels");
CPPUNIT_ASSERT(pXmlRels);
assertXPath(pXmlRels, "/rels:Relationships/rels:Relationship[@TargetMode='External']", 2);
diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx
index 7e76cfb9fe49..5dfcb5c4fb50 100644
--- a/sd/qa/unit/export-tests-ooxml3.cxx
+++ b/sd/qa/unit/export-tests-ooxml3.cxx
@@ -33,11 +33,11 @@
#include <sdpage.hxx>
-class SdOOXMLExportTest3 : public SdUnoApiTestXml
+class SdOOXMLExportTest3 : public SdModelTestBase
{
public:
SdOOXMLExportTest3()
- : SdUnoApiTestXml("/sd/qa/unit/data/")
+ : SdModelTestBase("/sd/qa/unit/data/")
{
}
@@ -232,7 +232,7 @@ void SdOOXMLExportTest3::testTdf129430()
loadFromURL(u"odp/tdf129430.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc1, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[2]/a:pPr/a:lnSpc/a:spcPct",
"val", "100000");
}
@@ -242,10 +242,10 @@ void SdOOXMLExportTest3::testTdf114848()
loadFromURL(u"pptx/tdf114848.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocTheme1 = parseExport(tempFile, "ppt/theme/theme1.xml");
+ xmlDocUniquePtr pXmlDocTheme1 = parseExport(tempFile.GetURL(), "ppt/theme/theme1.xml");
assertXPath(pXmlDocTheme1, "/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr", "val",
"1f497d");
- xmlDocUniquePtr pXmlDocTheme2 = parseExport(tempFile, "ppt/theme/theme2.xml");
+ xmlDocUniquePtr pXmlDocTheme2 = parseExport(tempFile.GetURL(), "ppt/theme/theme2.xml");
assertXPath(pXmlDocTheme2, "/a:theme/a:themeElements/a:clrScheme/a:dk2/a:srgbClr", "val",
"1f497d");
}
@@ -255,7 +255,7 @@ void SdOOXMLExportTest3::testTdf147586()
loadFromURL(u"pptx/tdf147586.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
// Without the fix in place, this test would have failed with
// - Expected: 227fc7
// - Actual : 4f4f4f
@@ -272,7 +272,7 @@ void SdOOXMLExportTest3::testTdf68759()
loadFromURL(u"odp/tdf68759.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic[1]/p:spPr/a:xfrm/a:off", "x",
"1687320");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:pic[1]/p:spPr/a:xfrm/a:off", "y",
@@ -295,16 +295,16 @@ void SdOOXMLExportTest3::testTdf127901()
loadFromURL(u"odp/tdf127901.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip/a:lum", "bright",
"70000");
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip/a:lum", "contrast",
"-70000");
- xmlDocUniquePtr pXmlDocContent2 = parseExport(tempFile, "ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDocContent2 = parseExport(tempFile.GetURL(), "ppt/slides/slide2.xml");
assertXPath(pXmlDocContent2, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip/a:grayscl", 1);
- xmlDocUniquePtr pXmlDocContent3 = parseExport(tempFile, "ppt/slides/slide3.xml");
+ xmlDocUniquePtr pXmlDocContent3 = parseExport(tempFile.GetURL(), "ppt/slides/slide3.xml");
assertXPath(pXmlDocContent3, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:blip/a:biLevel",
"thresh", "50000");
}
@@ -314,7 +314,7 @@ void SdOOXMLExportTest3::testTdf48735()
loadFromURL(u"odp/tdf48735.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:srcRect", "b", "23627");
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:srcRect", "l", "23627");
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:pic/p:blipFill/a:srcRect", "r", "23627");
@@ -326,7 +326,7 @@ void SdOOXMLExportTest3::testTdf90626()
loadFromURL(u"odp/tdf90626.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr/a:buSzPct",
"val", "100000");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:buSzPct",
@@ -381,7 +381,7 @@ void SdOOXMLExportTest3::testFontScale()
{
loadFromURL(u"pptx/font-scale.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
// Rounding errors possible, approximate value (+/- 1%)
OUString sScale = getXPath(
@@ -393,7 +393,7 @@ void SdOOXMLExportTest3::testShapeAutofitPPTX()
{
loadFromURL(u"pptx/testShapeAutofit.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
CPPUNIT_ASSERT(pXmlDocContent);
// TextAutoGrowHeight --> "Resize shape to fit text" --> true
@@ -406,7 +406,7 @@ void SdOOXMLExportTest3::testLegacyShapeAutofitPPTX()
{
loadFromURL(u"odp/testLegacyShapeAutofit.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
CPPUNIT_ASSERT(pXmlDocContent);
// Text in a legacy rectangle
@@ -543,7 +543,7 @@ void SdOOXMLExportTest3::testTdf118806()
loadFromURL(u"odp/tdf118806.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "//p:animMotion", "origin", "layout");
}
@@ -620,7 +620,7 @@ void SdOOXMLExportTest3::testTdf145162()
{
loadFromURL(u"pptx/tdf145162.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:buNone");
// Before the fix, that tag was missing so PP put bullet to each para.
@@ -633,9 +633,9 @@ void SdOOXMLExportTest3::testZeroIndentExport()
loadFromURL(u"odp/testZeroIndent.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
// There are 3 slides, get them
- xmlDocUniquePtr pSlide1 = parseExport(tempFile, "ppt/slides/slide1.xml");
- xmlDocUniquePtr pSlide2 = parseExport(tempFile, "ppt/slides/slide2.xml");
- xmlDocUniquePtr pSlide3 = parseExport(tempFile, "ppt/slides/slide3.xml");
+ xmlDocUniquePtr pSlide1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pSlide2 = parseExport(tempFile.GetURL(), "ppt/slides/slide2.xml");
+ xmlDocUniquePtr pSlide3 = parseExport(tempFile.GetURL(), "ppt/slides/slide3.xml");
CPPUNIT_ASSERT(pSlide1);
CPPUNIT_ASSERT(pSlide2);
@@ -665,7 +665,7 @@ void SdOOXMLExportTest3::testTdf100348_convert_Fontwork2TextWarp()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
// Resulting pptx has to contain the TextWarp shape
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OString sPathStart("/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr/a:prstTxWarp");
assertXPath(pXmlDocContent, sPathStart + "[@prst='textWave1']");
const OString sPathAdj(sPathStart + "/a:avLst/a:gd");
@@ -718,7 +718,7 @@ void SdOOXMLExportTest3::testTdf1225573_FontWorkScaleX()
// Error was, that attribute 'fromWordArt' was ignored
// ensure, resulting pptx has fromWordArt="1" on textArchDown shape
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr[@fromWordArt='1']");
@@ -748,7 +748,7 @@ void SdOOXMLExportTest3::testTdf99497_keepAppearanceOfCircleKind()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
// slide 1 45° -> adj1 = 20493903, 270° -> adj2 = 5400000, <a:noFill/> exists
- xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OString sPathStart1("/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom");
assertXPath(pXmlDocContent1, sPathStart1 + "[@prst='arc']");
const OString sPathAdj1(sPathStart1 + "/a:avLst/a:gd");
@@ -757,7 +757,7 @@ void SdOOXMLExportTest3::testTdf99497_keepAppearanceOfCircleKind()
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:noFill");
// slide 2 270° -> adj1 = 5400000, 180° -> adj2 = 10800000
- xmlDocUniquePtr pXmlDocContent2 = parseExport(tempFile, "ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDocContent2 = parseExport(tempFile.GetURL(), "ppt/slides/slide2.xml");
const OString sPathStart2("/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom");
assertXPath(pXmlDocContent2, sPathStart2 + "[@prst='chord']");
const OString sPathAdj2(sPathStart2 + "/a:avLst/a:gd");
@@ -765,7 +765,7 @@ void SdOOXMLExportTest3::testTdf99497_keepAppearanceOfCircleKind()
assertXPath(pXmlDocContent2, sPathAdj2 + "[@name='adj2' and @fmla='val 10800000']");
// slide 3 120° -> adj1 = 12600000, 30° -> adj2 = 20946396
- xmlDocUniquePtr pXmlDocContent3 = parseExport(tempFile, "ppt/slides/slide3.xml");
+ xmlDocUniquePtr pXmlDocContent3 = parseExport(tempFile.GetURL(), "ppt/slides/slide3.xml");
const OString sPathStart3("/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom");
assertXPath(pXmlDocContent3, sPathStart3 + "[@prst='pie']");
const OString sPathAdj3(sPathStart3 + "/a:avLst/a:gd");
@@ -778,7 +778,7 @@ void SdOOXMLExportTest3::testTdf104792()
loadFromURL(u"pptx/tdf104792-smart-art-animation.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst[1]/p:seq/p:cTn/p:childTnLst[1]/"
"p:par[1]/p:cTn/p:childTnLst[1]/p:par/p:cTn/p:childTnLst[1]/p:par/p:cTn/"
@@ -791,7 +791,7 @@ void SdOOXMLExportTest3::testTdf90627()
loadFromURL(u"odp/tdf90627.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
// Don't export empty endCondLst without cond.
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst[1]/p:seq/p:cTn/p:childTnLst[1]/"
@@ -805,7 +805,7 @@ void SdOOXMLExportTest3::testTdf104786()
loadFromURL(u"pptx/tdf104786.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide2.xml");
// Don't export empty 'to'
assertXPath(pXmlDocContent,
"/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst[1]/p:seq/p:cTn/p:childTnLst[1]/"
@@ -819,7 +819,7 @@ void SdOOXMLExportTest3::testTdf118783()
loadFromURL(u"odp/tdf118783.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
OUString sAttributeName
= getXPathContent(pXmlDocContent, "//p:animRot/p:cBhvr/p:attrNameLst/p:attrName");
CPPUNIT_ASSERT_EQUAL(OUString("r"), sAttributeName);
@@ -830,7 +830,7 @@ void SdOOXMLExportTest3::testTdf104789()
loadFromURL(u"pptx/tdf104789.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
OUString sAttributeName = getXPathContent(
pXmlDocContent, "/p:sld/p:timing/p:tnLst/p:par/p:cTn/p:childTnLst/p:seq/p:cTn/p:childTnLst/"
"p:par/p:cTn/p:childTnLst/p:par/p:cTn/p:childTnLst/p:par/p:cTn/"
@@ -857,7 +857,7 @@ void SdOOXMLExportTest3::testTdf118835()
loadFromURL(u"odp/tdf118835.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "(//p:animClr)[1]", "clrSpc", "rgb");
assertXPathContent(pXmlDocContent, "(//p:animClr)[1]//p:attrName", "style.color");
assertXPath(pXmlDocContent, "(//p:animClr)[1]//p:to/a:srgbClr", "val", "ed1c24");
@@ -882,7 +882,7 @@ void SdOOXMLExportTest3::testTdf118768()
loadFromURL(u"odp/tdf118768-brake.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "//p:anim[1]", "from", "(-#ppt_w/2)");
assertXPath(pXmlDocContent, "//p:anim[1]", "to", "(#ppt_x)");
assertXPath(pXmlDocContent, "//p:anim[2]", "from", "0");
@@ -899,7 +899,7 @@ void SdOOXMLExportTest3::testTdf118836()
loadFromURL(u"odp/tdf118836.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "//p:animScale/p:by", "x", "250000");
assertXPath(pXmlDocContent, "//p:animScale/p:by", "y", "250000");
}
@@ -988,7 +988,7 @@ void SdOOXMLExportTest3::testTdf116350TextEffects()
// Export
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "//p:sp[1]/p:txBody/a:bodyPr/a:prstTxWarp", "prst", "textArchUp");
assertXPath(pXmlDocContent, "//p:sp[14]/p:txBody/a:bodyPr/a:prstTxWarp", "prst", "textCircle");
assertXPath(pXmlDocContent, "//p:sp[14]/p:spPr/a:solidFill/a:srgbClr", 0);
@@ -999,13 +999,13 @@ void SdOOXMLExportTest3::testTdf128096()
loadFromURL(u"odp/tdf128096.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent1,
"//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:highlight/a:srgbClr", "val",
"ffff00");
// Check that underlined content is also highlighted
- xmlDocUniquePtr pXmlDocContent2 = parseExport(tempFile, "ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDocContent2 = parseExport(tempFile.GetURL(), "ppt/slides/slide2.xml");
assertXPath(pXmlDocContent2,
"//p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:highlight/a:srgbClr", "val",
"ffff00");
@@ -1015,16 +1015,17 @@ void SdOOXMLExportTest3::testTdf120573()
loadFromURL(u"pptx/tdf120573.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:nvPr/a:audioFile", 1);
assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:pic/p:nvPicPr/p:nvPr/a:videoFile", 0);
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlDocRels
+ = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide1.xml.rels");
assertXPath(pXmlDocRels,
"(/rels:Relationships/rels:Relationship[@Target='../media/media1.wav'])[1]", "Type",
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio");
- xmlDocUniquePtr pXmlContentType = parseExport(tempFile, "[Content_Types].xml");
+ xmlDocUniquePtr pXmlContentType = parseExport(tempFile.GetURL(), "[Content_Types].xml");
assertXPath(pXmlContentType,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/media/media1.wav']",
"ContentType", "audio/x-wav");
@@ -1034,7 +1035,7 @@ void SdOOXMLExportTest3::testTdf119118()
{
loadFromURL(u"pptx/tdf119118.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent, "//p:iterate", "type", "lt");
assertXPath(pXmlDocContent, "//p:tmAbs", "val", "200");
}
@@ -1043,7 +1044,7 @@ void SdOOXMLExportTest3::testTdf99213()
{
loadFromURL(u"odp/tdf99213-target-missing.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
// Number of nodes with p:attrNameLst was 3, including one that missed tgtEl
assertXPath(pXmlDocContent, "//p:attrNameLst", 2);
// Timenode that miss its target element should be filtered.
@@ -1059,7 +1060,7 @@ void SdOOXMLExportTest3::testPotxExport()
utl::TempFileNamed tempFile = save("Impress Office Open XML Template");
// Load and check content type
- xmlDocUniquePtr pContentTypes = parseExport(tempFile, "[Content_Types].xml");
+ xmlDocUniquePtr pContentTypes = parseExport(tempFile.GetURL(), "[Content_Types].xml");
CPPUNIT_ASSERT(pContentTypes);
assertXPath(pContentTypes,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/presentation.xml']",
@@ -1080,7 +1081,7 @@ void SdOOXMLExportTest3::testTdf44223()
parseExportStream(tempFile.GetURL(), "ppt/media/audio2.wav"));
CPPUNIT_ASSERT_EQUAL(sal_uInt64(28074), pStream2->remainingSize());
- xmlDocUniquePtr pXmlContentType = parseExport(tempFile, "[Content_Types].xml");
+ xmlDocUniquePtr pXmlContentType = parseExport(tempFile.GetURL(), "[Content_Types].xml");
assertXPath(pXmlContentType,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/media/audio1.wav']",
"ContentType", "audio/x-wav");
@@ -1089,17 +1090,17 @@ void SdOOXMLExportTest3::testTdf44223()
"/ContentType:Types/ContentType:Override[@PartName='/ppt/media/audio2.wav']",
"ContentType", "audio/x-wav");
- xmlDocUniquePtr pDoc1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pDoc1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
// Start condition: 0s after timenode id 5 begins.
assertXPath(pDoc1, "//p:audio/p:cMediaNode/p:cTn/p:stCondLst/p:cond", "evt", "begin");
assertXPath(pDoc1, "//p:audio/p:cMediaNode/p:cTn/p:stCondLst/p:cond", "delay", "0");
assertXPath(pDoc1, "//p:audio/p:cMediaNode/p:cTn/p:stCondLst/p:cond/p:tn", "val", "5");
- xmlDocUniquePtr pDoc2 = parseExport(tempFile, "ppt/slides/slide2.xml");
+ xmlDocUniquePtr pDoc2 = parseExport(tempFile.GetURL(), "ppt/slides/slide2.xml");
assertXPath(pDoc2, "//p:transition/p:sndAc/p:stSnd/p:snd[@r:embed]", 2);
- xmlDocUniquePtr pRels1 = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pRels1 = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide1.xml.rels");
assertXPath(pRels1, "//rels:Relationship[@Id='rId1']", "Type",
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio");
assertXPath(pRels1, "//rels:Relationship[@Id='rId1']", "Target", "../media/audio1.wav");
@@ -1110,7 +1111,7 @@ void SdOOXMLExportTest3::testTdf135843()
loadFromURL(u"pptx/tdf135843_export.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const OString sPathStart("/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl");
assertXPath(pXmlDoc, sPathStart + "/a:tr[1]/a:tc[1]/a:tcPr/a:lnL/a:solidFill");
assertXPath(pXmlDoc, sPathStart + "/a:tr[1]/a:tc[1]/a:tcPr/a:lnR/a:solidFill");
@@ -1133,7 +1134,7 @@ void SdOOXMLExportTest3::testSmartArtPreserve()
loadFromURL(u"pptx/smartart-preserve.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:cNvPr");
assertXPath(pXmlDoc,
"//p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/dgm:relIds");
@@ -1143,7 +1144,8 @@ void SdOOXMLExportTest3::testSmartArtPreserve()
assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:graphicFrame/p:nvGraphicFramePr/p:nvPr/"
"p:extLst/p:ext/p14:modId");
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels");
+ xmlDocUniquePtr pXmlDocRels
+ = parseExport(tempFile.GetURL(), "ppt/slides/_rels/slide1.xml.rels");
assertXPath(
pXmlDocRels,
"(/rels:Relationships/rels:Relationship[@Target='../diagrams/layout1.xml'])[1]", "Type",
@@ -1160,7 +1162,7 @@ void SdOOXMLExportTest3::testSmartArtPreserve()
"(/rels:Relationships/rels:Relationship[@Target='../diagrams/quickStyle1.xml'])[1]", "Type",
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramQuickStyle");
- xmlDocUniquePtr pXmlContentType = parseExport(tempFile, "[Content_Types].xml");
+ xmlDocUniquePtr pXmlContentType = parseExport(tempFile.GetURL(), "[Content_Types].xml");
assertXPath(pXmlContentType,
"/ContentType:Types/ContentType:Override[@PartName='/ppt/diagrams/layout1.xml']",
"ContentType",
@@ -1441,7 +1443,7 @@ void SdOOXMLExportTest3::testTdf128213()
loadFromURL(u"pptx/tdf128213.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPathNoAttribute(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:xfrm", "rot");
}
@@ -1450,7 +1452,7 @@ void SdOOXMLExportTest3::testTdf79082()
loadFromURL(u"pptx/tdf79082.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent,
"/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[1]", "pos",
"360000");
@@ -1593,7 +1595,7 @@ void SdOOXMLExportTest3::testTdf132201EffectOrder()
{
loadFromURL(u"pptx/effectOrder.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPathChildren(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[3]/p:spPr/a:effectLst", 2);
// The relative order of effects is important: glow must be before shadow
CPPUNIT_ASSERT_EQUAL(0, getXPathPosition(pXmlDocContent,
@@ -1632,7 +1634,7 @@ void SdOOXMLExportTest3::testTdf119223()
loadFromURL(u"odp/tdf119223.odp");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocRels, "//p:cNvPr[@name='SomeCustomShape']");
assertXPath(pXmlDocRels, "//p:cNvPr[@name='SomePicture']");
@@ -1653,7 +1655,7 @@ void SdOOXMLExportTest3::testTdf128213ShapeRot()
loadFromURL(u"pptx/tdf128213-shaperot.pptx");
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocRels, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:bodyPr/a:scene3d");
assertXPath(pXmlDocRels,
@@ -1668,7 +1670,7 @@ void SdOOXMLExportTest3::testTdf125560_textDeflate()
// This problem did not affect the pptx export, only the ODP so assert that
utl::TempFileNamed tempFile = save("impress8");
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(tempFile.GetURL(), "content.xml");
assertXPath(pXmlDocRels,
"/office:document-content/office:body/office:presentation/draw:page/"
"draw:custom-shape/draw:enhanced-geometry",
@@ -1682,7 +1684,7 @@ void SdOOXMLExportTest3::testTdf125560_textInflateTop()
// This problem did not affect the pptx export, only the ODP so assert that
utl::TempFileNamed tempFile = save("impress8");
- xmlDocUniquePtr pXmlDocRels = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDocRels = parseExport(tempFile.GetURL(), "content.xml");
assertXPath(pXmlDocRels,
"/office:document-content/office:body/office:presentation/draw:page/"
"draw:custom-shape/draw:enhanced-geometry",
@@ -1695,8 +1697,8 @@ void SdOOXMLExportTest3::testTdf142235_TestPlaceholderTextAlignment()
utl::TempFileNamed tmpfile = save("Impress Office Open XML");
- xmlDocUniquePtr pXml1 = parseExport(tmpfile, "ppt/slides/slide2.xml");
- xmlDocUniquePtr pXml2 = parseExport(tmpfile, "ppt/slides/slide3.xml");
+ xmlDocUniquePtr pXml1 = parseExport(tmpfile.GetURL(), "ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXml2 = parseExport(tmpfile.GetURL(), "ppt/slides/slide3.xml");
// Without the fix in place many of these asserts failed, because alignment was bad.
@@ -1770,7 +1772,7 @@ void SdOOXMLExportTest3::testTdf143315()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXml = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXml = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
// Without the fix in place, this would have failed with
// - Expected:
@@ -1802,7 +1804,7 @@ void SdOOXMLExportTest3::testTdf147121()
utl::TempFileNamed tempFile = save("Impress Office Open XML");
// Parse the export
- xmlDocUniquePtr pXml = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXml = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
const auto nFontSizeAfter
= getXPath(pXml, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:br[1]/a:rPr", "sz").toFloat();
@@ -1952,7 +1954,7 @@ void SdOOXMLExportTest3::testTdf149551_tbrl90()
// Test, that it is exported to vert="vert"
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "//a:bodyPr", "vert", "vert");
// Test, that the shape has writing mode TB_RL90 after read from pptx
@@ -1963,7 +1965,7 @@ void SdOOXMLExportTest3::testTdf149551_tbrl90()
// Test, that it is written to odp with loext:writing-mode="tb-rl90"
utl::TempFileNamed aTempFile2 = save("impress8");
- pXmlDoc = parseExport(aTempFile2, "content.xml");
+ pXmlDoc = parseExport(aTempFile2.GetURL(), "content.xml");
assertXPath(
pXmlDoc,
"//style:style[@style:name='gr1']/style:graphic-properties[@loext:writing-mode='tb-rl90']");
@@ -1984,7 +1986,7 @@ void SdOOXMLExportTest3::testTdf149551_btlr()
// Test, that it is exported to vert="vert270"
utl::TempFileNamed aTempFile = save("Impress Office Open XML");
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDoc, "//a:bodyPr", "vert", "vert270");
// Test, that the shape has writing mode BT_LR after read from pptx
@@ -1995,7 +1997,7 @@ void SdOOXMLExportTest3::testTdf149551_btlr()
// Test, that it is written to odp with loext:writing-mode="bt-lr"
utl::TempFileNamed aTempFile2 = save("impress8");
- pXmlDoc = parseExport(aTempFile2, "content.xml");
+ pXmlDoc = parseExport(aTempFile2.GetURL(), "content.xml");
assertXPath(
pXmlDoc,
"//style:style[@style:name='gr1']/style:graphic-properties[@loext:writing-mode='bt-lr']");
@@ -2020,17 +2022,17 @@ void SdOOXMLExportTest3::testTdf94122_autoColor()
// - In ..., XPath '/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:srgbClr' number of nodes is incorrect
// i.e. automatic color wasn't resolved & exported
- xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent1,
"/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:srgbClr", "val",
"000000");
- xmlDocUniquePtr pXmlDocContent2 = parseExport(tempFile, "ppt/slides/slide2.xml");
+ xmlDocUniquePtr pXmlDocContent2 = parseExport(tempFile.GetURL(), "ppt/slides/slide2.xml");
assertXPath(pXmlDocContent2,
"/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:srgbClr", "val",
"ffffff");
- xmlDocUniquePtr pXmlDocContent3 = parseExport(tempFile, "ppt/slides/slide3.xml");
+ xmlDocUniquePtr pXmlDocContent3 = parseExport(tempFile.GetURL(), "ppt/slides/slide3.xml");
assertXPath(pXmlDocContent3,
"/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:p/a:r/a:rPr/a:solidFill/a:srgbClr",
"val", "ffffff");
@@ -2068,7 +2070,7 @@ void SdOOXMLExportTest3::testAutofittedTextboxIndent()
// i.e. paragraph indent wasn't scaled proportionally to autofitted textbox
// font scale on export
- xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pXmlDocContent1 = parseExport(tempFile.GetURL(), "ppt/slides/slide1.xml");
assertXPath(pXmlDocContent1, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p[1]/a:pPr", "marL",
"712800");
}
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 83e27d471bff..b1b202a234b8 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -48,11 +48,11 @@
using namespace css;
using namespace css::animations;
-class SdExportTest : public SdUnoApiTestXml
+class SdExportTest : public SdModelTestBase
{
public:
SdExportTest()
- : SdUnoApiTestXml("/sd/qa/unit/data/")
+ : SdModelTestBase("/sd/qa/unit/data/")
{
}
@@ -338,7 +338,7 @@ void SdExportTest::testFillBitmapUnused()
loadFromURL(u"odp/fillbitmap2.odp");
utl::TempFileNamed aTempFile = save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// shapes
assertXPath(
pXmlDoc,
@@ -359,7 +359,7 @@ void SdExportTest::testFillBitmapUnused()
"//style:style[@style:family='graphic']/style:graphic-properties[@draw:fill='solid']",
"fill-color", "#808080");
- xmlDocUniquePtr pStyles = parseExport(aTempFile, "styles.xml");
+ xmlDocUniquePtr pStyles = parseExport(aTempFile.GetURL(), "styles.xml");
// master slide presentation style
assertXPath(pStyles,
"/office:document-styles/office:styles/style:style[@style:family='presentation' "
@@ -480,7 +480,7 @@ void SdExportTest::testTdf97630()
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_PROPORTIONAL, tmp);
}
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// text shapes
assertXPath(pXmlDoc,
"//style:style[@style:family='presentation']/"
@@ -590,7 +590,7 @@ void SdExportTest::testOOoXMLAnimations()
// the problem was that legacy OOoXML animations were lost if store
// immediately follows load because they were "converted" async by a timer
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
assertXPath(pXmlDoc, "//anim:par[@presentation:node-type='timing-root']", 26);
// currently getting 52 of these without the fix (depends on timing)
assertXPath(pXmlDoc, "//anim:par", 223);
@@ -658,7 +658,7 @@ void SdExportTest::testUnknownAttributes()
utl::TempFileNamed aTempFile = save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/"
"style:style[@style:name='gr1']/"
"style:graphic-properties[@foo:non-existent-att='bar']");
@@ -792,7 +792,7 @@ void SdExportTest::testTdf79082()
{
loadFromURL(u"ppt/tdf79082.ppt");
utl::TempFileNamed tempFile = save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
// P1 should have 6 tab stops defined
assertXPathChildren(
@@ -1012,7 +1012,7 @@ void SdExportTest::testTdf98477()
loadFromURL(u"pptx/tdf98477grow.pptx");
utl::TempFileNamed tempFile = save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
assertXPath(pXmlDoc, "//anim:animateTransform", "by", "0.5,0.5");
}
@@ -1037,7 +1037,7 @@ void SdExportTest::testTdf50499()
utl::TempFileNamed tempFile = save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
assertXPath(pXmlDoc, "//anim:animate[1]", "from", "(-width/2)");
assertXPath(pXmlDoc, "//anim:animate[1]", "to", "(x)");
assertXPath(pXmlDoc, "//anim:animate[3]", "by", "(height/3+width*0.1)");
@@ -1273,7 +1273,7 @@ void SdExportTest::testTdf113822()
// Was unable to import iterate container (tdf#113822).
utl::TempFileNamed tempFile = save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
// IterateContainer was created as ParallelTimeContainer before, so
// the iterate type is not set too.
@@ -1291,7 +1291,7 @@ void SdExportTest::testTdf113818()
saveAndReload("Impress Office Open XML");
utl::TempFileNamed tempFile = save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
assertXPath(pXmlDoc, "//anim:animate[1]", "formula", "width*sin(2.5*pi*$)");
assertXPath(pXmlDoc, "//anim:animate[1]", "values", "0;1");
}
@@ -1302,7 +1302,7 @@ void SdExportTest::testTdf119629()
saveAndReload("MS PowerPoint 97");
utl::TempFileNamed tempFile = save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
// MSO's effect node type Click parallel node, with group node, after group node
// were missing.
@@ -1348,7 +1348,7 @@ void SdExportTest::testTdf123557()
loadFromURL(u"pptx/trigger.pptx");
saveAndReload("Impress Office Open XML");
utl::TempFileNamed tempFile = save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
// Contains 2 interactive sequences and 3 triggered effects.
assertXPath(pXmlDoc, "//draw:page", 1);
@@ -1403,7 +1403,7 @@ void SdExportTest::testGlow()
CPPUNIT_ASSERT_EQUAL(sal_Int16(60), nGlowEffectTransparency); // 60%
// Test ODF element
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
// check that we actually test graphic style
assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[2]",
@@ -1435,7 +1435,7 @@ void SdExportTest::testSoftEdges()
CPPUNIT_ASSERT_EQUAL(sal_Int32(635), nRad); // 18 pt
// Test ODF element
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
// check that we actually test graphic style
assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[2]",
@@ -1457,7 +1457,7 @@ void SdExportTest::testShadowBlur()
CPPUNIT_ASSERT(xShape->getPropertyValue("ShadowBlur") >>= nRad);
CPPUNIT_ASSERT_EQUAL(sal_Int32(388), nRad); // 11 pt = 388 Hmm
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
assertXPath(pXmlDoc, "/office:document-content/office:automatic-styles/style:style[3]",
"family", "graphic");
@@ -1485,7 +1485,7 @@ void SdExportTest::testTdf128550()
{
loadFromURL(u"pptx/tdf128550.pptx");
utl::TempFileNamed tempFile = save("impress8");
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
assertXPath(pXmlDoc, "//anim:iterate[@anim:sub-item='background']", 1);
assertXPath(pXmlDoc, "//anim:iterate[@anim:sub-item='text']", 4);
}
@@ -1657,7 +1657,7 @@ void SdExportTest::testMasterPageBackgroundFullSize()
sal_Int16(0), xBackgroundProps->getPropertyValue("FillTransparence").get<sal_Int16>());
}
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "styles.xml");
assertXPath(pXmlDoc,
"/office:document-styles/office:automatic-styles/"
"style:style[@style:family='drawing-page' and @style:name = "
@@ -1738,7 +1738,7 @@ void SdExportTest::testColumnsODG()
CPPUNIT_ASSERT_EQUAL(sal_Int32(700), pTextObj->GetTextColumnsSpacing());
}
- xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(tempFile.GetURL(), "content.xml");
assertXPath(pXmlDoc,
"/office:document-content/office:automatic-styles/style:style/"
"style:graphic-properties/style:columns",
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 4658cde73244..7878fb90a0f5 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -65,11 +65,11 @@ uno::Reference<drawing::XShape> findChildShapeByText(const uno::Reference<drawin
}
}
-class SdImportTestSmartArt : public SdUnoApiTest
+class SdImportTestSmartArt : public SdModelTestBase
{
public:
SdImportTestSmartArt()
- : SdUnoApiTest("/sd/qa/unit/data/")
+ : SdModelTestBase("/sd/qa/unit/data/")
{
}
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 1121403f4835..6e10700d5671 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -76,11 +76,11 @@ static std::ostream& operator<<(std::ostream& rStrm, const uno::Reference<T>& xR
}
/// Impress import filters tests.
-class SdImportTest : public SdUnoApiTest
+class SdImportTest : public SdModelTestBase
{
public:
SdImportTest()
- : SdUnoApiTest("/sd/qa/unit/data/")
+ : SdModelTestBase("/sd/qa/unit/data/")
{
}
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index f4a092384a92..eea2179e15c3 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -62,11 +62,11 @@
using namespace ::com::sun::star;
-class SdImportTest2 : public SdUnoApiTest
+class SdImportTest2 : public SdModelTestBase
{
public:
SdImportTest2()
- : SdUnoApiTest("/sd/qa/unit/data/")
+ : SdModelTestBase("/sd/qa/unit/data/")
{
}
diff --git a/sd/qa/unit/layout-tests.cxx b/sd/qa/unit/layout-tests.cxx
index 24b4405a93d2..2a7c0e0a200b 100644
--- a/sd/qa/unit/layout-tests.cxx
+++ b/sd/qa/unit/layout-tests.cxx
@@ -6,17 +6,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/unoapi_test.hxx>
-#include <test/xmltesttools.hxx>
+#include <test/unoapixml_test.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/sfxbasemodel.hxx>
-class SdLayoutTest : public UnoApiTest, public XmlTestTools
+class SdLayoutTest : public UnoApiXmlTest
{
public:
SdLayoutTest()
- : UnoApiTest("/sd/qa/unit/data/")
+ : UnoApiXmlTest("/sd/qa/unit/data/")
{
}
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index f637476dbc7b..bc75af293978 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -8,8 +8,8 @@
*/
#include <officecfg/Office/Common.hxx>
-#include "sdmodeltestbase.hxx"
+#include <test/unoapixml_test.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <comphelper/processfactory.hxx>
@@ -30,6 +30,8 @@
#include <com/sun/star/table/XTable.hpp>
#include <com/sun/star/table/XMergeableCellRange.hpp>
+#include <DrawDocShell.hxx>
+#include <drawdoc.hxx>
#include <vcl/scheduler.hxx>
#include <osl/thread.hxx>
#include <svx/sdr/table/tablecontroller.hxx>
@@ -53,16 +55,17 @@
#include <svx/view3d.hxx>
#include <svx/scene3d.hxx>
#include <svx/sdmetitm.hxx>
+#include <unomodel.hxx>
#include <unotools/fcm.hxx>
using namespace ::com::sun::star;
/// Impress miscellaneous tests.
-class SdMiscTest : public SdUnoApiTestXml
+class SdMiscTest : public UnoApiXmlTest
{
public:
SdMiscTest()
- : SdUnoApiTestXml("/sd/qa/unit/data/")
+ : UnoApiXmlTest("/sd/qa/unit/data/")
{
}
@@ -473,7 +476,7 @@ void SdMiscTest::testTdf101242_ODF_add_settings()
utl::TempFileNamed aTempFile = save("draw8");
// Verify, that the saved document still has the ODF attributes
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "styles.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'styles.xml'", pXmlDoc);
const OString sPathStart(
"/office:document-styles/office:master-styles/draw:layer-set/draw:layer");
@@ -483,7 +486,7 @@ void SdMiscTest::testTdf101242_ODF_add_settings()
assertXPath(pXmlDoc, sPathStart + "[@draw:name='measurelines' and @draw:display='printer']");
// Verify, that the saved document has got the items in settings.xml
- xmlDocUniquePtr pXmlDoc2 = parseExport(aTempFile, "settings.xml");
+ xmlDocUniquePtr pXmlDoc2 = parseExport(aTempFile.GetURL(), "settings.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'settings.xml'", pXmlDoc2);
const OString sPathStart2("/office:document-settings/office:settings/"
"config:config-item-set[@config:name='ooo:view-settings']/"
@@ -527,7 +530,7 @@ void SdMiscTest::testTdf101242_ODF_no_settings()
utl::TempFileNamed aTempFile = save("draw8");
// Verify, that the saved document still has the ODF attributes
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "styles.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'styles.xml'", pXmlDoc);
const OString sPathStart(
"/office:document-styles/office:master-styles/draw:layer-set/draw:layer");
@@ -537,7 +540,7 @@ void SdMiscTest::testTdf101242_ODF_no_settings()
assertXPath(pXmlDoc, sPathStart + "[@draw:name='measurelines' and @draw:display='printer']");
// Verify, that the saved document has no layer items in settings.xml
- xmlDocUniquePtr pXmlDoc2 = parseExport(aTempFile, "settings.xml");
+ xmlDocUniquePtr pXmlDoc2 = parseExport(aTempFile.GetURL(), "settings.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'settings.xml'", pXmlDoc2);
const OString sPathStart2("/office:document-settings/office:settings/"
"config:config-item-set[@config:name='ooo:view-settings']/"
@@ -573,7 +576,7 @@ void SdMiscTest::testTdf101242_settings_keep()
utl::TempFileNamed aTempFile = save("draw8");
// Verify, that the saved document has the ODF attributes
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "styles.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'styles.xml'", pXmlDoc);
const OString sPathStart(
"/office:document-styles/office:master-styles/draw:layer-set/draw:layer");
@@ -583,7 +586,7 @@ void SdMiscTest::testTdf101242_settings_keep()
assertXPath(pXmlDoc, sPathStart + "[@draw:name='measurelines' and @draw:display='printer']");
// Verify, that the saved document still has the items in settings.xml
- xmlDocUniquePtr pXmlDoc2 = parseExport(aTempFile, "settings.xml");
+ xmlDocUniquePtr pXmlDoc2 = parseExport(aTempFile.GetURL(), "settings.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'settings.xml'", pXmlDoc2);
const OString sPathStart2("/office:document-settings/office:settings/"
"config:config-item-set[@config:name='ooo:view-settings']/"
@@ -628,7 +631,7 @@ void SdMiscTest::testTdf101242_settings_remove()
utl::TempFileNamed aTempFile = save("draw8");
// Verify, that the saved document has the ODF attributes
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "styles.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "styles.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'styles.xml'", pXmlDoc);
const OString sPathStart(
"/office:document-styles/office:master-styles/draw:layer-set/draw:layer");
@@ -638,7 +641,7 @@ void SdMiscTest::testTdf101242_settings_remove()
assertXPath(pXmlDoc, sPathStart + "[@draw:name='measurelines' and @draw:display='printer']");
// Verify, that the saved document has no layer items in settings.xml
- xmlDocUniquePtr pXmlDoc2 = parseExport(aTempFile, "settings.xml");
+ xmlDocUniquePtr pXmlDoc2 = parseExport(aTempFile.GetURL(), "settings.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'settings.xml'", pXmlDoc2);
const OString sPathStart2("/office:document-settings/office:settings/"
"config:config-item-set[@config:name='ooo:view-settings']/"
@@ -682,7 +685,7 @@ void SdMiscTest::testTdf119392()
utl::TempFileNamed aTempFile = save("draw8");
// Verify correct bit order in bitfield in the config items in settings.xml
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "settings.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "settings.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'settings.xml'", pXmlDoc);
const OString sPathStart("/office:document-settings/office:settings/"
"config:config-item-set[@config:name='ooo:view-settings']/"
@@ -782,7 +785,7 @@ void SdMiscTest::testTdf98839_ShearVFlipH()
// Save and examine attribute draw:transform
utl::TempFileNamed aTempFile = save("draw8");
- xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
CPPUNIT_ASSERT_MESSAGE("Failed to get 'content.xml'", pXmlDoc);
const OString sPathStart("/office:document-content/office:body/office:drawing/draw:page");
assertXPath(pXmlDoc, sPathStart);
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index 094521e70bff..210301b8452a 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -12,13 +12,8 @@
#include <memory>
#include <string_view>
-#include <test/bootstrapfixture.hxx>
-#include <test/unoapi_test.hxx>
+#include <test/unoapixml_test.hxx>
#include <test/xmldiff.hxx>
-#include <test/xmltesttools.hxx>
-
-#include <unotest/filters-test.hxx>
-#include <unotest/macros_test.hxx>
#include <drawdoc.hxx>
#include <DrawDocShell.hxx>
@@ -43,11 +38,11 @@
using namespace ::com::sun::star;
-class SdUnoApiTest : public UnoApiTest
+class SdModelTestBase : public UnoApiXmlTest
{
public:
- SdUnoApiTest(OUString path)
- : UnoApiTest(path)
+ SdModelTestBase(OUString path)
+ : UnoApiXmlTest(path)
{
}
@@ -143,22 +138,6 @@ public:
}
};
-class SdUnoApiTestXml : public SdUnoApiTest, public XmlTestTools
-{
-public:
- SdUnoApiTestXml(OUString path)
- : SdUnoApiTest(path)
- {
- }
-
- xmlDocUniquePtr parseExport(utl::TempFileNamed const& rTempFile, OUString const& rStreamName)
- {
- std::unique_ptr<SvStream> const pStream(parseExportStream(rTempFile.GetURL(), rStreamName));
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
- return pXmlDoc;
- }
-};
-
CPPUNIT_NS_BEGIN
template <> struct assertion_traits<Color>
diff --git a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
index d47cb3700ce3..3d6d74d6702b 100644
--- a/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
+++ b/sd/qa/unit/tiledrendering/LOKitSearchTest.cxx
@@ -7,13 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include "../sdmodeltestbase.hxx"
-
#include "CallbackRecorder.hxx"
+#include <test/unoapi_test.hxx>
-#include <test/bootstrapfixture.hxx>
#include <test/helper/transferable.hxx>
-#include <test/xmltesttools.hxx>
#include <comphelper/dispatchcommand.hxx>
#include <comphelper/processfactory.hxx>
@@ -25,6 +22,8 @@
#include <ViewShell.hxx>
#include <unomodel.hxx>
+#include <DrawDocShell.hxx>
+#include <drawdoc.hxx>
#include <sdpage.hxx>
#include <svx/svdograf.hxx>
#include <vcl/filter/PDFiumLibrary.hxx>
@@ -33,7 +32,7 @@
using namespace css;
-class LOKitSearchTest : public UnoApiTest, public XmlTestTools
+class LOKitSearchTest : public UnoApiTest
{
public:
LOKitSearchTest()
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index a7e9095ed950..c1a8890cf5a4 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -7,12 +7,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/unoapi_test.hxx>
+#include <test/unoapixml_test.hxx>
#include <app.hrc>
#include <test/bootstrapfixture.hxx>
#include <test/helper/transferable.hxx>
-#include <test/xmltesttools.hxx>
#include <boost/property_tree/json_parser.hpp>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <sal/log.hxx>
@@ -70,7 +69,7 @@ static std::ostream& operator<<(std::ostream& os, ViewShellId id)
return os;
}
-class SdTiledRenderingTest : public UnoApiTest, public XmlTestTools
+class SdTiledRenderingTest : public UnoApiXmlTest
{
public:
SdTiledRenderingTest();
@@ -218,7 +217,7 @@ private:
};
SdTiledRenderingTest::SdTiledRenderingTest()
- : UnoApiTest("/sd/qa/unit/tiledrendering/data/"),
+ : UnoApiXmlTest("/sd/qa/unit/tiledrendering/data/"),
m_bFound(true),
m_nPart(0),
m_nSelectionBeforeSearchResult(0),
@@ -230,7 +229,7 @@ SdTiledRenderingTest::SdTiledRenderingTest()
void SdTiledRenderingTest::setUp()
{
- UnoApiTest::setUp();
+ UnoApiXmlTest::setUp();
// prevent showing warning message box
setenv("OOX_NO_SMARTART_WARNING", "1", 1);
@@ -251,7 +250,7 @@ void SdTiledRenderingTest::tearDown()
m_callbackWrapper.clear();
comphelper::LibreOfficeKit::setActive(false);
- UnoApiTest::tearDown();
+ UnoApiXmlTest::tearDown();
}
SdXImpressDocument* SdTiledRenderingTest::createDoc(const char* pName, const uno::Sequence<beans::PropertyValue>& rArguments)
diff --git a/sfx2/qa/cppunit/test_misc.cxx b/sfx2/qa/cppunit/test_misc.cxx
index 709dece2a1c2..652533db4551 100644
--- a/sfx2/qa/cppunit/test_misc.cxx
+++ b/sfx2/qa/cppunit/test_misc.cxx
@@ -26,8 +26,7 @@
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XStorable.hpp>
-#include <test/xmltesttools.hxx>
-#include <test/unoapi_test.hxx>
+#include <test/unoapixml_test.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <comphelper/propertysequence.hxx>
@@ -42,12 +41,11 @@ using namespace ::com::sun::star;
namespace {
class MiscTest
- : public UnoApiTest
- , public XmlTestTools
+ : public UnoApiXmlTest
{
public:
MiscTest()
- : UnoApiTest("/sfx2/qa/cppunit/misc/")
+ : UnoApiXmlTest("/sfx2/qa/cppunit/misc/")
{
}
diff --git a/svx/qa/unit/sdr.cxx b/svx/qa/unit/sdr.cxx
index 9aa087c56f4c..4e90cedff37a 100644
--- a/svx/qa/unit/sdr.cxx
+++ b/svx/qa/unit/sdr.cxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/unoapi_test.hxx>
-#include <test/xmltesttools.hxx>
+#include <test/unoapixml_test.hxx>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
@@ -29,11 +28,11 @@ using namespace ::com::sun::star;
namespace
{
/// Tests for svx/source/sdr/ code.
-class SdrTest : public UnoApiTest, public XmlTestTools
+class SdrTest : public UnoApiXmlTest
{
public:
SdrTest()
- : UnoApiTest("svx/qa/unit/data/")
+ : UnoApiXmlTest("svx/qa/unit/data/")
{
}
diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx
index 0e4306f8a5f2..82824d048c80 100644
--- a/svx/qa/unit/svdraw.cxx
+++ b/svx/qa/unit/svdraw.cxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/unoapi_test.hxx>
-#include <test/xmltesttools.hxx>
+#include <test/unoapixml_test.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
@@ -47,11 +46,11 @@ using namespace ::com::sun::star;
namespace
{
/// Tests for svx/source/svdraw/ code.
-class SvdrawTest : public UnoApiTest, public XmlTestTools
+class SvdrawTest : public UnoApiXmlTest
{
public:
SvdrawTest()
- : UnoApiTest("svx/qa/unit/data/")
+ : UnoApiXmlTest("svx/qa/unit/data/")
{
}
diff --git a/svx/qa/unit/table.cxx b/svx/qa/unit/table.cxx
index c91344c24b6d..657cfcc975d2 100644
--- a/svx/qa/unit/table.cxx
+++ b/svx/qa/unit/table.cxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/unoapi_test.hxx>
-#include <test/xmltesttools.hxx>
+#include <test/unoapixml_test.hxx>
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/drawing/XDrawPage.hpp>
@@ -34,11 +33,11 @@ using namespace ::com::sun::star;
namespace
{
/// Tests for svx/source/table/ code.
-class Test : public UnoApiTest, public XmlTestTools
+class Test : public UnoApiXmlTest
{
public:
Test()
- : UnoApiTest("svx/qa/unit/data/")
+ : UnoApiXmlTest("svx/qa/unit/data/")
{
}
diff --git a/svx/qa/unit/unodraw.cxx b/svx/qa/unit/unodraw.cxx
index 51dae19dba00..5b75d0352813 100644
--- a/svx/qa/unit/unodraw.cxx
+++ b/svx/qa/unit/unodraw.cxx
@@ -23,7 +23,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
-#include <test/unoapi_test.hxx>
+#include <test/unoapixml_test.hxx>
#include <unotools/tempfile.hxx>
#include <svx/unopage.hxx>
#include <vcl/virdev.hxx>
@@ -31,7 +31,6 @@
#include <drawinglayer/tools/primitive2dxmldump.hxx>
#include <svx/sdr/contact/viewcontact.hxx>
#include <svx/sdr/contact/viewobjectcontact.hxx>
-#include <test/xmltesttools.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/mediadescriptor.hxx>
#include <vcl/filter/PngImageReader.hxx>
@@ -43,11 +42,11 @@ using namespace ::com::sun::star;
namespace
{
/// Tests for svx/source/unodraw/ code.
-class UnodrawTest : public UnoApiTest, public XmlTestTools
+class UnodrawTest : public UnoApiXmlTest
{
public:
UnodrawTest()
- : UnoApiTest("svx/qa/unit/data/")
+ : UnoApiXmlTest("svx/qa/unit/data/")
{
}
};
diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk
index 1476d00997aa..98eb17a5a557 100644
--- a/test/Library_subsequenttest.mk
+++ b/test/Library_subsequenttest.mk
@@ -38,10 +38,12 @@ $(eval $(call gb_Library_use_libraries,subsequenttest,\
$(eval $(call gb_Library_use_externals,subsequenttest,\
boost_headers \
cppunit \
+ libxml2 \
))
$(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/unoapi_test \
+ test/source/unoapixml_test \
test/source/a11y/AccessibilityTools \
test/source/a11y/accessibletestbase \
test/source/a11y/swaccessibletestbase \
diff --git a/test/source/unoapixml_test.cxx b/test/source/unoapixml_test.cxx
new file mode 100644
index 000000000000..b2b3848ab937
--- /dev/null
+++ b/test/source/unoapixml_test.cxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <test/unoapixml_test.hxx>
+
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/propertyvalue.hxx>
+
+#include <sfx2/app.hxx>
+#include <sfx2/objsh.hxx>
+#include <utility>
+
+using namespace css;
+using namespace css::uno;
+
+UnoApiXmlTest::UnoApiXmlTest(OUString path)
+ : UnoApiTest(path)
+{
+}
+
+xmlDocUniquePtr UnoApiXmlTest::parseExport(OUString const& url, OUString const& rStreamName)
+{
+ std::unique_ptr<SvStream> const pStream(parseExportStream(url, rStreamName));
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ return pXmlDoc;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/qa/unit/draw.cxx b/xmloff/qa/unit/draw.cxx
index d5c5ab0bdced..93b230db8d72 100644
--- a/xmloff/qa/unit/draw.cxx
+++ b/xmloff/qa/unit/draw.cxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/unoapi_test.hxx>
-#include <test/xmltesttools.hxx>
+#include <test/unoapixml_test.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
@@ -38,7 +37,7 @@
using namespace ::com::sun::star;
/// Covers xmloff/source/draw/ fixes.
-class XmloffDrawTest : public UnoApiTest, public XmlTestTools
+class XmloffDrawTest : public UnoApiXmlTest
{
public:
XmloffDrawTest();
@@ -47,7 +46,7 @@ public:
};
XmloffDrawTest::XmloffDrawTest()
- : UnoApiTest("/xmloff/qa/unit/data/")
+ : UnoApiXmlTest("/xmloff/qa/unit/data/")
{
}
@@ -125,8 +124,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.GetURL(), "styles.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "styles.xml");
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 12
// - Actual : 0
@@ -164,8 +162,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testVideoSnapshot)
// Execute ODP export:
utl::TempFileNamed aTempFile = save("impress8");
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// Check that the preview was exported:
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
@@ -207,8 +204,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// 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
// i.e. only the direct color was written, but not the theme reference.
@@ -318,8 +314,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionMetalTypeExtended)
utl::TempFileNamed aTempFile = save("writer8");
// assert XML.
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
assertXPath(pXmlDoc, "//draw:enhanced-geometry", "extrusion-metal", "true");
assertXPath(pXmlDoc,
"//draw:enhanced-geometry[@loext:extrusion-metal-type='loext:MetalMSCompatible']");
@@ -342,8 +337,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionMetalTypeStrict)
utl::TempFileNamed aTempFile = save("writer8");
// assert XML.
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
assertXPath(pXmlDoc, "//draw:enhanced-geometry", "extrusion-metal", "true");
assertXPath(pXmlDoc, "//draw:enhanced-geometry[@loext:extrusion-metal-type]", 0);
@@ -381,8 +375,7 @@ CPPUNIT_TEST_FIXTURE(XmloffDrawTest, testExtrusionSpecularityExtended)
utl::TempFileNamed aTempFile = save("writer8");
// assert XML.
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
assertXPath(pXmlDoc, "//draw:enhanced-geometry[@draw:extrusion-specularity='100%']");
assertXPath(pXmlDoc,
"//draw:enhanced-geometry[@loext:extrusion-specularity-loext='122.0703125%']");
diff --git a/xmloff/qa/unit/style.cxx b/xmloff/qa/unit/style.cxx
index aeaf9f20866f..f5b42fac1fb0 100644
--- a/xmloff/qa/unit/style.cxx
+++ b/xmloff/qa/unit/style.cxx
@@ -11,8 +11,7 @@
#include <string_view>
-#include <test/unoapi_test.hxx>
-#include <test/xmltesttools.hxx>
+#include <test/unoapixml_test.hxx>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
@@ -32,7 +31,7 @@
using namespace ::com::sun::star;
/// Covers xmloff/source/style/ fixes.
-class XmloffStyleTest : public UnoApiTest, public XmlTestTools
+class XmloffStyleTest : public UnoApiXmlTest
{
public:
XmloffStyleTest();
@@ -40,7 +39,7 @@ public:
};
XmloffStyleTest::XmloffStyleTest()
- : UnoApiTest("/xmloff/qa/unit/data/")
+ : UnoApiXmlTest("/xmloff/qa/unit/data/")
{
}
@@ -191,8 +190,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.GetURL(), "styles.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "styles.xml");
assertXPath(pXmlDoc,
"/office:document-styles/office:styles/style:style[@style:name='FrameBTLR']/"
"style:graphic-properties[@loext:writing-mode]");
@@ -213,8 +211,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.GetURL(), "styles.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "styles.xml");
assertXPathNoAttribute(pXmlDoc,
"/office:document-styles/office:styles/"
"style:style[@style:name='FrameBTLR']/style:graphic-properties",
@@ -247,8 +244,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
assertXPath(
pXmlDoc,
"/office:document-content/office:automatic-styles/style:style[@style:name='gr1']/"
@@ -271,8 +267,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
assertXPathNoAttribute(pXmlDoc,
"/office:document-content/office:automatic-styles/"
"style:style[@style:name='gr1']/style:graphic-properties",
@@ -305,8 +300,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
assertXPath(
pXmlDoc,
"/office:document-content/office:automatic-styles/style:style[@style:name='gr1']/"
@@ -329,8 +323,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
assertXPathNoAttribute(pXmlDoc,
"/office:document-content/office:automatic-styles/"
"style:style[@style:name='gr1']/style:graphic-properties",
diff --git a/xmloff/qa/unit/text.cxx b/xmloff/qa/unit/text.cxx
index bb86c8df35d4..7a78848c4b7a 100644
--- a/xmloff/qa/unit/text.cxx
+++ b/xmloff/qa/unit/text.cxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/unoapi_test.hxx>
-#include <test/xmltesttools.hxx>
+#include <test/unoapixml_test.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
@@ -29,7 +28,7 @@
using namespace ::com::sun::star;
/// Covers xmloff/source/text/ fixes.
-class XmloffStyleTest : public UnoApiTest, public XmlTestTools
+class XmloffStyleTest : public UnoApiXmlTest
{
public:
XmloffStyleTest();
@@ -37,7 +36,7 @@ public:
};
XmloffStyleTest::XmloffStyleTest()
- : UnoApiTest("/xmloff/qa/unit/data/")
+ : UnoApiXmlTest("/xmloff/qa/unit/data/")
{
}
@@ -216,8 +215,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// Without the accompanying fix in place, this failed with:
// - XPath '//text:list' unexpected 'id' attribute
// i.e. xml:id="..." was written unconditionally, even when no other list needed it.
@@ -244,8 +242,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// Without the accompanying fix in place, this failed with:
// - XPath '//text:line-break' number of nodes is incorrect
// i.e. the clearing break was lost on export.
@@ -318,8 +315,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testRelativeWidth)
aTempFile.EnableKillingFile();
xStorable->storeToURL(aTempFile.GetURL(), aStoreProps);
- std::unique_ptr<SvStream> pStream = parseExportStream(aTempFile.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// Without the accompanying fix in place, this failed with:
// - Expected: 3.1492in (8cm)
// - Actual : 0.0161in (0.04 cm)
@@ -356,8 +352,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// Without the accompanying fix in place, this failed with:
// - Expected: 0.7874in
// - Actual : 0in
@@ -386,8 +381,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// Without the accompanying fix in place, this failed with:
// - XPath '//loext:content-control' number of nodes is incorrect
// i.e. the content control was lost on export.
@@ -449,8 +443,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
assertXPath(pXmlDoc, "//loext:content-control", "checkbox", "true");
assertXPath(pXmlDoc, "//loext:content-control", "checked", "true");
assertXPath(pXmlDoc, "//loext:content-control", "checked-state", u"☒");
@@ -536,8 +529,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// Without the accompanying fix in place, this failed with:
// - Expected: 1
// - Actual : 0
@@ -621,8 +613,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//loext:content-control' no attribute 'picture' exist
assertXPath(pXmlDoc, "//loext:content-control", "picture", "true");
@@ -680,10 +671,9 @@ 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.GetURL(), "content.xml");
+ xmlDocUniquePtr pXmlDoc = parseExport(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());
assertXPath(pXmlDoc, "//loext:content-control", "date", "true");
assertXPath(pXmlDoc, "//loext:content-control", "date-format", "YYYY-MM-DD");
assertXPath(pXmlDoc, "//loext:content-control", "date-rfc-language-tag", "en-US");
@@ -747,8 +737,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//loext:content-control' no attribute 'plain-text' exist
// i.e. the plain text content control was turned into a rich text one on export.
@@ -803,8 +792,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// Without the accompanying fix in place, this test would have failed with:
// - XPath '//loext:content-control' no attribute 'combobox' exist
// i.e. the combo box content control was turned into a drop-down one on export.
@@ -833,8 +821,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.GetURL(), "content.xml");
- xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get());
+ xmlDocUniquePtr pXmlDoc = parseExport(aTempFile.GetURL(), "content.xml");
// Without the accompanying fix in place, this test would have failed with:
// - Expression: prop
// - XPath '//loext:content-control' no attribute 'alias' exist