summaryrefslogtreecommitdiffstats
path: root/svgio/inc/svgpatternnode.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'svgio/inc/svgpatternnode.hxx')
-rw-r--r--svgio/inc/svgpatternnode.hxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/svgio/inc/svgpatternnode.hxx b/svgio/inc/svgpatternnode.hxx
index d0b2ca02cc93..5aa93b373217 100644
--- a/svgio/inc/svgpatternnode.hxx
+++ b/svgio/inc/svgpatternnode.hxx
@@ -38,7 +38,8 @@ namespace svgio
SvgStyleAttributes maSvgStyleAttributes;
/// variable scan values, dependent of given XAttributeList
- basegfx::B2DRange* mpViewBox;
+ std::unique_ptr<basegfx::B2DRange>
+ mpViewBox;
SvgAspectRatio maSvgAspectRatio;
SvgNumber maX;
SvgNumber maY;
@@ -48,7 +49,8 @@ namespace svgio
mpPatternUnits;
std::unique_ptr<SvgUnits>
mpPatternContentUnits;
- basegfx::B2DHomMatrix* mpaPatternTransform;
+ std::unique_ptr<basegfx::B2DHomMatrix>
+ mpaPatternTransform;
/// link to another pattern used as style. If maXLink
/// is set, the node can be fetched on demand by using
@@ -79,7 +81,7 @@ namespace svgio
/// viewBox content
const basegfx::B2DRange* getViewBox() const;
- void setViewBox(const basegfx::B2DRange* pViewBox) { if(mpViewBox) delete mpViewBox; mpViewBox = nullptr; if(pViewBox) mpViewBox = new basegfx::B2DRange(*pViewBox); }
+ void setViewBox(const basegfx::B2DRange* pViewBox) { mpViewBox.reset(); if(pViewBox) mpViewBox.reset(new basegfx::B2DRange(*pViewBox)); }
/// SvgAspectRatio content
const SvgAspectRatio& getSvgAspectRatio() const;
@@ -106,7 +108,7 @@ namespace svgio
/// PatternTransform content
const basegfx::B2DHomMatrix* getPatternTransform() const;
- void setPatternTransform(const basegfx::B2DHomMatrix* pMatrix) { if(mpaPatternTransform) delete mpaPatternTransform; mpaPatternTransform = nullptr; if(pMatrix) mpaPatternTransform = new basegfx::B2DHomMatrix(*pMatrix); }
+ void setPatternTransform(const basegfx::B2DHomMatrix* pMatrix) { mpaPatternTransform.reset(); if(pMatrix) mpaPatternTransform.reset(new basegfx::B2DHomMatrix(*pMatrix)); }
};
} // end of namespace svgreader