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 /svx/source | |
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 'svx/source')
-rw-r--r-- | svx/source/accessibility/AccessibleShape.cxx | 8 | ||||
-rw-r--r-- | svx/source/dialog/docrecovery.cxx | 6 | ||||
-rw-r--r-- | svx/source/table/accessiblecell.cxx | 6 |
3 files changed, 8 insertions, 12 deletions
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 <algorithm> #include <memory> #include <utility> - +#include <o3tl/make_unique.hxx> 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<SvxEditSource> pEditSource( new AccessibleEmptyEditSource ( *pSdrObject, *pView, *pWindow) ); - mpText = new AccessibleTextHelper( std::move(pEditSource) ); + mpText = new AccessibleTextHelper( o3tl::make_unique<AccessibleEmptyEditSource >(*pSdrObject, *pView, *pWindow) ); } else { // non-empty text -> use full-fledged edit source right away - ::std::unique_ptr<SvxEditSource> pEditSource( new SvxTextEditSource ( *pSdrObject, nullptr, *pView, *pWindow) ); - mpText = new AccessibleTextHelper( std::move(pEditSource) ); + mpText = new AccessibleTextHelper( o3tl::make_unique<SvxTextEditSource >(*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 <unotools/pathoptions.hxx> #include "svtools/treelistentry.hxx" #include <officecfg/Office/Recovery.hxx> - +#include <o3tl/make_unique.hxx> 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<SvLBoxString&>(pEntry->GetItem(2)); - std::unique_ptr<RecovDocListEntry> p( - new RecovDocListEntry(pEntry, 0, rCol.GetText())); - pEntry->ReplaceItem(std::move(p), 2); + pEntry->ReplaceItem(o3tl::make_unique<RecovDocListEntry>(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 <editeng/outlobj.hxx> #include <svx/unoshtxt.hxx> #include <svx/svdotext.hxx> - +#include <o3tl/make_unique.hxx> 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<SvxEditSource> pEditSource( new SvxTextEditSource( mxCell->GetObject(), mxCell.get(), *pView, *pWindow) ); - mpText = new AccessibleTextHelper( std::move(pEditSource) ); + + mpText = new AccessibleTextHelper( o3tl::make_unique<SvxTextEditSource>(mxCell->GetObject(), mxCell.get(), *pView, *pWindow) ); mpText->SetEventSource(this); } |