From d5c59404bec65c8a9d9e05c1fcc24e068d170924 Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Wed, 26 Feb 2014 17:20:31 +0900 Subject: Replace deprecated std::auto_ptr with boost::scoped_ptr Change-Id: I773524536c0ed7bc34eb08cd35cfc77e83f722ba --- sw/source/core/txtnode/thints.cxx | 7 ++++--- sw/source/core/undo/rolbck.cxx | 3 ++- sw/source/core/unocore/unoparagraph.cxx | 4 ++-- toolkit/source/controls/unocontrolmodel.cxx | 4 ++-- uui/source/iahndl-errorhandler.cxx | 7 +++---- uui/source/iahndl-filter.cxx | 5 +++-- vcl/source/edit/vclmedit.cxx | 5 ++--- xmloff/source/draw/shapeexport.cxx | 5 ++--- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 6a8da0ef7789..164daf8697f6 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -70,6 +70,7 @@ #include #include #include +#include #ifdef DBG_UTIL #define CHECK Check(true); @@ -1004,7 +1005,7 @@ SwTxtAttr* MakeTxtAttr( // If the attribute is an auto-style which refers to a pool that is // different from rDoc's pool, we have to correct this: const StylePool::SfxItemSet_Pointer_t pAutoStyle = static_cast(rAttr).GetStyleHandle(); - ::std::auto_ptr pNewSet( + boost::scoped_ptr pNewSet( pAutoStyle->SfxItemSet::Clone( sal_True, &rDoc.GetAttrPool() )); SwTxtAttr* pNew = MakeTxtAttr( rDoc, *pNewSet, nStt, nEnd ); return pNew; @@ -2138,7 +2139,7 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, else // es ist ein Bereich definiert { // #i75299# - ::std::auto_ptr< std::vector< SwPoolItemEndPair > > pAttrArr; + boost::scoped_ptr< std::vector< SwPoolItemEndPair > > pAttrArr; const sal_uInt16 coArrSz = static_cast(RES_TXTATR_WITHEND_END) - static_cast(RES_CHRATR_BEGIN); @@ -2174,7 +2175,7 @@ bool SwTxtNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, if( bChkInvalid ) { // uneindeutig ? - ::std::auto_ptr< SfxItemIter > pItemIter; + boost::scoped_ptr< SfxItemIter > pItemIter; const SfxPoolItem* pItem = 0; if ( RES_TXTATR_AUTOFMT == pHt->Which() ) diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 0be55af7ca8e..d53eec68db73 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -54,6 +54,7 @@ #include #include #include +#include OUString SwHistoryHint::GetDescription() const { @@ -599,7 +600,7 @@ void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool ) SwNodes& rNds = pDoc->GetNodes(); IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess(); - ::std::auto_ptr pPam; + boost::scoped_ptr pPam; ::sw::mark::IMark* pMark = NULL; if(m_bSavePos) diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index db571cbff0d2..212aef3fea7b 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -46,7 +46,7 @@ #include #include #include - +#include using namespace ::com::sun::star; @@ -1025,7 +1025,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) // to paragraph boundaries SwPosition aStart( *aCursor.Start() ); SwPosition aEnd ( *aCursor.End() ); - ::std::auto_ptr pTemp( + boost::scoped_ptr pTemp( aCursor.GetDoc()->CreateUnoCrsr(aStart, false) ); if(!SwUnoCursorHelper::IsStartOfPara(*pTemp)) { diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index f1dfb723f4d9..3af23cb198be 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -49,8 +49,8 @@ #include #include -#include #include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -1326,7 +1326,7 @@ void UnoControlModel::setPropertyValues( const ::com::sun::star::uno::Sequence< { // if somebody sets properties which are single aspects of a font descriptor, // remove them, and build a font descriptor instead - ::std::auto_ptr< awt::FontDescriptor > pFD; + boost::scoped_ptr< awt::FontDescriptor > pFD; for ( sal_uInt16 n = 0; n < nProps; ++n ) { if ( ( pHandles[n] >= BASEPROPERTY_FONTDESCRIPTORPART_START ) && ( pHandles[n] <= BASEPROPERTY_FONTDESCRIPTORPART_END ) ) diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx index 6d65d66d8660..80b2952c5e90 100644 --- a/uui/source/iahndl-errorhandler.cxx +++ b/uui/source/iahndl-errorhandler.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include - #include "osl/mutex.hxx" #include "vcl/svapp.hxx" #include "vcl/msgbox.hxx" @@ -35,6 +33,7 @@ #include "getcontinuations.hxx" #include "iahndl.hxx" +#include using namespace com::sun::star; @@ -57,7 +56,7 @@ executeErrorDialog( //TODO! must be internationalized aText.append(rMessage); - std::auto_ptr< MessBox > xBox; + boost::scoped_ptr< MessBox > xBox; try { switch (eClassification) @@ -170,7 +169,7 @@ UUIInteractionHelper::handleErrorHandlerRequest( SOURCE_UUI; SolarMutexGuard aGuard; - std::auto_ptr< ResMgr > xManager; + boost::scoped_ptr< ResMgr > xManager; xManager.reset(ResMgr::CreateResMgr(aManager[eSource])); if (!xManager.get()) return; diff --git a/uui/source/iahndl-filter.cxx b/uui/source/iahndl-filter.cxx index d67717aa7f1a..8db625552969 100644 --- a/uui/source/iahndl-filter.cxx +++ b/uui/source/iahndl-filter.cxx @@ -39,6 +39,7 @@ #include "fltdlg.hxx" #include "iahndl.hxx" +#include using namespace com::sun::star; @@ -56,9 +57,9 @@ executeFilterDialog( { SolarMutexGuard aGuard; - std::auto_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui")); + boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui")); - std::auto_ptr< uui::FilterDialog > xDialog( + boost::scoped_ptr< uui::FilterDialog > xDialog( new uui::FilterDialog(pParent, xManager.get())); xDialog->SetURL(rURL); diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index ea5237903c38..e3448fa02217 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include - #include #include #include @@ -34,6 +32,7 @@ #include #include #include +#include class TextWindow : public Window @@ -981,7 +980,7 @@ VclMultiLineEdit::VclMultiLineEdit( Window* pParent, const ResId& rResId ) VclMultiLineEdit::~VclMultiLineEdit() { { - ::std::auto_ptr< ImpVclMEdit > pDelete( pImpVclMEdit ); + boost::scoped_ptr< ImpVclMEdit > pDelete( pImpVclMEdit ); pImpVclMEdit = NULL; } delete pUpdateDataTimer; diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 53c8e33b4129..dab81a0c6791 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include - #include #include #include @@ -112,6 +110,7 @@ #include "xexptran.hxx" #include "XMLBase64Export.hxx" #include "XMLImageMapExport.hxx" +#include using namespace ::com::sun::star; using namespace ::xmloff::EnhancedCustomShapeToken; @@ -562,7 +561,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape sal_Int32 nZIndex = 0; uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY ); - ::std::auto_ptr< SvXMLElementExport > mpHyperlinkElement; + boost::scoped_ptr< SvXMLElementExport > mpHyperlinkElement; // export hyperlinks with . Currently only in draw since draw // does not support document events -- cgit