diff options
Diffstat (limited to 'svx/source/xoutdev/xtablend.cxx')
-rw-r--r-- | svx/source/xoutdev/xtablend.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx index d27a9c6886c4..988bcb8edfa1 100644 --- a/svx/source/xoutdev/xtablend.cxx +++ b/svx/source/xoutdev/xtablend.cxx @@ -32,6 +32,7 @@ #include <drawinglayer/processor2d/processor2dtools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <memory> +#include <o3tl/make_unique.hxx> using namespace com::sun::star; @@ -44,11 +45,6 @@ XLineEndList::~XLineEndList() { } -XLineEndEntry* XLineEndList::Remove(long nIndex) -{ - return static_cast<XLineEndEntry*>( XPropertyList::Remove(nIndex) ); -} - XLineEndEntry* XLineEndList::GetLineEnd(long nIndex) const { return static_cast<XLineEndEntry*>( XPropertyList::Get(nIndex) ); @@ -67,7 +63,7 @@ bool XLineEndList::Create() aTriangle.append(basegfx::B2DPoint(0.0, 30.0)); aTriangle.append(basegfx::B2DPoint(20.0, 30.0)); aTriangle.setClosed(true); - Insert( new XLineEndEntry( basegfx::B2DPolyPolygon(aTriangle), SVX_RESSTR( RID_SVXSTR_ARROW ) ) ); + Insert( o3tl::make_unique<XLineEndEntry>( basegfx::B2DPolyPolygon(aTriangle), SVX_RESSTR( RID_SVXSTR_ARROW ) ) ); basegfx::B2DPolygon aSquare; aSquare.append(basegfx::B2DPoint(0.0, 0.0)); @@ -75,10 +71,10 @@ bool XLineEndList::Create() aSquare.append(basegfx::B2DPoint(10.0, 10.0)); aSquare.append(basegfx::B2DPoint(0.0, 10.0)); aSquare.setClosed(true); - Insert( new XLineEndEntry( basegfx::B2DPolyPolygon(aSquare), SVX_RESSTR( RID_SVXSTR_SQUARE ) ) ); + Insert( o3tl::make_unique<XLineEndEntry>( basegfx::B2DPolyPolygon(aSquare), SVX_RESSTR( RID_SVXSTR_SQUARE ) ) ); basegfx::B2DPolygon aCircle(basegfx::tools::createPolygonFromCircle(basegfx::B2DPoint(0.0, 0.0), 100.0)); - Insert( new XLineEndEntry( basegfx::B2DPolyPolygon(aCircle), SVX_RESSTR( RID_SVXSTR_CIRCLE ) ) ); + Insert( o3tl::make_unique<XLineEndEntry>( basegfx::B2DPolyPolygon(aCircle), SVX_RESSTR( RID_SVXSTR_CIRCLE ) ) ); return true; } |