diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-03-04 09:38:02 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-03-10 01:22:20 +0100 |
commit | 62af6c4f28ef1346170c81557a1845616be33336 (patch) | |
tree | 4b2ee7602d234ea55573d276a26553587bb1992a /sd | |
parent | 214e6ed5286566e689a4ef13a9115e2ad38fff57 (diff) |
Check svg URLs before exporting
Change-Id: I3b86b6b82318b0d201c3d7db516664520eb47bed
Reviewed-on: https://gerrit.libreoffice.org/68668
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit 34ec46571701d639d9bc542b2d19f87a21a83648)
Reviewed-on: https://gerrit.libreoffice.org/68732
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/SVGExportTests.cxx | 15 | ||||
-rw-r--r-- | sd/qa/unit/data/odp/textbox-link-javascript.odp | bin | 0 -> 23573 bytes |
2 files changed, 15 insertions, 0 deletions
diff --git a/sd/qa/unit/SVGExportTests.cxx b/sd/qa/unit/SVGExportTests.cxx index 9afc5cb42a01..8c55bf45d48b 100644 --- a/sd/qa/unit/SVGExportTests.cxx +++ b/sd/qa/unit/SVGExportTests.cxx @@ -110,8 +110,23 @@ public: assertXPath(svgDoc, MAKE_PATH_STRING( /SVG_SVG/SVG_G[2]/SVG_G/SVG_G/SVG_G/SVG_G/SVG_G[2]/SVG_G/SVG_TEXT/SVG_TSPAN ), "text-decoration", "line-through"); } + void testSVGExportJavascriptURL() + { + executeExport("textbox-link-javascript.odp"); + + xmlDocPtr svgDoc = parseXml(maTempFile); + CPPUNIT_ASSERT(svgDoc); + + // There should be only one child (no link to javascript url) + assertXPathChildren(svgDoc, + MAKE_PATH_STRING(/ SVG_SVG / SVG_G[2] / SVG_G / SVG_G / SVG_G / SVG_G + / SVG_G[3] / SVG_G), + 1); + } + CPPUNIT_TEST_SUITE(SdSVGFilterTest); CPPUNIT_TEST(testSVGExportTextDecorations); + CPPUNIT_TEST(testSVGExportJavascriptURL); CPPUNIT_TEST_SUITE_END(); }; diff --git a/sd/qa/unit/data/odp/textbox-link-javascript.odp b/sd/qa/unit/data/odp/textbox-link-javascript.odp Binary files differnew file mode 100644 index 000000000000..c046cf0c7de5 --- /dev/null +++ b/sd/qa/unit/data/odp/textbox-link-javascript.odp |