diff options
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); } } |