summaryrefslogtreecommitdiff
path: root/svgio/inc/svglinenode.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'svgio/inc/svglinenode.hxx')
-rw-r--r--svgio/inc/svglinenode.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/svgio/inc/svglinenode.hxx b/svgio/inc/svglinenode.hxx
index 82889add15c5..0002dc181d86 100644
--- a/svgio/inc/svglinenode.hxx
+++ b/svgio/inc/svglinenode.hxx
@@ -37,7 +37,7 @@ namespace svgio::svgreader
SvgNumber maY1;
SvgNumber maX2;
SvgNumber maY2;
- std::unique_ptr<basegfx::B2DHomMatrix> mpaTransform;
+ std::optional<basegfx::B2DHomMatrix> mpaTransform;
public:
SvgLineNode(
@@ -62,8 +62,8 @@ namespace svgio::svgreader
const SvgNumber& getY2() const { return maY2; }
/// transform content, set if found in current context
- const basegfx::B2DHomMatrix* getTransform() const { return mpaTransform.get(); }
- void setTransform(const basegfx::B2DHomMatrix* pMatrix) { mpaTransform.reset(); if(pMatrix) mpaTransform.reset( new basegfx::B2DHomMatrix(*pMatrix) ); }
+ const std::optional<basegfx::B2DHomMatrix>& getTransform() const { return mpaTransform; }
+ void setTransform(const std::optional<basegfx::B2DHomMatrix>& pMatrix) { mpaTransform = pMatrix; }
};
} // end of namespace svgio::svgreader