summaryrefslogtreecommitdiff
path: root/filter/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-05-05 19:10:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-07 09:52:27 +0200
commitec6eaa58addf0d8823f8c56d4ec168ff389da8c5 (patch)
treeadb44639fc6bdecad5f576aa5e1aa90f3c9d64b3 /filter/qa
parentc437948f6c0d602bb200fc92e80cb73ae8ae5109 (diff)
fix memory leak of xmlDoc objects
in unit tests Change-Id: Id16731bbbe2f1b0e3642722d77aba04fc98db4cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93508 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter/qa')
-rw-r--r--filter/qa/cppunit/filters-pict-test.cxx2
-rw-r--r--filter/qa/unit/svg.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/filter/qa/cppunit/filters-pict-test.cxx b/filter/qa/cppunit/filters-pict-test.cxx
index 1fd6ae8e37a0..7b62c71b9d32 100644
--- a/filter/qa/cppunit/filters-pict-test.cxx
+++ b/filter/qa/cppunit/filters-pict-test.cxx
@@ -83,7 +83,7 @@ void PictFilterTest::testDontClipTooMuch()
MetafileXmlDump dumper;
dumper.filterAllActionTypes();
dumper.filterActionType(MetaActionType::CLIPREGION, false);
- xmlDocPtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
+ xmlDocUniquePtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
CPPUNIT_ASSERT (pDoc);
diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx
index 8e6524c688ba..9651881826c9 100644
--- a/filter/qa/unit/svg.cxx
+++ b/filter/qa/unit/svg.cxx
@@ -83,7 +83,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testPreserveJpg)
aStream.Seek(STREAM_SEEK_TO_BEGIN);
// Make sure that the original JPG data is reused and we don't perform a PNG re-compress.
- xmlDocPtr pXmlDoc = parseXmlStream(&aStream);
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream);
OUString aAttributeValue = getXPath(pXmlDoc, "//svg:image", "href");
// Without the accompanying fix in place, this test would have failed with:
@@ -110,7 +110,7 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testSemiTransparentLine)
aStream.Seek(STREAM_SEEK_TO_BEGIN);
// Get the style of the group around the actual <path> element.
- xmlDocPtr pXmlDoc = parseXmlStream(&aStream);
+ xmlDocUniquePtr pXmlDoc = parseXmlStream(&aStream);
OUString aStyle = getXPath(
pXmlDoc, "//svg:g[@class='com.sun.star.drawing.LineShape']/svg:g/svg:g", "style");
OUString aPrefix("opacity: ");