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 /cui | |
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 'cui')
-rw-r--r-- | cui/source/customize/acccfg.cxx | 11 | ||||
-rw-r--r-- | cui/source/options/optHeaderTabListbox.cxx | 6 |
2 files changed, 6 insertions, 11 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index ee07d7e05e77..19cfe651410e 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -69,7 +69,7 @@ #include <vcl/help.hxx> #include <rtl/ustrbuf.hxx> #include <comphelper/sequenceashashmap.hxx> - +#include <o3tl/make_unique.hxx> // namespaces using namespace css; @@ -911,13 +911,10 @@ void SfxAcceleratorConfigPage::CreateCustomItems(SvTreeListEntry* pEntry, const OUString& sCol1 , const OUString& sCol2) { - std::unique_ptr<SfxAccCfgLBoxString_Impl> pStringItem1( - new SfxAccCfgLBoxString_Impl(pEntry, 0, sCol1)); - pEntry->ReplaceItem(std::move(pStringItem1), 1); - std::unique_ptr<SfxAccCfgLBoxString_Impl> pStringItem2( - new SfxAccCfgLBoxString_Impl(pEntry, 0, sCol2)); - pEntry->ReplaceItem(std::move(pStringItem2), 2); + pEntry->ReplaceItem(o3tl::make_unique<SfxAccCfgLBoxString_Impl>(pEntry, 0, sCol1), 1); + + pEntry->ReplaceItem(o3tl::make_unique<SfxAccCfgLBoxString_Impl>(pEntry, 0, sCol2), 2); } diff --git a/cui/source/options/optHeaderTabListbox.cxx b/cui/source/options/optHeaderTabListbox.cxx index db5a7ea95fae..8abd26130a2b 100644 --- a/cui/source/options/optHeaderTabListbox.cxx +++ b/cui/source/options/optHeaderTabListbox.cxx @@ -23,7 +23,7 @@ #include <svtools/headbar.hxx> #include <svtools/svlbitm.hxx> #include <svtools/treelistentry.hxx> - +#include <o3tl/make_unique.hxx> namespace svx { // class OptLBoxString_Impl ---------------------------------------------- @@ -71,9 +71,7 @@ void OptHeaderTabListBox::InitEntry( SvTreeListEntry* pEntry, const OUString& rT { // initialize all columns with own class (column 0 == Bitmap) SvLBoxString& rCol = static_cast<SvLBoxString&>(pEntry->GetItem( nCol )); - std::unique_ptr<OptLBoxString_Impl> pStr( - new OptLBoxString_Impl(pEntry, 0, rCol.GetText())); - pEntry->ReplaceItem(std::move(pStr), nCol); + pEntry->ReplaceItem(o3tl::make_unique<OptLBoxString_Impl>(pEntry, 0, rCol.GetText()), nCol); } } |