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 /dbaccess | |
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 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/control/dbtreelistbox.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WNameMatch.cxx | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index b39efbd6cbd2..d27560190b99 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -39,7 +39,7 @@ #include "svtools/treelistentry.hxx" #include <memory> - +#include <o3tl/make_unique.hxx> namespace dbaui { @@ -139,8 +139,7 @@ void DBTreeListBox::InitEntry(SvTreeListEntry* _pEntry, const OUString& aStr, co { SvTreeListBox::InitEntry( _pEntry, aStr, _rCollEntryBmp,_rExpEntryBmp, eButtonKind); SvLBoxItem* pTextItem(_pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); - std::unique_ptr<SvLBoxString> pString(new OBoldListboxString(_pEntry, 0, aStr)); - _pEntry->ReplaceItem(std::move(pString), _pEntry->GetPos(pTextItem)); + _pEntry->ReplaceItem(o3tl::make_unique<OBoldListboxString>(_pEntry, 0, aStr), _pEntry->GetPos(pTextItem)); } void DBTreeListBox::implStopSelectionTimer() diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index 004f33a4a26b..4f49278f6a44 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -28,7 +28,7 @@ #include <vcl/builderfactory.hxx> #include "svtools/treelistentry.hxx" #include <com/sun/star/sdbc/DataType.hpp> - +#include <o3tl/make_unique.hxx> using namespace ::dbaui; // OWizColumnSelect OWizNameMatching::OWizNameMatching( vcl::Window* pParent) @@ -373,8 +373,7 @@ VCL_BUILDER_FACTORY(OColumnTreeBox) void OColumnTreeBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind) { DBTreeListBox::InitEntry(pEntry, rStr, rImg1, rImg2, eButtonKind); - std::unique_ptr<SvLBoxString> pString(new OColumnString(pEntry, 0, rStr,false)); - pEntry->ReplaceItem(std::move(pString), pEntry->ItemCount() - 1); + pEntry->ReplaceItem(o3tl::make_unique<OColumnString>(pEntry, 0, rStr,false), pEntry->ItemCount() - 1); } bool OColumnTreeBox::Select( SvTreeListEntry* pEntry, bool bSelect ) |