From a924606810a5d6e9a8e3d23e491d0bea5a5d2477 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 25 Sep 2014 17:35:05 +0200 Subject: editeng: std::auto_ptr -> std::unique_ptr Change-Id: I25e3599a37d720cbcf70ea13ab30234e54637d53 --- editeng/source/items/xmlcnitm.cxx | 2 +- editeng/source/uno/unoedhlp.cxx | 30 ++++++++++++++---------------- 2 files changed, 15 insertions(+), 17 deletions(-) (limited to 'editeng') diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx index f112383f0cc8..136230495a95 100644 --- a/editeng/source/items/xmlcnitm.cxx +++ b/editeng/source/items/xmlcnitm.cxx @@ -108,7 +108,7 @@ bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, sal } else { - std::auto_ptr pNewImpl(new SvXMLAttrContainerData); + std::unique_ptr pNewImpl(new SvXMLAttrContainerData); try { diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx index 83a6fd3bdb4d..dec133314207 100644 --- a/editeng/source/uno/unoedhlp.cxx +++ b/editeng/source/uno/unoedhlp.cxx @@ -44,56 +44,54 @@ sal_uLong SvxEditSourceHint::GetValue() const } -SAL_WNODEPRECATED_DECLARATIONS_PUSH -::std::auto_ptr SvxEditSourceHelper::EENotification2Hint( EENotify* aNotify ) +::std::unique_ptr SvxEditSourceHelper::EENotification2Hint( EENotify* aNotify ) { if( aNotify ) { switch( aNotify->eNotificationType ) { case EE_NOTIFY_TEXTMODIFIED: - return ::std::auto_ptr( new TextHint( TEXT_HINT_MODIFIED, aNotify->nParagraph ) ); + return ::std::unique_ptr( new TextHint( TEXT_HINT_MODIFIED, aNotify->nParagraph ) ); case EE_NOTIFY_PARAGRAPHINSERTED: - return ::std::auto_ptr( new TextHint( TEXT_HINT_PARAINSERTED, aNotify->nParagraph ) ); + return ::std::unique_ptr( new TextHint( TEXT_HINT_PARAINSERTED, aNotify->nParagraph ) ); case EE_NOTIFY_PARAGRAPHREMOVED: - return ::std::auto_ptr( new TextHint( TEXT_HINT_PARAREMOVED, aNotify->nParagraph ) ); + return ::std::unique_ptr( new TextHint( TEXT_HINT_PARAREMOVED, aNotify->nParagraph ) ); case EE_NOTIFY_PARAGRAPHSMOVED: - return ::std::auto_ptr( new SvxEditSourceHint( EDITSOURCE_HINT_PARASMOVED, aNotify->nParagraph, aNotify->nParam1, aNotify->nParam2 ) ); + return ::std::unique_ptr( new SvxEditSourceHint( EDITSOURCE_HINT_PARASMOVED, aNotify->nParagraph, aNotify->nParam1, aNotify->nParam2 ) ); case EE_NOTIFY_TEXTHEIGHTCHANGED: - return ::std::auto_ptr( new TextHint( TEXT_HINT_TEXTHEIGHTCHANGED, aNotify->nParagraph ) ); + return ::std::unique_ptr( new TextHint( TEXT_HINT_TEXTHEIGHTCHANGED, aNotify->nParagraph ) ); case EE_NOTIFY_TEXTVIEWSCROLLED: - return ::std::auto_ptr( new TextHint( TEXT_HINT_VIEWSCROLLED ) ); + return ::std::unique_ptr( new TextHint( TEXT_HINT_VIEWSCROLLED ) ); case EE_NOTIFY_TEXTVIEWSELECTIONCHANGED: - return ::std::auto_ptr( new SvxEditSourceHint( EDITSOURCE_HINT_SELECTIONCHANGED ) ); + return ::std::unique_ptr( new SvxEditSourceHint( EDITSOURCE_HINT_SELECTIONCHANGED ) ); case EE_NOTIFY_BLOCKNOTIFICATION_START: - return ::std::auto_ptr( new TextHint( TEXT_HINT_BLOCKNOTIFICATION_START, 0 ) ); + return ::std::unique_ptr( new TextHint( TEXT_HINT_BLOCKNOTIFICATION_START, 0 ) ); case EE_NOTIFY_BLOCKNOTIFICATION_END: - return ::std::auto_ptr( new TextHint( TEXT_HINT_BLOCKNOTIFICATION_END, 0 ) ); + return ::std::unique_ptr( new TextHint( TEXT_HINT_BLOCKNOTIFICATION_END, 0 ) ); case EE_NOTIFY_INPUT_START: - return ::std::auto_ptr( new TextHint( TEXT_HINT_INPUT_START, 0 ) ); + return ::std::unique_ptr( new TextHint( TEXT_HINT_INPUT_START, 0 ) ); case EE_NOTIFY_INPUT_END: - return ::std::auto_ptr( new TextHint( TEXT_HINT_INPUT_END, 0 ) ); + return ::std::unique_ptr( new TextHint( TEXT_HINT_INPUT_END, 0 ) ); case EE_NOTIFY_TEXTVIEWSELECTIONCHANGED_ENDD_PARA: - return ::std::auto_ptr( new SvxEditSourceHintEndPara( EDITSOURCE_HINT_SELECTIONCHANGED ) ); + return ::std::unique_ptr( new SvxEditSourceHintEndPara( EDITSOURCE_HINT_SELECTIONCHANGED ) ); default: OSL_FAIL( "SvxEditSourceHelper::EENotification2Hint unknown notification" ); break; } } - return ::std::auto_ptr( new SfxHint() ); + return ::std::unique_ptr( new SfxHint() ); } -SAL_WNODEPRECATED_DECLARATIONS_POP bool SvxEditSourceHelper::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, const EditEngine& rEE, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell ) { -- cgit