From e722564d40143fa029fe10d22a625539c795ee04 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 11 Apr 2018 12:58:07 +0200 Subject: make SvLBoxItem::Clone return a std::unique_ptr and combine the Create/Clone methods into one Change-Id: Ia982be6b50135b8d368d84070327689be6b3d890 Reviewed-on: https://gerrit.libreoffice.org/52745 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/dialog/ctredlin.cxx | 4 ++-- svx/source/dialog/fontlb.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'svx') diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index 8e2e68baafc4..be1e113c70c3 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -75,9 +75,9 @@ SvLBoxColorString::~SvLBoxColorString() { } -SvLBoxItem* SvLBoxColorString::Create() const +std::unique_ptr SvLBoxColorString::Clone(SvLBoxItem const *) const { - return new SvLBoxColorString; + return std::unique_ptr(new SvLBoxColorString); } void SvLBoxColorString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx index 6ba989d88690..a2e4b6dde8c3 100644 --- a/svx/source/dialog/fontlb.cxx +++ b/svx/source/dialog/fontlb.cxx @@ -46,9 +46,9 @@ SvLBoxFontString::~SvLBoxFontString() { } -SvLBoxItem* SvLBoxFontString::Create() const +std::unique_ptr SvLBoxFontString::Clone(SvLBoxItem const *) const { - return new SvLBoxFontString; + return std::unique_ptr(new SvLBoxFontString); } void SvLBoxFontString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, -- cgit