From d75b9fd582f0aa83bd2fc99028b3f83eb7171d61 Mon Sep 17 00:00:00 2001 From: Sheikha AL-Hinai Date: Mon, 28 Dec 2015 13:56:23 +0400 Subject: 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 Tested-by: Stephan Bergmann --- svx/source/accessibility/AccessibleShape.cxx | 8 +++----- svx/source/dialog/docrecovery.cxx | 6 ++---- svx/source/table/accessiblecell.cxx | 6 +++--- 3 files changed, 8 insertions(+), 12 deletions(-) (limited to 'svx/source') diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 310ef4979533..93b4e134efa5 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -58,7 +58,7 @@ #include #include #include - +#include using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; using ::com::sun::star::uno::Reference; @@ -172,14 +172,12 @@ void AccessibleShape::Init() if( !pOutlinerParaObject ) { // empty text -> use proxy edit source to delay creation of EditEngine - ::std::unique_ptr pEditSource( new AccessibleEmptyEditSource ( *pSdrObject, *pView, *pWindow) ); - mpText = new AccessibleTextHelper( std::move(pEditSource) ); + mpText = new AccessibleTextHelper( o3tl::make_unique(*pSdrObject, *pView, *pWindow) ); } else { // non-empty text -> use full-fledged edit source right away - ::std::unique_ptr pEditSource( new SvxTextEditSource ( *pSdrObject, nullptr, *pView, *pWindow) ); - mpText = new AccessibleTextHelper( std::move(pEditSource) ); + mpText = new AccessibleTextHelper( o3tl::make_unique(*pSdrObject, nullptr, *pView, *pWindow) ); } if( bOwnParaObj ) diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index a81c3690dda6..ba48e63ba6b1 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -57,7 +57,7 @@ #include #include "svtools/treelistentry.hxx" #include - +#include namespace svx{ namespace DocRecovery{ @@ -845,9 +845,7 @@ void RecovDocList::InitEntry(SvTreeListEntry* pEntry, DBG_ASSERT( TabCount() == 2, "*RecovDocList::InitEntry(): structure missmatch" ); SvLBoxString& rCol = static_cast(pEntry->GetItem(2)); - std::unique_ptr p( - new RecovDocListEntry(pEntry, 0, rCol.GetText())); - pEntry->ReplaceItem(std::move(p), 2); + pEntry->ReplaceItem(o3tl::make_unique(pEntry, 0, rCol.GetText()), 2); } diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index 74b4fa85b1d6..0aec0e7a8a45 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -36,7 +36,7 @@ #include #include #include - +#include using namespace sdr::table; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -83,8 +83,8 @@ void AccessibleCell::Init() if( pOutlinerParaObject ) { // non-empty text -> use full-fledged edit source right away - ::std::unique_ptr pEditSource( new SvxTextEditSource( mxCell->GetObject(), mxCell.get(), *pView, *pWindow) ); - mpText = new AccessibleTextHelper( std::move(pEditSource) ); + + mpText = new AccessibleTextHelper( o3tl::make_unique(mxCell->GetObject(), mxCell.get(), *pView, *pWindow) ); mpText->SetEventSource(this); } -- cgit