summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-05-04 15:09:25 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-05-08 10:02:05 +0200
commit102e5ecb4b7fb5487077274f7eefdb2160119c59 (patch)
treeafb6591af489e3f723fc5459b7d65997990a98db /xmloff
parent780bb69758850d7f04dd996af7564d253bfd1f97 (diff)
loplugin:useuniqueptr
Warning fires in the --disable-gltf case. Change-Id: I9f0fb15f581dbbe0e9ba68789ed5a1cd1a9b28d2 Reviewed-on: https://gerrit.libreoffice.org/37235 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/shapeexport.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 059dfa2d6567..93584d1c8f1c 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -86,6 +86,7 @@
#include <comphelper/storagehelper.hxx>
#include <o3tl/any.hxx>
+#include <o3tl/make_unique.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <rtl/math.hxx>
@@ -3346,7 +3347,7 @@ void XMLShapeExport::ImpExportMediaShape(
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, sMimeType );
// write plugin
- SvXMLElementExport* pPluginOBJ = new SvXMLElementExport(mrExport, XML_NAMESPACE_DRAW, XML_PLUGIN, !( nFeatures & XMLShapeExportFlags::NO_WS ), true);
+ auto pPluginOBJ = o3tl::make_unique<SvXMLElementExport>(mrExport, XML_NAMESPACE_DRAW, XML_PLUGIN, !( nFeatures & XMLShapeExportFlags::NO_WS ), true);
// export parameters
const OUString aFalseStr( "false" ), aTrueStr( "true" );
@@ -3398,7 +3399,6 @@ void XMLShapeExport::ImpExportMediaShape(
delete( new SvXMLElementExport( mrExport, XML_NAMESPACE_DRAW, XML_PARAM, false, true ) );
}
- delete pPluginOBJ;
#if HAVE_FEATURE_GLTF
if( sMimeType == "model/vnd.gltf+json" )
lcl_StoreGltfFallback(GetExport(), xPropSet, aMediaURL);