summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-01-03 11:49:02 +0600
committerMichael Stahl <michael.stahl@allotropia.de>2024-01-10 13:26:43 +0100
commit496386d34ba5f55a6a7724929e83374f6a4a9eef (patch)
tree920caa576537bbeaf85cf744ef31afadf80e8d53 /oox
parentc0f8ebe8554f55489e22820e3f230e937243289c (diff)
UnoApiTest::loadFromURL -> UnoApiTest::loadFromFile
The old name was misleading (it doesn't take an URL, but a filename); also, now it's easier to grep for it - doesn't get mixed with vcl::graphic::loadFromURL. Change-Id: Ib88d2194200a6a54d2326971e0306ba39f0c7025 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161578 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161888 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'oox')
-rw-r--r--oox/qa/unit/drawingml.cxx44
-rw-r--r--oox/qa/unit/export.cxx80
-rw-r--r--oox/qa/unit/mathml.cxx4
-rw-r--r--oox/qa/unit/mcgr.cxx10
-rw-r--r--oox/qa/unit/shape.cxx34
-rw-r--r--oox/qa/unit/vml.cxx16
-rw-r--r--oox/qa/unit/wpc_drawing_canvas.cxx24
7 files changed, 106 insertions, 106 deletions
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index 89658e0874fc..ba2eaf75a144 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -70,7 +70,7 @@ public:
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTransparentText)
{
- loadFromURL(u"transparent-text.pptx");
+ loadFromFile(u"transparent-text.pptx");
saveAndReload("Impress Office Open XML");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -94,7 +94,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTransparentText)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf131082)
{
- loadFromURL(u"tdf131082.pptx");
+ loadFromFile(u"tdf131082.pptx");
saveAndReload("Impress Office Open XML");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -115,7 +115,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf131082)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPresetAdjustValue)
{
- loadFromURL(u"preset-adjust-value.pptx");
+ loadFromFile(u"preset-adjust-value.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -137,7 +137,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPresetAdjustValue)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartDataLabelCharColor)
{
- loadFromURL(u"chart-data-label-char-color.docx");
+ loadFromFile(u"chart-data-label-char-color.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -174,7 +174,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartDataLabelCharColor)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGradientMultiStepTransparency)
{
// Load a document with a multi-step gradient.
- loadFromURL(u"gradient-multistep-transparency.pptx");
+ loadFromFile(u"gradient-multistep-transparency.pptx");
// Check the end transparency of the gradient.
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -210,7 +210,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGradientMultiStepTransparency)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAlignment)
{
- loadFromURL(u"shape-text-alignment.pptx");
+ loadFromFile(u"shape-text-alignment.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -228,7 +228,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAlignment)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAdjustLeft)
{
- loadFromURL(u"shape-text-adjust-left.pptx");
+ loadFromFile(u"shape-text-adjust-left.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -245,7 +245,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testShapeTextAdjustLeft)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testCameraRotationRevolution)
{
- loadFromURL(u"camera-rotation-revolution.docx");
+ loadFromFile(u"camera-rotation-revolution.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -269,7 +269,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testCameraRotationRevolution)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf146534_CameraRotationRevolutionNonWpsShapes)
{
- loadFromURL(u"camera-rotation-revolution-nonwps.pptx");
+ loadFromFile(u"camera-rotation-revolution-nonwps.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -306,7 +306,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow)
CPPUNIT_ASSERT(xShape->getPropertyValue("ShadowColor") >>= nColor);
CPPUNIT_ASSERT_EQUAL(Color(0xff0000), nColor);
};
- loadFromURL(u"table-shadow.pptx");
+ loadFromFile(u"table-shadow.pptx");
// Without the accompanying fix in place, this test would have failed, because shadow on a table
// was lost on import.
verify(mxComponent);
@@ -321,7 +321,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testGroupShapeSmartArt)
{
// Given a file with a smartart inside a group shape:
- loadFromURL(u"smartart-groupshape.pptx");
+ loadFromFile(u"smartart-groupshape.pptx");
// Then make sure that the smartart is not just an empty group shape:
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -339,7 +339,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf142605_CurveSize)
// The document contains a Bezier curve, where the control points are outside the bounding
// rectangle of the shape. Error was, that the export uses a path size which included the
// control points.
- loadFromURL(u"tdf142605_CurveSize.odp");
+ loadFromFile(u"tdf142605_CurveSize.odp");
saveAndReload("Impress Office Open XML");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -366,7 +366,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartThemeOverride)
{
// Given a document with 2 slides, slide1 has a chart with a theme override and slide2 has a
// shape:
- loadFromURL(u"chart-theme-override.pptx");
+ loadFromFile(u"chart-theme-override.pptx");
// Then make sure that the slide 2 shape's text color is blue, not red:
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -390,7 +390,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testChartThemeOverride)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPptxTheme)
{
// Given a PPTX file with a slide -> master slide -> theme:
- loadFromURL(u"theme.pptx");
+ loadFromFile(u"theme.pptx");
// Then make sure the theme + referring to that theme is imported:
// Check the imported theme of the master page:
@@ -442,7 +442,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testPptxTheme)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf132557_footerCustomShapes)
{
// slide with date, footer, slide number with custom shapes
- loadFromURL(u"testTdf132557_footerCustomShapes.pptx");
+ loadFromFile(u"testTdf132557_footerCustomShapes.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -468,7 +468,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf132557_footerCustomShapes)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColorTint_Table)
{
// Given a document with a table style, using theme color with tinting in the A2 cell:
- loadFromURL(u"theme-tint.pptx");
+ loadFromFile(u"theme-tint.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -510,7 +510,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColorTint_Table)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testThemeColor_Shape)
{
// Given a document with a table style, using theme color with tinting in the A2 cell:
- loadFromURL(u"ThemeShapesReference.pptx");
+ loadFromFile(u"ThemeShapesReference.pptx");
// Then make sure that we only import theming info to the doc model if the effects are limited
// to lum mod / off that we can handle (i.e. no tint/shade):
@@ -581,7 +581,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testVert270AndTextRot)
// tdf##149551. The document contains a shape with attributes 'rot="720000"' and 'vert="vert270"'
// of the <bodyPr> element. Without the fix the simulation of vert270 had overwritten the text
// rotation angle and thus 'rot'="720000" was lost.
- loadFromURL(u"tdf149551_vert270AndTextRot.pptx");
+ loadFromFile(u"tdf149551_vert270AndTextRot.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -606,7 +606,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTextRot)
// tdf#149551 The document contains a shape with attribute 'rot="720000"' of the <bodyPr> element.
// Without fix, the text rotation angle was saved in "TextPreRotateAngle" instead of
// "TextRotateAngle". That resulted in unrotated but sheared text.
- loadFromURL(u"tdf149551_TextRot.pptx");
+ loadFromFile(u"tdf149551_TextRot.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -637,7 +637,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTextRot)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf113187ConstantArcTo)
{
- loadFromURL(u"tdf113187_arcTo_withoutReferences.pptx");
+ loadFromFile(u"tdf113187_arcTo_withoutReferences.pptx");
// Get ViewBox of shape
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -658,7 +658,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf113187ConstantArcTo)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf125085WordArtFontTheme)
{
// The font info for the shape is in the theme, the text run has no font settings.
- loadFromURL(u"tdf125085_WordArtFontTheme.pptx");
+ loadFromFile(u"tdf125085_WordArtFontTheme.pptx");
// Get shape and its properties
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -681,7 +681,7 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf125085WordArtFontTheme)
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf125085WordArtFontText)
{
// The font info for the shape is in the text run inside the shape.
- loadFromURL(u"tdf125085_WordArtFontText.pptx");
+ loadFromFile(u"tdf125085_WordArtFontText.pptx");
// Get shape and its properties
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx
index 4df8aaa8f587..415c5fe8d02f 100644
--- a/oox/qa/unit/export.cxx
+++ b/oox/qa/unit/export.cxx
@@ -26,7 +26,7 @@ public:
CPPUNIT_TEST_FIXTURE(Test, testPolylineConnectorPosition)
{
// Given a document with a group shape and therein a polyline and a connector.
- loadFromURL(u"tdf141786_PolylineConnectorInGroup.odt");
+ loadFromFile(u"tdf141786_PolylineConnectorInGroup.odt");
// When saving that to DOCX:
save("Office Open XML Text");
@@ -51,7 +51,7 @@ CPPUNIT_TEST_FIXTURE(Test, testPolylineConnectorPosition)
CPPUNIT_TEST_FIXTURE(Test, testRotatedShapePosition)
{
// Given a document with a group shape and therein a rotated custom shape.
- loadFromURL(u"tdf141786_RotatedShapeInGroup.odt");
+ loadFromFile(u"tdf141786_RotatedShapeInGroup.odt");
// FIXME: validation error in OOXML export: Errors: 3
skipValidation();
@@ -73,7 +73,7 @@ CPPUNIT_TEST_FIXTURE(Test, testRotatedShapePosition)
CPPUNIT_TEST_FIXTURE(Test, testDmlGroupshapePolygon)
{
// Given a document with a group shape, containing a single polygon child shape:
- loadFromURL(u"dml-groupshape-polygon.docx");
+ loadFromFile(u"dml-groupshape-polygon.docx");
// FIXME: validation error in OOXML export: Errors: 9
skipValidation();
@@ -94,7 +94,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDmlGroupshapePolygon)
CPPUNIT_TEST_FIXTURE(Test, testCustomShapeArrowExport)
{
// Given a document with a few different kinds of arrow shapes in it:
- loadFromURL(u"tdf142602_CustomShapeArrows.odt");
+ loadFromFile(u"tdf142602_CustomShapeArrows.odt");
// FIXME: validation error in OOXML export: Errors: 11
skipValidation();
@@ -283,7 +283,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCustomShapeArrowExport)
CPPUNIT_TEST_FIXTURE(Test, testCameraRevolutionGrabBag)
{
// Given a PPTX file that contains camera revolution (rotation around z axis) applied shapes
- loadFromURL(u"camera-rotation-revolution-nonwps.pptx");
+ loadFromFile(u"camera-rotation-revolution-nonwps.pptx");
// When saving that document:
save("Impress Office Open XML");
@@ -308,7 +308,7 @@ CPPUNIT_TEST_FIXTURE(Test, testCameraRevolutionGrabBag)
CPPUNIT_TEST_FIXTURE(Test, testReferToTheme)
{
// Given a PPTX file that contains references to a theme:
- loadFromURL(u"refer-to-theme.pptx");
+ loadFromFile(u"refer-to-theme.pptx");
// When saving that document:
save("Impress Office Open XML");
@@ -352,7 +352,7 @@ CPPUNIT_TEST_FIXTURE(Test, testReferToTheme)
CPPUNIT_TEST_FIXTURE(Test, testThemeColor_ShapeFill)
{
// Given an ODP file that contains references to a theme for shape fill:
- loadFromURL(u"ReferenceShapeFill.fodp");
+ loadFromFile(u"ReferenceShapeFill.fodp");
// When saving that document:
save("Impress Office Open XML");
@@ -369,7 +369,7 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeColor_ShapeFill)
CPPUNIT_TEST_FIXTURE(Test, testTdf146690_endParagraphRunPropertiesNewLinesTextSize)
{
// Given a PPTX file that contains references to a theme:
- loadFromURL(u"endParaRPr-newline-textsize.pptx");
+ loadFromFile(u"endParaRPr-newline-textsize.pptx");
// When saving that document:
save("Impress Office Open XML");
@@ -388,7 +388,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf146690_endParagraphRunPropertiesNewLinesTextSi
CPPUNIT_TEST_FIXTURE(Test, testTdf147978_endsubpath)
{
// Given an odp file that contains a non-primitive custom shape with command N
- loadFromURL(u"tdf147978_endsubpath.odp");
+ loadFromFile(u"tdf147978_endsubpath.odp");
// When saving that document:
save("Impress Office Open XML");
@@ -405,7 +405,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_endsubpath)
CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandA)
{
// Given an odp file that contains a non-primitive custom shape with command N
- loadFromURL(u"tdf147978_enhancedPath_commandA.odp");
+ loadFromFile(u"tdf147978_enhancedPath_commandA.odp");
// When saving that document:
save("Impress Office Open XML");
@@ -426,7 +426,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandA)
CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandT)
{
// The odp file contains a non-primitive custom shape with commands MTZ
- loadFromURL(u"tdf147978_enhancedPath_commandT.odp");
+ loadFromFile(u"tdf147978_enhancedPath_commandT.odp");
// Export to pptx had only exported the command M and has used a wrong path size
save("Impress Office Open XML");
@@ -455,7 +455,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandT)
CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandXY)
{
// The odp file contains a non-primitive custom shapes with commands XY
- loadFromURL(u"tdf147978_enhancedPath_commandXY.odp");
+ loadFromFile(u"tdf147978_enhancedPath_commandXY.odp");
// Export to pptx had dropped commands X and Y.
save("Impress Office Open XML");
@@ -489,7 +489,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandXY)
CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandHIJK)
{
// The odp file contains a non-primitive custom shapes with commands H,I,J,K
- loadFromURL(u"tdf147978_enhancedPath_commandHIJK.odp");
+ loadFromFile(u"tdf147978_enhancedPath_commandHIJK.odp");
// Export to pptx had dropped commands X and Y.
save("Impress Office Open XML");
@@ -511,7 +511,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_commandHIJK)
CPPUNIT_TEST_FIXTURE(Test, testTdf147978_subpath)
{
// The odp file contains a non-primitive custom shapes with commands H,I,J,K
- loadFromURL(u"tdf147978_enhancedPath_subpath.pptx");
+ loadFromFile(u"tdf147978_enhancedPath_subpath.pptx");
// Export to pptx had dropped the subpaths.
save("Impress Office Open XML");
@@ -532,7 +532,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf147978_subpath)
CPPUNIT_TEST_FIXTURE(Test, testTdf100391TextAreaRect)
{
// The document has a custom shape of type "non-primitive" to trigger the custGeom export
- loadFromURL(u"tdf100391_TextAreaRect.odp");
+ loadFromFile(u"tdf100391_TextAreaRect.odp");
// When saving to PPTX the textarea rect was set to default instead of using the actual area
save("Impress Office Open XML");
@@ -553,7 +553,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf109169_OctagonBevel)
{
// The odp file contains an "Octagon Bevel" shape. Such has shading not in commands H,I,J,K
// but shading is generated in ctor of EnhancedCustomShape2d from the Type value.
- loadFromURL(u"tdf109169_OctagonBevel.odt");
+ loadFromFile(u"tdf109169_OctagonBevel.odt");
// FIXME: validation error in OOXML export: Errors: 1
skipValidation();
@@ -578,7 +578,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFaultyPathCommandsAWT)
// path. LO is tolerant and renders it so that is makes a moveTo to the start point of the arc or
// the end of the line respectively. Export to OOXML does the same now and writes a moveTo
// instead of the normally used lnTo. If a lnTo is written, MS Office shows nothing of the shape.
- loadFromURL(u"FaultyPathStart.odp");
+ loadFromFile(u"FaultyPathStart.odp");
save("Impress Office Open XML");
@@ -597,7 +597,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchXY)
// They use formulas with 'right' and 'bottom'.
// When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered. The
// line at right and bottom edge were positioned inside as if the shape had a square size.
- loadFromURL(u"tdf148784_StretchXY.odp");
+ loadFromFile(u"tdf148784_StretchXY.odp");
save("Impress Office Open XML");
// Verify the markup.
@@ -635,7 +635,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchCommandQ)
// They use formulas with 'right' and 'bottom'.
// When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered.
// That results in wrong arcs on the right or bottom side of the shape.
- loadFromURL(u"tdf148784_StretchCommandQ.odp");
+ loadFromFile(u"tdf148784_StretchCommandQ.odp");
save("Impress Office Open XML");
// Verify the markup.
@@ -674,7 +674,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148784StretchCommandVW)
// has only fixed values in the path.
// When saving to PPTX the attributes stretchpoint-x and stretchpoint-y were not considered.
// That results in circles instead of ellipses.
- loadFromURL(u"tdf148784_StretchCommandVW.odp");
+ loadFromFile(u"tdf148784_StretchCommandVW.odp");
save("Impress Office Open XML");
// Verify the markup.
@@ -708,7 +708,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149551VertPadding)
// The document has shape[1] with attribute vert="vert270" and shape[2] with vert="vert". The text
// has paddings lIns="720000"=2cm, tIns="360000"=1cm, rIns="0" and bIns="0".
// After load and save the paddings were rotated and a 90deg text rotation was added.
- loadFromURL(u"tdf149551_vert_and_padding.pptx");
+ loadFromFile(u"tdf149551_vert_and_padding.pptx");
save("Impress Office Open XML");
// Verify the markup. The values must be the same as in the original file.
@@ -730,7 +730,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149538upright)
// emulated by rotating the text area rectangle. On export there should be an upright="1"
// attribute but no 'rot' attribute. Without the fix the 'rot' attribute with values from
// the emulation was written out.
- loadFromURL(u"tdf149538_upright.pptx");
+ loadFromFile(u"tdf149538_upright.pptx");
save("Impress Office Open XML");
// Verify the markup. The values must be the same as in the original file.
@@ -741,7 +741,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149538upright)
CPPUNIT_TEST_FIXTURE(Test, testTdf151008VertAnchor)
{
- loadFromURL(u"tdf151008_eaVertAnchor.pptx");
+ loadFromFile(u"tdf151008_eaVertAnchor.pptx");
save("Impress Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
// The order of the shapes in the file is by name "Right", "Center", "Left", "RightMiddle",
@@ -771,7 +771,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf151008VertAnchor)
CPPUNIT_TEST_FIXTURE(Test, testFontworkBitmapFill)
{
// The document has a Fontwork shape with bitmap fill.
- loadFromURL(u"tdf128568_FontworkBitmapFill.odt");
+ loadFromFile(u"tdf128568_FontworkBitmapFill.odt");
// FIXME: validation error in OOXML export: Errors: 1
// Attribute ID is not allowed in element v:shape
@@ -802,7 +802,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkFontProperties)
{
// The document has five Fontwork shapes. They have bitmap fill and thus are exported to VML.
// They differ in font properties e.g. font weight and character spacing.
- loadFromURL(u"tdf128568_FontworkFontProperties.odt");
+ loadFromFile(u"tdf128568_FontworkFontProperties.odt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -838,7 +838,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLFontworkSlantUp)
// not recognize its markup as preset WordArt, because the used markup differs from what Word
// expects for this type of shape. As a result Word saves the shape as having custom geometry
// and such is not understand by LibreOffice.
- loadFromURL(u"tdf153296_VML_export_SlantUp.odt");
+ loadFromFile(u"tdf153296_VML_export_SlantUp.odt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -865,7 +865,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLFontworkArchUp)
{
// The document has a Fontwork shape type 'textArchUp' (172). When exporting to docx, the shape
// was not exported as VML Fontwork but as a rectangle.
- loadFromURL(u"tdf153296_VML_export_ArchUpCurve.odt");
+ loadFromFile(u"tdf153296_VML_export_ArchUpCurve.odt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -887,7 +887,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVMLAdjustmentExport)
{
// The document has a Fontwork shape type 'textCirclePour' (150). When exporting to docx, the
// adjustment values were not exported at all.
- loadFromURL(u"tdf153246_VML_export_Fontwork_Adjustment.odt");
+ loadFromFile(u"tdf153246_VML_export_Fontwork_Adjustment.odt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -915,7 +915,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkDirectColor)
// The document has a Fontwork shape with fill #2e8b57 plus 60% transparency and line color
// #ff7f50 with 20% transparency. When exporting to docx, line color was not exported at all
// and fill color was replaced with character color.
- loadFromURL(u"tdf51195_Fontwork_DirectColor.odt");
+ loadFromFile(u"tdf51195_Fontwork_DirectColor.odt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -951,7 +951,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkThemeColor)
// The document has a Fontwork shape with fill theme color 'lt2' and 50% darker, and a Fontwork
// shape with theme color 'dk2' and 40% lighter. When exporting to docx, fill color was not
// exported as theme color at all, and it was replaced with character color.
- loadFromURL(u"tdf51195_Fontwork_ThemeColor.fodt");
+ loadFromFile(u"tdf51195_Fontwork_ThemeColor.fodt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -999,7 +999,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkDistance)
{
// LO ignores 'Spacing to Borders' of the 'Text Attributes' for Fontwork shapes. Word interprets
// them. Make sure we force them to zero on export to docx, otherwise Word might wrap the text.
- loadFromURL(u"tdf51195_Fontwork_Distance.odt");
+ loadFromFile(u"tdf51195_Fontwork_Distance.odt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -1022,7 +1022,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkLinGradientRGBColor)
// start color #ffff00 (Yellow) with 'Intensity' 80%, end color #4682B4 (Steel Blue), Transition
// Start 25% and solid transparency 30%.
// Without fix the gradient was not exported at all.
- loadFromURL(u"tdf51195_Fontwork_linearGradient.fodt");
+ loadFromFile(u"tdf51195_Fontwork_linearGradient.fodt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -1069,7 +1069,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkAxialGradientTransparency)
// Transparency gradient Type Axial with Angle 160deg, Transition start 40%,
// Start value 5%, End value 90%
// Without fix the gradient was not exported at all.
- loadFromURL(u"tdf51195_Fontwork_axialGradient.fodt");
+ loadFromFile(u"tdf51195_Fontwork_axialGradient.fodt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -1119,7 +1119,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkRadialGradient)
// From Color #40E0D0, To Color #FF0000, Center x|y 75%|20%, no transparency
// Transition start 10%
// Without fix the gradient was not exported at all.
- loadFromURL(u"tdf51195_Fontwork_radialGradient.fodt");
+ loadFromFile(u"tdf51195_Fontwork_radialGradient.fodt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -1160,7 +1160,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkEllipticalGradient)
// transparency gradient type Ellipsoid, Center x|y 50%|50%, Transition Start 50%,
// Start 70%, End 0%.
// Without fix the gradient was not exported at all.
- loadFromURL(u"tdf51195_Fontwork_ellipticalGradient.fodt");
+ loadFromFile(u"tdf51195_Fontwork_ellipticalGradient.fodt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -1203,7 +1203,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkSquareGradient)
// From Color #4963ef 40%, To Color #ffff6e 90%, Center x|y 100%|50%,
// no transparency
// Without fix the gradient was not exported at all.
- loadFromURL(u"tdf51195_Fontwork_squareGradient.fodt");
+ loadFromFile(u"tdf51195_Fontwork_squareGradient.fodt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -1245,7 +1245,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkRectGradient)
// transparency gradient Type "Rectangular", Center x|y 50%|50%, Transition start 10%,
// Start value 70%, End value 5%.
// Without fix the gradient was not exported at all.
- loadFromURL(u"tdf51195_Fontwork_rectGradient.fodt");
+ loadFromFile(u"tdf51195_Fontwork_rectGradient.fodt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -1295,7 +1295,7 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeColorTransparency)
// The document has first a Fontwork shape with solid fill theme color with transparency and
// outline transparency and second a textbox with character transparency.
// Without fix the transparency was not written to file.
- loadFromURL(u"tdf139618_ThemeColorTransparency.pptx");
+ loadFromFile(u"tdf139618_ThemeColorTransparency.pptx");
save("Impress Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
@@ -1321,7 +1321,7 @@ CPPUNIT_TEST_FIXTURE(Test, testThemeFontTypeface)
// Saving the document had produced a file which PowerPoint wants to repair. The mandatory
// attribute 'typeface' was missing in the <a:ea> elements.
- loadFromURL(u"tdf155412_typeface.pptx");
+ loadFromFile(u"tdf155412_typeface.pptx");
save("Impress Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/theme/theme1.xml");
@@ -1337,7 +1337,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf157289CircularArrowExport)
// The document has a custom shape of type "circular-arrow". Such uses a B command where
// the ellipse bounding box is defined by bottom-right vertex first and then top-left vertex.
// When saving to PPTX this had resulted in negative radii for the ellipse.
- loadFromURL(u"tdf157289_circularArrow_export.fodp");
+ loadFromFile(u"tdf157289_circularArrow_export.fodp");
save("Impress Office Open XML");
// Verify the markup. Both wR and hR must be positive.
diff --git a/oox/qa/unit/mathml.cxx b/oox/qa/unit/mathml.cxx
index 0cc750aa0c7a..3e1b8c55b8ce 100644
--- a/oox/qa/unit/mathml.cxx
+++ b/oox/qa/unit/mathml.cxx
@@ -26,12 +26,12 @@ public:
CPPUNIT_TEST_FIXTURE(OoxMathmlTest, testImportCharacters)
{
// Without the accompanying fix in place, this failed with an assertion failure on import.
- loadFromURL(u"import-characters.pptx");
+ loadFromFile(u"import-characters.pptx");
}
CPPUNIT_TEST_FIXTURE(OoxMathmlTest, testImportMce)
{
- loadFromURL(u"import-mce.pptx");
+ loadFromFile(u"import-mce.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
diff --git a/oox/qa/unit/mcgr.cxx b/oox/qa/unit/mcgr.cxx
index ac3792633ba7..edb9b9bf76eb 100644
--- a/oox/qa/unit/mcgr.cxx
+++ b/oox/qa/unit/mcgr.cxx
@@ -26,7 +26,7 @@ public:
CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradient)
{
// Given a document with three-color gradient on a Fontwork.
- loadFromURL(u"MCGR_FontworkColorGradient.fodp");
+ loadFromFile(u"MCGR_FontworkColorGradient.fodp");
// Save it to PPTX
save("Impress Office Open XML");
// And make sure a multi-color gradient fill is exported.
@@ -49,7 +49,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradientWord)
// Fontwork is handled different in Word than in PowerPoint documents. So we need a separate
// test for a text document.
// Given a document with three-color gradient on a Fontwork.
- loadFromURL(u"MCGR_FontworkColorGradient.fodt");
+ loadFromFile(u"MCGR_FontworkColorGradient.fodt");
// Save it to DOCX
save("Office Open XML Text");
// And make sure a multi-color gradient fill is exported.
@@ -70,7 +70,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradientWord)
CPPUNIT_TEST_FIXTURE(TestMCGR, testTdf155825_SourcOffsetRangeDifferent)
{
// Color gradient has offset range [0,0.8] and transparency gradient has offset range [0,1].
- loadFromURL(u"tdf155825_MCGR_SourceOffsetRangeDifferent.fodp");
+ loadFromFile(u"tdf155825_MCGR_SourceOffsetRangeDifferent.fodp");
// Save it to PPTX
// Without fix, a debug-build would have crashed in oox/source/export/drawingml.cxx from
// assert(false && "oox::WriteGradientFill: non-synchronized gradients (!)");
@@ -80,7 +80,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testTdf155825_SourcOffsetRangeDifferent)
CPPUNIT_TEST_FIXTURE(TestMCGR, testStepCount)
{
// Given a document with two-color gradient with StepCount 4.
- loadFromURL(u"tdf155852_MCGR_StepCount4.fodp");
+ loadFromFile(u"tdf155852_MCGR_StepCount4.fodp");
// Save it to PPTX
save("Impress Office Open XML");
xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
@@ -106,7 +106,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testAxialColorLinearTrans)
{
// Given a document with a shape with axial color gradient from inside red to outside cyan and
// two-stop linear transparency gradient from start 80% to end 0%.
- loadFromURL(u"tdf155827_MCGR_AxialColorLinearTrans.fodp");
+ loadFromFile(u"tdf155827_MCGR_AxialColorLinearTrans.fodp");
// Save it to PPTX
save("Impress Office Open XML");
// OOXML has transparency together with color. Transparency is stored as opacity.
diff --git a/oox/qa/unit/shape.cxx b/oox/qa/unit/shape.cxx
index d3a971cd58db..490c81bf9b1f 100644
--- a/oox/qa/unit/shape.cxx
+++ b/oox/qa/unit/shape.cxx
@@ -93,7 +93,7 @@ uno::Reference<drawing::XShape> OoxShapeTest::getShapeByName(std::u16string_view
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testGroupTransform)
{
- loadFromURL(u"tdf141463_GroupTransform.pptx");
+ loadFromFile(u"tdf141463_GroupTransform.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -128,7 +128,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testGroupTransform)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testMultipleGroupShapes)
{
- loadFromURL(u"multiple-group-shapes.docx");
+ loadFromFile(u"multiple-group-shapes.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -142,7 +142,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testMultipleGroupShapes)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testCustomshapePosition)
{
- loadFromURL(u"customshape-position.docx");
+ loadFromFile(u"customshape-position.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -165,7 +165,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf125582_TextOnCircle)
// The document contains a shape with a:prstTxWarp="textCircle" with two paragraphs.
// PowerPoint aligns the bottom of the text with the path, LO had aligned the middle of the
// text with the path, which resulted in smaller text.
- loadFromURL(u"tdf125582_TextOnCircle.pptx");
+ loadFromFile(u"tdf125582_TextOnCircle.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -193,7 +193,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf151008VertAnchor)
// The document contains shapes with all six kind of anchor positions in pptx. The text in the
// shapes is larger than the shape and has no word wrap. That way anchor position is visible
// in case you inspect the file manually.
- loadFromURL(u"tdf151008_eaVertAnchor.pptx");
+ loadFromFile(u"tdf151008_eaVertAnchor.pptx");
struct anchorDesc
{
@@ -240,7 +240,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf151518VertAnchor)
// The document contains SmartArt with shapes with not default text area. Without fix the
// text was shifted up because of wrong values in TextLowerDistance and TextUpperDistance.
- loadFromURL(u"tdf151518_SmartArtTextLocation.docx");
+ loadFromFile(u"tdf151518_SmartArtTextLocation.docx");
struct TextDistance
{
@@ -295,7 +295,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf54095_SmartArtThemeTextColor)
}
// get SmartArt
- loadFromURL(u"tdf54095_SmartArtThemeTextColor.docx");
+ loadFromFile(u"tdf54095_SmartArtThemeTextColor.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
@@ -336,7 +336,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testTdf54095_SmartArtThemeTextColor)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork)
{
- loadFromURL(u"tdf125885_WordArt.docx");
+ loadFromFile(u"tdf125885_WordArt.docx");
// Without the patch WordArt in text document was imported as rectangular custom shape with
// attached frame. So there was no artistic text at all. Now it is imported as Fontwork.
// This test covers some basic properties.
@@ -412,7 +412,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork2)
{
- loadFromURL(u"tdf125885_WordArt2.docx");
+ loadFromFile(u"tdf125885_WordArt2.docx");
// Without the patch WordArt in text document was imported as rectangular custom shape with
// attached frame. So there was no artistic text at all. Now it is imported as Fontwork.
// This test covers whether theme color properties are correctly converted on import.
@@ -460,7 +460,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork2)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3)
{
- loadFromURL(u"tdf125885_WordArt3.docx");
+ loadFromFile(u"tdf125885_WordArt3.docx");
// Without the patch WordArt in text document was imported as rectangular custom shape with
// attached frame. So there was no artistic text at all. Now it is imported as Fontwork.
// This test covers some aspects of import of gradient fill.
@@ -544,7 +544,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontwork3)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontworkNonAccentColor)
{
- loadFromURL(u"tdf152840_WordArt_non_accent_color.docx");
+ loadFromFile(u"tdf152840_WordArt_non_accent_color.docx");
// The file contains WordArt which uses the theme colors "Background 1", "Text 1", "Background 2"
// and "Text 2".
@@ -587,7 +587,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontworkNonAccentColor)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterShapeFillNonAccentColor)
{
- loadFromURL(u"tdf152840_theme_color_non_accent.docx");
+ loadFromFile(u"tdf152840_theme_color_non_accent.docx");
// The file contains shapes which uses the theme colors "bg2", "bg1", "tx1" and "tx2" in this
// order as fill color.
@@ -613,7 +613,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterShapeFillNonAccentColor)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontworkDarkenTransparency)
{
- loadFromURL(u"tdf152896_WordArt_color_darken.docx");
+ loadFromFile(u"tdf152896_WordArt_color_darken.docx");
// The file contains a WordArt shape with theme colors "Background 2", shading mode "Darken 25%"
// and "20% Transparency". Word writes this as w:color element with additional w14:textFill
// element. In such case the w14:textFill element supersedes the w:color element. Error was, that
@@ -634,7 +634,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWriterFontworkDarkenTransparency)
CPPUNIT_TEST_FIXTURE(OoxShapeTest, testImportWordArtGradient)
{
- loadFromURL(u"tdf139618_ImportWordArtGradient.pptx");
+ loadFromFile(u"tdf139618_ImportWordArtGradient.pptx");
// Without the patch all WordArt was imported with solid color. Now gradient is imported.
// This test covers several aspects of import of gradient fill.
@@ -772,7 +772,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWordArtBitmapFill)
{
// The document has a WordArt shape with bitmap fill.
// Without fix it was imported as solid color fill.
- loadFromURL(u"tdf139618_WordArtBitmapFill.pptx");
+ loadFromFile(u"tdf139618_WordArtBitmapFill.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -805,7 +805,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testWordArtDefaultColor)
// The document has a WordArt shape for which the text color is not explicitly set. In such cases
// MS Office uses the scheme color 'tx1'. Without fix it was imported as 'fill none'. The shape
// existed but was not visible on screen.
- loadFromURL(u"tdf155327_WordArtDefaultColor.pptx");
+ loadFromFile(u"tdf155327_WordArtDefaultColor.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -822,7 +822,7 @@ CPPUNIT_TEST_FIXTURE(OoxShapeTest, testGlowOnGroup)
{
// The document contains a group of two shapes. A glow-effect is set on the group.
// Without the fix, the children of the group were not imported at all.
- loadFromURL(u"tdf156902_GlowOnGroup.docx");
+ loadFromFile(u"tdf156902_GlowOnGroup.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx
index c46475efe418..c0918b2682c9 100644
--- a/oox/qa/unit/vml.cxx
+++ b/oox/qa/unit/vml.cxx
@@ -38,7 +38,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf112450_vml_polyline)
{
// Load a document with v:polyline shapes. Error was, that the size was set to zero and the
// points were zero because of missing decode from length with unit.
- loadFromURL(u"tdf112450_vml_polyline.docx");
+ loadFromFile(u"tdf112450_vml_polyline.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
@@ -101,7 +101,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, tdf137314_vml_rotation_unit_fd)
{
// Load a document with a 30deg rotated arc on a drawing canvas. Rotation is given
// as 1966080fd. Error was, that the vml angle unit "fd" was not converted to Degree100.
- loadFromURL(u"tdf137314_vml_rotation_unit_fd.docx");
+ loadFromFile(u"tdf137314_vml_rotation_unit_fd.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
@@ -123,7 +123,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testSpt202ShapeType)
{
// Load a document with a groupshape, 2nd child is a <v:shape>, its type has o:spt set to 202
// (TextBox).
- loadFromURL(u"group-spt202.docx");
+ loadFromFile(u"group-spt202.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
@@ -143,7 +143,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testShapeNonAutosizeWithText)
// Load a document which has a group shape, containing a single child.
// 17.78 cm is the full group shape width, 19431/64008 is the child shape's relative width inside
// that, so 5.3975 cm should be the shape width.
- loadFromURL(u"shape-non-autosize-with-text.docx");
+ loadFromFile(u"shape-non-autosize-with-text.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
@@ -158,7 +158,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testShapeNonAutosizeWithText)
CPPUNIT_TEST_FIXTURE(OoxVmlTest, testGraphicStroke)
{
- loadFromURL(u"graphic-stroke.pptx");
+ loadFromFile(u"graphic-stroke.pptx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
uno::UNO_QUERY);
@@ -186,7 +186,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testWatermark)
// Given a document with a picture watermark, and the "washout" checkbox is ticked on the Word
// UI:
// When loading that document:
- loadFromURL(u"watermark.docx");
+ loadFromFile(u"watermark.docx");
// Then make sure the watermark effect is not lost on import:
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -207,7 +207,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testWriterFontworkTrimTrue)
// The document contains a shape, that will be exported as VML shape to docx. Error was that the
// attribute trim was not written out and thus import had treated it as the default 'false' and
// had reduced the shape height.
- loadFromURL(u"tdf153260_VML_trim_export.odt");
+ loadFromFile(u"tdf153260_VML_trim_export.odt");
// FIXME: tdf#153183 validation error in OOXML export: Errors: 1
// Attribute 'ID' is not allowed to appear in element 'v:shape'.
@@ -228,7 +228,7 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testVMLDetectWordArtOnImport)
{
// The document contains a WordArt shape with type other than "fontwork-foo". Error was that
// WordArt was not detected and thus shrinking shape to text content was not prevented.
- loadFromURL(u"tdf153258_VML_import_WordArt_detection.docx");
+ loadFromFile(u"tdf153258_VML_import_WordArt_detection.docx");
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(xDrawPageSupplier->getDrawPage()->getByIndex(0),
diff --git a/oox/qa/unit/wpc_drawing_canvas.cxx b/oox/qa/unit/wpc_drawing_canvas.cxx
index ba347925d317..eadd1a26446b 100644
--- a/oox/qa/unit/wpc_drawing_canvas.cxx
+++ b/oox/qa/unit/wpc_drawing_canvas.cxx
@@ -46,7 +46,7 @@ public:
CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Table_inside_Textbox)
{
// The document has a table inside a text box on a drawing canvas.
- loadFromURL(u"WPC_tdf48610_Textbox_with_table_inside.docx");
+ loadFromFile(u"WPC_tdf48610_Textbox_with_table_inside.docx");
// Make sure the table exists. Without import of drawing canvas, the table was lost.
uno::Reference<text::XTextTablesSupplier> xTextDocument(mxComponent, uno::UNO_QUERY);
@@ -57,7 +57,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Table_inside_Textbox)
CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Text_in_ellipse)
{
// The document has text in an ellipse on a drawing canvas.
- loadFromURL(u"WPC_Textwrap_in_ellipse.docx");
+ loadFromFile(u"WPC_Textwrap_in_ellipse.docx");
// The VML import creates for an ellipse not a custom shape but a legacy ellipse and that has no
// word wrap. Thus the text was in one line and overflows the shape. This overflow becomes visible
@@ -77,7 +77,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Text_in_ellipse)
CPPUNIT_TEST_FIXTURE(TestWPC, WPC_MulticolorGradient)
{
// The document has a shape with multi color gradient fill on a drawing canvas.
- loadFromURL(u"WPC_MulticolorGradient.docx");
+ loadFromFile(u"WPC_MulticolorGradient.docx");
// The VML import was not able to import multicolor gradients. Thus only start and end color
// were imported, ColorStops had only two elements.
@@ -94,7 +94,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_MulticolorGradient)
CPPUNIT_TEST_FIXTURE(TestWPC, WPC_CanvasBackground)
{
// The document has a drawing canvas with color fill.
- loadFromURL(u"WPC_CanvasBackground.docx");
+ loadFromFile(u"WPC_CanvasBackground.docx");
// The VML import displayed the background as if it was transparent. Thus the BoundRect
// of the shape which represents the background was zero.
@@ -112,7 +112,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_CanvasBackground)
CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Glow)
{
// The document has a shape with glow effect.
- loadFromURL(u"WPC_Glow.docx");
+ loadFromFile(u"WPC_Glow.docx");
// VML does not know any glow effect. Thus it was lost on import.
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -136,7 +136,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Glow)
CPPUNIT_TEST_FIXTURE(TestWPC, WPC_BentConnector)
{
// The document has two shapes connected with a bentConnector on a drawing canvas.
- loadFromURL(u"WPC_BentConnector.docx");
+ loadFromFile(u"WPC_BentConnector.docx");
// VML has no information about the target shapes of the connector. The connector was imported as
// custom shape, not as connector shape
@@ -165,7 +165,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_ThemeColor)
{
// The document has a shape with color fill used as pseudo background and a 'heart' shape with
// color fill and colored line. All colors are theme colors.
- loadFromURL(u"WPC_ThemeColor.docx");
+ loadFromFile(u"WPC_ThemeColor.docx");
// VML has no information about theme colors. Thus ThemeColorType was always 'Unknown'.
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
@@ -215,7 +215,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_ThemeColor)
CPPUNIT_TEST_FIXTURE(TestWPC, WPC_tdf104671_Cloud)
{
// The document has 'cloud' shape on a drawing canvas.
- loadFromURL(u"WPC_tdf104671_Cloud.docx");
+ loadFromFile(u"WPC_tdf104671_Cloud.docx");
// MS Office writes the 'cloud' shape without type to the VML fallback. Thus the VLM import uses
// ClosedBezierShape with several closed polygons. That produces holes because of the even-odd
@@ -232,7 +232,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_tdf104671_Cloud)
CPPUNIT_TEST_FIXTURE(TestWPC, WPC_Shadow)
{
// The document has a shape with blur shadow on a drawing canvas.
- loadFromURL(u"WPC_Shadow.docx");
+ loadFromFile(u"WPC_Shadow.docx");
// The VML fallback contains a block shadow. Blur is not available in VML. The VML import does not
// import shadow at all.
@@ -260,7 +260,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_tdf158339_shape_text_in_group)
{
// The document has a group of two shapes with text. This group is child of a drawing canvas.
// Without fix the text of the shapes were imported as separate text boxes.
- loadFromURL(u"WPC_tdf158339_shape_text_in_group.docx");
+ loadFromFile(u"WPC_tdf158339_shape_text_in_group.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -283,7 +283,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_tdf158348_shape_text_in_table_cell)
{
// The document has a shape with text on a drawing canvas in a table cell.
// Without fix the text of the shape becomes part of the paragraph of the table cell.
- loadFromURL(u"WPC_tdf158348_shape_text_in_table_cell.docx");
+ loadFromFile(u"WPC_tdf158348_shape_text_in_table_cell.docx");
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
@@ -311,7 +311,7 @@ CPPUNIT_TEST_FIXTURE(TestWPC, WPC_CurvedConnector2)
{
// The document has two shapes connected with a curvedConnector2 on a drawing canvas.
// This connector is a single Bezier segment without handles.
- loadFromURL(u"WPC_CurvedConnector2.docx");
+ loadFromFile(u"WPC_CurvedConnector2.docx");
// LO and OOXML differ in the position of the control points. LibreOffice uses 2/3 but OOXML
// uses 1/2 of width or height. The path by LO looks more round.