diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-02-26 17:20:31 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2014-02-26 17:21:20 +0900 |
commit | d5c59404bec65c8a9d9e05c1fcc24e068d170924 (patch) | |
tree | f19f1aca9c529e78509b2ad777ae52dcabc52c71 /sw | |
parent | d60301d03b098e1d45b8de6b169e9fb54600c3f1 (diff) |
Replace deprecated std::auto_ptr with boost::scoped_ptr
Change-Id: I773524536c0ed7bc34eb08cd35cfc77e83f722ba
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/undo/rolbck.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/unocore/unoparagraph.cxx | 4 |
3 files changed, 8 insertions, 6 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 <svl/smplhint.hxx> #include <algorithm> #include <map> +#include <boost/scoped_ptr.hpp> #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<const SwFmtAutoFmt&>(rAttr).GetStyleHandle(); - ::std::auto_ptr<const SfxItemSet> pNewSet( + boost::scoped_ptr<const SfxItemSet> 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<sal_uInt16>(RES_TXTATR_WITHEND_END) - static_cast<sal_uInt16>(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 <comcore.hrc> #include <undo.hrc> #include <bookmrk.hxx> +#include <boost/scoped_ptr.hpp> 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<SwPaM> pPam; + boost::scoped_ptr<SwPaM> 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 <com/sun/star/text/WrapTextMode.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp> #include <comphelper/servicehelper.hxx> - +#include <boost/scoped_ptr.hpp> 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<SwUnoCrsr> pTemp( + boost::scoped_ptr<SwUnoCrsr> pTemp( aCursor.GetDoc()->CreateUnoCrsr(aStart, false) ); if(!SwUnoCursorHelper::IsStartOfPara(*pTemp)) { |