diff options
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/svtabbx.cxx | 5 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 13 | ||||
-rw-r--r-- | svtools/source/uno/treecontrolpeer.cxx | 6 |
3 files changed, 8 insertions, 16 deletions
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 068758ac8e62..8e845bbf0fb0 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -27,7 +27,7 @@ #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> #include "svtaccessiblefactory.hxx" - +#include <o3tl/make_unique.hxx> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::accessibility; @@ -83,8 +83,7 @@ void SvTabListBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, for( sal_uInt16 nToken = 0; nToken < nCount; nToken++ ) { const OUString aToken = GetToken(aCurEntry, nIndex); - std::unique_ptr<SvLBoxString> pStr(new SvLBoxString(pEntry, 0, aToken)); - pEntry->AddItem(std::move(pStr)); + pEntry->AddItem(o3tl::make_unique<SvLBoxString>(pEntry, 0, aToken)); } } SvTabListBox::SvTabListBox( vcl::Window* pParent, WinBits nBits ) diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 540f5b0f2019..0397aed3c281 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -44,7 +44,7 @@ #include <set> #include <string.h> #include <vector> - +#include <o3tl/make_unique.hxx> using namespace css::accessibility; // Drag&Drop @@ -1730,17 +1730,12 @@ void SvTreeListBox::InitEntry(SvTreeListEntry* pEntry, { if( nTreeFlags & SvTreeFlags::CHKBTN ) { - std::unique_ptr<SvLBoxButton> pButton( - new SvLBoxButton(pEntry, eButtonKind, 0, pCheckButtonData)); - pEntry->AddItem(std::move(pButton)); + pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(pEntry, eButtonKind, 0, pCheckButtonData)); } - std::unique_ptr<SvLBoxContextBmp> pContextBmp(new SvLBoxContextBmp( - pEntry,0, aCollEntryBmp,aExpEntryBmp, mbContextBmpExpanded)); - pEntry->AddItem(std::move(pContextBmp)); + pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>( pEntry,0, aCollEntryBmp,aExpEntryBmp, mbContextBmpExpanded)); - std::unique_ptr<SvLBoxString> pString(new SvLBoxString(pEntry, 0, aStr)); - pEntry->AddItem(std::move(pString)); + pEntry->AddItem(o3tl::make_unique<SvLBoxString>(pEntry, 0, aStr)); } OUString SvTreeListBox::GetEntryText(SvTreeListEntry* pEntry) const diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 0f4ed9b865d0..e2699e97887e 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -39,7 +39,7 @@ #include <svtools/svlbitm.hxx> #include <map> - +#include <o3tl/make_unique.hxx> using namespace ::com::sun::star; using namespace css::uno; using namespace css::lang; @@ -239,10 +239,8 @@ UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xN Image aImage; pEntry = new UnoTreeListEntry( xNode, this ); { - std::unique_ptr<ImplContextGraphicItem> pContextBmp( - new ImplContextGraphicItem(pEntry, 0, aImage, aImage, true)); - pEntry->AddItem(std::move(pContextBmp)); + pEntry->AddItem(o3tl::make_unique<ImplContextGraphicItem>(pEntry, 0, aImage, aImage, true)); } std::unique_ptr<UnoTreeListItem> pUnoItem(new UnoTreeListItem(pEntry)); |