diff --git a/svgio/inc/svgpatternnode.hxx b/svgio/inc/svgpatternnode.hxx index 60c6b7f7ced8..219ca52eae73 100644 --- a/svgio/inc/svgpatternnode.hxx +++ b/svgio/inc/svgpatternnode.hxx @@ -43,10 +43,10 @@ namespace svgio::svgreader SvgNumber maY; SvgNumber maWidth; SvgNumber maHeight; - std::unique_ptr - mpPatternUnits; - std::unique_ptr - mpPatternContentUnits; + std::optional + moPatternUnits; + std::optional + moPatternContentUnits; std::optional mpaPatternTransform; @@ -99,11 +99,11 @@ namespace svgio::svgreader /// PatternUnits content const SvgUnits* getPatternUnits() const; - void setPatternUnits(const SvgUnits aPatternUnits) { mpPatternUnits.reset( new SvgUnits(aPatternUnits) ); } + void setPatternUnits(const SvgUnits aPatternUnits) { moPatternUnits = aPatternUnits; } /// PatternContentUnits content const SvgUnits* getPatternContentUnits() const; - void setPatternContentUnits(const SvgUnits aPatternContentUnits) { mpPatternContentUnits.reset( new SvgUnits(aPatternContentUnits) ); } + void setPatternContentUnits(const SvgUnits aPatternContentUnits) { moPatternContentUnits = aPatternContentUnits; } /// PatternTransform content std::optional getPatternTransform() const; diff --git a/svgio/source/svgreader/svgpatternnode.cxx b/svgio/source/svgreader/svgpatternnode.cxx index ff7f5768d3d0..9b94c537eaef 100644 --- a/svgio/source/svgreader/svgpatternnode.cxx +++ b/svgio/source/svgreader/svgpatternnode.cxx @@ -402,9 +402,9 @@ namespace svgio::svgreader const SvgUnits* SvgPatternNode::getPatternUnits() const { - if(mpPatternUnits) + if(moPatternUnits) { - return mpPatternUnits.get(); + return &*moPatternUnits; } const_cast< SvgPatternNode* >(this)->tryToFindLink(); @@ -422,9 +422,9 @@ namespace svgio::svgreader const SvgUnits* SvgPatternNode::getPatternContentUnits() const { - if(mpPatternContentUnits) + if(moPatternContentUnits) { - return mpPatternContentUnits.get(); + return &*moPatternContentUnits; } const_cast< SvgPatternNode* >(this)->tryToFindLink();