summaryrefslogtreecommitdiff
path: root/emfio/qa/cppunit/wmf
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 /emfio/qa/cppunit/wmf
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 'emfio/qa/cppunit/wmf')
-rw-r--r--emfio/qa/cppunit/wmf/wmfimporttest.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/emfio/qa/cppunit/wmf/wmfimporttest.cxx b/emfio/qa/cppunit/wmf/wmfimporttest.cxx
index 5d3c3b772de5..5dfcfdad2041 100644
--- a/emfio/qa/cppunit/wmf/wmfimporttest.cxx
+++ b/emfio/qa/cppunit/wmf/wmfimporttest.cxx
@@ -73,7 +73,7 @@ void WmfTest::testNonPlaceableWmf()
MetafileXmlDump dumper;
dumper.filterAllActionTypes();
dumper.filterActionType(MetaActionType::POLYLINE, false);
- xmlDocPtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
+ xmlDocUniquePtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
CPPUNIT_ASSERT(pDoc);
@@ -102,7 +102,7 @@ void WmfTest::testSine()
MetafileXmlDump dumper;
dumper.filterAllActionTypes();
dumper.filterActionType(MetaActionType::ISECTRECTCLIPREGION, false);
- xmlDocPtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
+ xmlDocUniquePtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
CPPUNIT_ASSERT(pDoc);
@@ -118,7 +118,7 @@ void WmfTest::testEmfProblem()
MetafileXmlDump dumper;
dumper.filterAllActionTypes();
dumper.filterActionType(MetaActionType::ISECTRECTCLIPREGION, false);
- xmlDocPtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
+ xmlDocUniquePtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
CPPUNIT_ASSERT(pDoc);
@@ -138,7 +138,7 @@ void WmfTest::testEmfLineStyles()
dumper.filterAllActionTypes();
dumper.filterActionType(MetaActionType::LINE, false);
dumper.filterActionType(MetaActionType::LINECOLOR, false);
- xmlDocPtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
+ xmlDocUniquePtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
CPPUNIT_ASSERT(pDoc);
@@ -197,7 +197,7 @@ void WmfTest::testWorldTransformFontSize()
MetafileXmlDump dumper;
dumper.filterAllActionTypes();
dumper.filterActionType(MetaActionType::FONT, false);
- xmlDocPtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
+ xmlDocUniquePtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
CPPUNIT_ASSERT(pDoc);
@@ -225,7 +225,7 @@ void WmfTest::testTdf93750()
ReadWindowMetafile(aFileStream, aGDIMetaFile);
MetafileXmlDump dumper;
- xmlDocPtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
+ xmlDocUniquePtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
CPPUNIT_ASSERT(pDoc);
@@ -264,7 +264,7 @@ void WmfTest::testTdf39894()
ReadWindowMetafile(aFileStream, aGDIMetaFile);
MetafileXmlDump dumper;
- xmlDocPtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
+ xmlDocUniquePtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
CPPUNIT_ASSERT(pDoc);
@@ -285,7 +285,7 @@ void WmfTest::testETO_PDY()
ReadWindowMetafile(aFileStream, aGDIMetaFile);
MetafileXmlDump dumper;
- xmlDocPtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
+ xmlDocUniquePtr pDoc = dumpAndParse(dumper, aGDIMetaFile);
CPPUNIT_ASSERT(pDoc);