diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-18 09:48:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-19 05:40:55 +0000 |
commit | 2da34e265db6ca56e43d9b2ab8cee04b1cc4fb29 (patch) | |
tree | e2cbed69babc7f551e0db01a9cd023db809b2204 /svgio/source | |
parent | 9767537e22e178eb23872de138ea70e57c1a6725 (diff) |
new loplugin: useuniqueptr: svgio
Change-Id: I645ac954ac519fe713f4347cdf69780b0f8070e4
Reviewed-on: https://gerrit.libreoffice.org/33252
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svgio/source')
-rw-r--r-- | svgio/source/svgreader/svganode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svgcirclenode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svgclippathnode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svgellipsenode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svggnode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svggradientnode.cxx | 11 | ||||
-rw-r--r-- | svgio/source/svgreader/svgimagenode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svglinenode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svgmarkernode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svgmasknode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svgrectnode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svgsvgnode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svgsymbolnode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svgtextnode.cxx | 1 | ||||
-rw-r--r-- | svgio/source/svgreader/svgusenode.cxx | 1 |
15 files changed, 3 insertions, 22 deletions
diff --git a/svgio/source/svgreader/svganode.cxx b/svgio/source/svgreader/svganode.cxx index 9efa57331c27..7b61fcbfc934 100644 --- a/svgio/source/svgreader/svganode.cxx +++ b/svgio/source/svgreader/svganode.cxx @@ -36,7 +36,6 @@ namespace svgio SvgANode::~SvgANode() { - delete mpaTransform; } const SvgStyleAttributes* SvgANode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svgcirclenode.cxx b/svgio/source/svgreader/svgcirclenode.cxx index d950632286bf..29d0395eb6eb 100644 --- a/svgio/source/svgreader/svgcirclenode.cxx +++ b/svgio/source/svgreader/svgcirclenode.cxx @@ -39,7 +39,6 @@ namespace svgio SvgCircleNode::~SvgCircleNode() { - delete mpaTransform; } const SvgStyleAttributes* SvgCircleNode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svgclippathnode.cxx b/svgio/source/svgreader/svgclippathnode.cxx index dc607c7e627e..0c1cc3e75fd4 100644 --- a/svgio/source/svgreader/svgclippathnode.cxx +++ b/svgio/source/svgreader/svgclippathnode.cxx @@ -42,7 +42,6 @@ namespace svgio SvgClipPathNode::~SvgClipPathNode() { - delete mpaTransform; } const SvgStyleAttributes* SvgClipPathNode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svgellipsenode.cxx b/svgio/source/svgreader/svgellipsenode.cxx index 1a021acbdbad..2080066ffade 100644 --- a/svgio/source/svgreader/svgellipsenode.cxx +++ b/svgio/source/svgreader/svgellipsenode.cxx @@ -40,7 +40,6 @@ namespace svgio SvgEllipseNode::~SvgEllipseNode() { - delete mpaTransform; } const SvgStyleAttributes* SvgEllipseNode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svggnode.cxx b/svgio/source/svgreader/svggnode.cxx index c3ae8ca75c1e..28c4dd8a0ccc 100644 --- a/svgio/source/svgreader/svggnode.cxx +++ b/svgio/source/svgreader/svggnode.cxx @@ -38,7 +38,6 @@ namespace svgio SvgGNode::~SvgGNode() { - delete mpaTransform; } const SvgStyleAttributes* SvgGNode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svggradientnode.cxx b/svgio/source/svgreader/svggradientnode.cxx index 0af85b4d19c7..8d700c5247d4 100644 --- a/svgio/source/svgreader/svggradientnode.cxx +++ b/svgio/source/svgreader/svggradientnode.cxx @@ -59,7 +59,6 @@ namespace svgio SvgGradientNode::~SvgGradientNode() { - delete mpaGradientTransform; // do NOT delete mpXLink, it's only referenced, not owned } @@ -472,7 +471,7 @@ namespace svgio { if(mpaGradientTransform) { - return mpaGradientTransform; + return mpaGradientTransform.get(); } const_cast< SvgGradientNode* >(this)->tryToFindLink(); @@ -487,15 +486,11 @@ namespace svgio void SvgGradientNode::setGradientTransform(const basegfx::B2DHomMatrix* pMatrix) { - if(mpaGradientTransform) - { - delete mpaGradientTransform; - mpaGradientTransform = nullptr; - } + mpaGradientTransform.reset(); if(pMatrix) { - mpaGradientTransform = new basegfx::B2DHomMatrix(*pMatrix); + mpaGradientTransform.reset(new basegfx::B2DHomMatrix(*pMatrix) ); } } diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx index e1033df3720a..717987464539 100644 --- a/svgio/source/svgreader/svgimagenode.cxx +++ b/svgio/source/svgreader/svgimagenode.cxx @@ -57,7 +57,6 @@ namespace svgio SvgImageNode::~SvgImageNode() { - delete mpaTransform; } const SvgStyleAttributes* SvgImageNode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svglinenode.cxx b/svgio/source/svgreader/svglinenode.cxx index 3720fb00bcc7..1ab7eeea009c 100644 --- a/svgio/source/svgreader/svglinenode.cxx +++ b/svgio/source/svgreader/svglinenode.cxx @@ -40,7 +40,6 @@ namespace svgio SvgLineNode::~SvgLineNode() { - delete mpaTransform; } const SvgStyleAttributes* SvgLineNode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svgmarkernode.cxx b/svgio/source/svgreader/svgmarkernode.cxx index 110b4b821783..f37798cc5754 100644 --- a/svgio/source/svgreader/svgmarkernode.cxx +++ b/svgio/source/svgreader/svgmarkernode.cxx @@ -43,7 +43,6 @@ namespace svgio SvgMarkerNode::~SvgMarkerNode() { - delete mpViewBox; } const SvgStyleAttributes* SvgMarkerNode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svgmasknode.cxx b/svgio/source/svgreader/svgmasknode.cxx index 34f8faa5516a..b10fd3ffee22 100644 --- a/svgio/source/svgreader/svgmasknode.cxx +++ b/svgio/source/svgreader/svgmasknode.cxx @@ -48,7 +48,6 @@ namespace svgio SvgMaskNode::~SvgMaskNode() { - delete mpaTransform; } const SvgStyleAttributes* SvgMaskNode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svgrectnode.cxx b/svgio/source/svgreader/svgrectnode.cxx index 50df6c5f020e..93acc5425bb0 100644 --- a/svgio/source/svgreader/svgrectnode.cxx +++ b/svgio/source/svgreader/svgrectnode.cxx @@ -42,7 +42,6 @@ namespace svgio SvgRectNode::~SvgRectNode() { - delete mpaTransform; } const SvgStyleAttributes* SvgRectNode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx index 91b357977cf9..780066610072 100644 --- a/svgio/source/svgreader/svgsvgnode.cxx +++ b/svgio/source/svgreader/svgsvgnode.cxx @@ -106,7 +106,6 @@ namespace svgio SvgSvgNode::~SvgSvgNode() { - delete mpViewBox; } const SvgStyleAttributes* SvgSvgNode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svgsymbolnode.cxx b/svgio/source/svgreader/svgsymbolnode.cxx index 66264f814879..d3b60ab1aa3d 100644 --- a/svgio/source/svgreader/svgsymbolnode.cxx +++ b/svgio/source/svgreader/svgsymbolnode.cxx @@ -37,7 +37,6 @@ namespace svgio SvgSymbolNode::~SvgSymbolNode() { - delete mpViewBox; } const SvgStyleAttributes* SvgSymbolNode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svgtextnode.cxx b/svgio/source/svgreader/svgtextnode.cxx index 5c44ce064c16..5ca07549fb8b 100644 --- a/svgio/source/svgreader/svgtextnode.cxx +++ b/svgio/source/svgreader/svgtextnode.cxx @@ -42,7 +42,6 @@ namespace svgio SvgTextNode::~SvgTextNode() { - delete mpaTransform; } const SvgStyleAttributes* SvgTextNode::getSvgStyleAttributes() const diff --git a/svgio/source/svgreader/svgusenode.cxx b/svgio/source/svgreader/svgusenode.cxx index 7495c2b1d5ad..6db0ee1d2f92 100644 --- a/svgio/source/svgreader/svgusenode.cxx +++ b/svgio/source/svgreader/svgusenode.cxx @@ -41,7 +41,6 @@ namespace svgio SvgUseNode::~SvgUseNode() { - delete mpaTransform; } const SvgStyleAttributes* SvgUseNode::getSvgStyleAttributes() const |