diff options
author | Sheikha AL-Hinai <sheikha443@gmail.com> | 2015-12-28 13:56:23 +0400 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-01-05 11:47:50 +0000 |
commit | d75b9fd582f0aa83bd2fc99028b3f83eb7171d61 (patch) | |
tree | ec1f2a307f773b18e0bf17a281a001fb0aa43bbf /sfx2 | |
parent | f961fef03906fc059a4a0c008799f68fc22727c1 (diff) |
tdf#94205: Use o3tl::make_unique insted of new+std::move.
Change-Id: I9ff14760479d2ac882546e2e5b74ab750ba2fa4b
Reviewed-on: https://gerrit.libreoffice.org/20984
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 2b7c1dda7894..473ef30ae56e 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -69,7 +69,7 @@ #include <sfx2/StyleManager.hxx> #include <sfx2/StylePreviewRenderer.hxx> - +#include <o3tl/make_unique.hxx> using namespace css; using namespace css::beans; using namespace css::frame; @@ -640,9 +640,7 @@ SvTreeListEntry* FillBox_Impl(SvTreeListBox* pBox, if (officecfg::Office::Common::StylesAndFormatting::Preview::get()) { - std::unique_ptr<StyleLBoxString> pStyleLBoxString( - new StyleLBoxString(pTreeListEntry, 0, pEntry->getName(), eStyleFamily)); - pTreeListEntry->ReplaceItem(std::move(pStyleLBoxString), 1); + pTreeListEntry->ReplaceItem(o3tl::make_unique<StyleLBoxString>(pTreeListEntry, 0, pEntry->getName(), eStyleFamily), 1); } pBox->GetModel()->InvalidateEntry(pTreeListEntry); @@ -1258,9 +1256,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags) SvTreeListEntry* pTreeListEntry = aFmtLb->InsertEntry(aStrings[nPos], nullptr, false, nPos); if (officecfg::Office::Common::StylesAndFormatting::Preview::get()) { - std::unique_ptr<StyleLBoxString> pStyleLBoxString( - new StyleLBoxString(pTreeListEntry, 0, aStrings[nPos], eFam)); - pTreeListEntry->ReplaceItem(std::move(pStyleLBoxString), 1); + pTreeListEntry->ReplaceItem(o3tl::make_unique<StyleLBoxString>(pTreeListEntry, 0, aStrings[nPos], eFam), 1); } aFmtLb->GetModel()->InvalidateEntry(pTreeListEntry); } |