From 075d472a9d120431f0b8731e4dcfe3e8b4ded521 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 2 Oct 2013 16:41:03 +0200 Subject: Use std::auto_ptr::reset where applicable (avoids warnings about std::auto_ptr ctor being deprecated) Change-Id: I39d2d155c0bc62ca77a30c02428ea39102213f42 --- sw/source/core/undo/rolbck.cxx | 4 ++-- sw/source/ui/dbui/dbinsdlg.cxx | 4 ++-- sw/source/ui/dbui/dbmgr.cxx | 2 +- sw/source/ui/uiview/viewling.cxx | 4 ++-- sw/source/ui/uno/unomailmerge.cxx | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) (limited to 'sw') diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 59cfec65def5..0d8295b39650 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -611,12 +611,12 @@ void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool ) // #111660# don't crash when nNode1 doesn't point to content node. if(pCntntNd) - pPam = ::std::auto_ptr(new SwPaM(*pCntntNd, m_nCntnt)); + pPam.reset(new SwPaM(*pCntntNd, m_nCntnt)); } else { pMark = pMarkAccess->findMark(m_aName)->get(); - pPam = ::std::auto_ptr(new SwPaM(pMark->GetMarkPos())); + pPam.reset(new SwPaM(pMark->GetMarkPos())); } if(m_bSaveOtherPos) diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index ce767bace9e7..95bac6ed83bb 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -1154,7 +1154,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence& rSelection, break; if( 10 == i ) - pWait = ::std::auto_ptr(new SwWait( *pView->GetDocShell(), sal_True )); + pWait.reset(new SwWait( *pView->GetDocShell(), sal_True )); } rSh.MoveTable( GetfnTableCurr(), GetfnTableStart() ); @@ -1382,7 +1382,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence& rSelection, rSh.SwEditShell::SplitNode(); if( 10 == i ) - pWait = ::std::auto_ptr(new SwWait( *pView->GetDocShell(), sal_True )); + pWait.reset(new SwWait( *pView->GetDocShell(), sal_True )); } if( !bSetCrsr && pMark != NULL) diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index c67ef7b131ed..44ac4fe5c6ae 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -1001,7 +1001,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, aEntry.removeSegment(); sPath = aEntry.GetMainURL( INetURLObject::NO_DECODE ); OUString sExt(comphelper::string::stripStart(pStoreToFilter->GetDefaultExtension(), '*')); - aTempFile = std::auto_ptr< utl::TempFile >( + aTempFile.reset( new utl::TempFile(sLeading,&sExt,&sPath )); if( bAsSingleFile ) aTempFile->EnableKillingFile(); diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index 1d2d9fa5e0c4..fc1bf1ca5bfc 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -689,10 +689,10 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt) { sal_Int32 nPos = aPoint.nContent.GetIndex(); (void) nPos; - pPopup = std::auto_ptr< SwSpellPopup >(new SwSpellPopup( m_pWrtShell, aGrammarCheckRes, nErrorInResult, aSuggestions, aParaText )); + pPopup.reset(new SwSpellPopup( m_pWrtShell, aGrammarCheckRes, nErrorInResult, aSuggestions, aParaText )); } else - pPopup = std::auto_ptr< SwSpellPopup >(new SwSpellPopup( m_pWrtShell, xAlt, aParaText )); + pPopup.reset(new SwSpellPopup( m_pWrtShell, xAlt, aParaText )); ui::ContextMenuExecuteEvent aEvent; const Point aPixPos = GetEditWin().LogicToPixel( rPt ); diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index 86d20e220ed8..e601f2478253 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -739,7 +739,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( aMergeDesc.bSendAsAttachment = bSendAsAttachment; aMergeDesc.bCreateSingleFile = sal_False; - pMMConfigItem = std::auto_ptr< SwMailMergeConfigItem >(new SwMailMergeConfigItem); + pMMConfigItem.reset(new SwMailMergeConfigItem); aMergeDesc.pMailMergeConfigItem = pMMConfigItem.get(); aMergeDesc.xSmtpServer = SwMailMergeHelper::ConnectToSmtpServer( *pMMConfigItem, -- cgit