summaryrefslogtreecommitdiff
path: root/drawinglayer/source/attribute/sdrlinestartendattribute.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/source/attribute/sdrlinestartendattribute.cxx')
-rw-r--r--drawinglayer/source/attribute/sdrlinestartendattribute.cxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/drawinglayer/source/attribute/sdrlinestartendattribute.cxx b/drawinglayer/source/attribute/sdrlinestartendattribute.cxx
index c0a88b6f8c0b..911f8aef8bf5 100644
--- a/drawinglayer/source/attribute/sdrlinestartendattribute.cxx
+++ b/drawinglayer/source/attribute/sdrlinestartendattribute.cxx
@@ -19,7 +19,7 @@
#include <drawinglayer/attribute/sdrlinestartendattribute.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <rtl/instance.hxx>
+#include <utility>
namespace drawinglayer::attribute
@@ -39,16 +39,16 @@ namespace drawinglayer::attribute
bool mbEndCentered : 1; // Line is centered on line end point
ImpSdrLineStartEndAttribute(
- const basegfx::B2DPolyPolygon& rStartPolyPolygon,
- const basegfx::B2DPolyPolygon& rEndPolyPolygon,
+ basegfx::B2DPolyPolygon aStartPolyPolygon,
+ basegfx::B2DPolyPolygon aEndPolyPolygon,
double fStartWidth,
double fEndWidth,
bool bStartActive,
bool bEndActive,
bool bStartCentered,
bool bEndCentered)
- : maStartPolyPolygon(rStartPolyPolygon),
- maEndPolyPolygon(rEndPolyPolygon),
+ : maStartPolyPolygon(std::move(aStartPolyPolygon)),
+ maEndPolyPolygon(std::move(aEndPolyPolygon)),
mfStartWidth(fStartWidth),
mfEndWidth(fEndWidth),
mbStartActive(bStartActive),
@@ -59,9 +59,7 @@ namespace drawinglayer::attribute
}
ImpSdrLineStartEndAttribute()
- : maStartPolyPolygon(basegfx::B2DPolyPolygon()),
- maEndPolyPolygon(basegfx::B2DPolyPolygon()),
- mfStartWidth(0.0),
+ : mfStartWidth(0.0),
mfEndWidth(0.0),
mbStartActive(false),
mbEndActive(false),
@@ -95,8 +93,11 @@ namespace drawinglayer::attribute
namespace
{
- struct theGlobalDefault :
- public rtl::Static< SdrLineStartEndAttribute::ImplType, theGlobalDefault > {};
+ SdrLineStartEndAttribute::ImplType& theGlobalDefault()
+ {
+ static SdrLineStartEndAttribute::ImplType SINGLETON;
+ return SINGLETON;
+ }
}
SdrLineStartEndAttribute::SdrLineStartEndAttribute(
@@ -114,7 +115,7 @@ namespace drawinglayer::attribute
}
SdrLineStartEndAttribute::SdrLineStartEndAttribute()
- : mpSdrLineStartEndAttribute(theGlobalDefault::get())
+ : mpSdrLineStartEndAttribute(theGlobalDefault())
{
}
@@ -126,7 +127,7 @@ namespace drawinglayer::attribute
bool SdrLineStartEndAttribute::isDefault() const
{
- return mpSdrLineStartEndAttribute.same_object(theGlobalDefault::get());
+ return mpSdrLineStartEndAttribute.same_object(theGlobalDefault());
}
SdrLineStartEndAttribute& SdrLineStartEndAttribute::operator=(const SdrLineStartEndAttribute&) = default;