diff options
Diffstat (limited to 'drawinglayer/source/attribute/linestartendattribute.cxx')
-rw-r--r-- | drawinglayer/source/attribute/linestartendattribute.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drawinglayer/source/attribute/linestartendattribute.cxx b/drawinglayer/source/attribute/linestartendattribute.cxx index dcfa94f35c39..33ac17c70599 100644 --- a/drawinglayer/source/attribute/linestartendattribute.cxx +++ b/drawinglayer/source/attribute/linestartendattribute.cxx @@ -20,7 +20,7 @@ #include <drawinglayer/attribute/linestartendattribute.hxx> #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> -#include <rtl/instance.hxx> +#include <utility> namespace drawinglayer::attribute @@ -36,17 +36,16 @@ namespace drawinglayer::attribute ImpLineStartEndAttribute( double fWidth, - const basegfx::B2DPolyPolygon& rPolyPolygon, + basegfx::B2DPolyPolygon aPolyPolygon, bool bCentered) : mfWidth(fWidth), - maPolyPolygon(rPolyPolygon), + maPolyPolygon(std::move(aPolyPolygon)), mbCentered(bCentered) { } ImpLineStartEndAttribute() : mfWidth(0.0), - maPolyPolygon(basegfx::B2DPolyPolygon()), mbCentered(false) { } @@ -66,8 +65,11 @@ namespace drawinglayer::attribute namespace { - struct theGlobalDefault : - public rtl::Static< LineStartEndAttribute::ImplType, theGlobalDefault > {}; + LineStartEndAttribute::ImplType& theGlobalDefault() + { + static LineStartEndAttribute::ImplType SINGLETON; + return SINGLETON; + } } LineStartEndAttribute::LineStartEndAttribute( @@ -80,7 +82,7 @@ namespace drawinglayer::attribute } LineStartEndAttribute::LineStartEndAttribute() - : mpLineStartEndAttribute(theGlobalDefault::get()) + : mpLineStartEndAttribute(theGlobalDefault()) { } @@ -90,7 +92,7 @@ namespace drawinglayer::attribute bool LineStartEndAttribute::isDefault() const { - return mpLineStartEndAttribute.same_object(theGlobalDefault::get()); + return mpLineStartEndAttribute.same_object(theGlobalDefault()); } LineStartEndAttribute& LineStartEndAttribute::operator=(const LineStartEndAttribute&) = default; |