summaryrefslogtreecommitdiff
path: root/svgio/inc/svgellipsenode.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'svgio/inc/svgellipsenode.hxx')
-rw-r--r--svgio/inc/svgellipsenode.hxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/svgio/inc/svgellipsenode.hxx b/svgio/inc/svgellipsenode.hxx
index ad7d22303e3c..12a2cf5835ee 100644
--- a/svgio/inc/svgellipsenode.hxx
+++ b/svgio/inc/svgellipsenode.hxx
@@ -22,6 +22,7 @@
#include <svgnode.hxx>
#include <svgstyleattributes.hxx>
+#include <memory>
namespace svgio
{
@@ -38,7 +39,7 @@ namespace svgio
SvgNumber maCy;
SvgNumber maRx;
SvgNumber maRy;
- basegfx::B2DHomMatrix* mpaTransform;
+ std::unique_ptr<basegfx::B2DHomMatrix> mpaTransform;
public:
SvgEllipseNode(
@@ -63,8 +64,8 @@ namespace svgio
const SvgNumber& getRy() const { return maRy; }
/// transform content, set if found in current context
- const basegfx::B2DHomMatrix* getTransform() const { return mpaTransform; }
- void setTransform(const basegfx::B2DHomMatrix* pMatrix) { if(mpaTransform) delete mpaTransform; mpaTransform = nullptr; if(pMatrix) mpaTransform = new basegfx::B2DHomMatrix(*pMatrix); }
+ const basegfx::B2DHomMatrix* getTransform() const { return mpaTransform.get(); }
+ void setTransform(const basegfx::B2DHomMatrix* pMatrix) { mpaTransform.reset(); if(pMatrix) mpaTransform.reset( new basegfx::B2DHomMatrix(*pMatrix) ); }
};
} // end of namespace svgreader
} // end of namespace svgio