summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-11 12:09:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-12 08:45:17 +0200
commitd1ae2387c729ac8a0e616c57075174eb0d06d389 (patch)
tree8ce39a165e5c6560c6b57645c109384b4c20efc9 /svtools
parent6ec4109f73740de067b713cd46dae043f1b05dc5 (diff)
make FontList::Clone return a std::unique_ptr
and simplify the logic in SvxCharNamePage Change-Id: Ic1b379bb83203aa1ebf47b44d944c83a02c04224 Reviewed-on: https://gerrit.libreoffice.org/52744 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ctrltool.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index ad0e038dacc9..993a0ffb8b30 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -381,10 +381,9 @@ FontList::~FontList()
}
}
-FontList* FontList::Clone() const
+std::unique_ptr<FontList> FontList::Clone() const
{
- FontList* pReturn = new FontList(mpDev, mpDev2);
- return pReturn;
+ return std::unique_ptr<FontList>(new FontList(mpDev, mpDev2));
}
const OUString& FontList::GetStyleName(FontWeight eWeight, FontItalic eItalic) const