summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-10-21 17:05:44 +0200
committerMichael Stahl <mstahl@redhat.com>2015-10-21 17:55:28 +0200
commit618fe3366591902f88217c7f90d17e84ec527bf3 (patch)
tree79beeb31a4d3870aeee144eb128af169ea47e027 /sw
parent8bee34a7db41df4147a60a2fa32de143cd5e6b84 (diff)
sw: replace boost::ptr_vector with std::vector
Change-Id: Ic31f92dba347017c4e25f210728d63a4048c5a25
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx27
1 files changed, 11 insertions, 16 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index b7bdda2881c2..8eba107a2421 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -74,7 +74,6 @@
#include <editeng/formatbreakitem.hxx>
#include <com/sun/star/i18n/Boundary.hpp>
-#include <boost/ptr_container/ptr_vector.hpp>
using namespace ::com::sun::star::i18n;
@@ -620,9 +619,9 @@ namespace
}
};
- typedef boost::ptr_vector< _SaveRedline > _SaveRedlines;
+ typedef std::vector< _SaveRedline > SaveRedlines_t;
- static void lcl_SaveRedlines( const SwPaM& aPam, _SaveRedlines& rArr )
+ static void lcl_SaveRedlines(const SwPaM& aPam, SaveRedlines_t& rArr)
{
SwDoc* pDoc = aPam.GetNode().GetDoc();
@@ -680,8 +679,7 @@ namespace
}
// save the current redline
- _SaveRedline* pSave = new _SaveRedline( pCurrent, *pStart );
- rArr.push_back( pSave );
+ rArr.push_back(_SaveRedline( pCurrent, *pStart ));
}
}
@@ -689,7 +687,7 @@ namespace
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
}
- static void lcl_RestoreRedlines( SwDoc* pDoc, const SwPosition& rPos, _SaveRedlines& rArr )
+ static void lcl_RestoreRedlines(SwDoc* pDoc, const SwPosition& rPos, SaveRedlines_t& rArr)
{
RedlineMode_t eOld = pDoc->getIDocumentRedlineAccess().GetRedlineMode();
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( (RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON ));
@@ -703,7 +701,7 @@ namespace
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
}
- static void lcl_SaveRedlines( const SwNodeRange& rRg, _SaveRedlines& rArr )
+ static void lcl_SaveRedlines(const SwNodeRange& rRg, SaveRedlines_t& rArr)
{
SwDoc* pDoc = rRg.aStart.GetNode().GetDoc();
sal_uInt16 nRedlPos;
@@ -737,8 +735,7 @@ namespace
pTmpPos->nContent.Assign(
pTmpPos->nNode.GetNode().GetContentNode(), 0 );
- _SaveRedline* pSave = new _SaveRedline( pNewRedl, rRg.aStart );
- rArr.push_back( pSave );
+ rArr.push_back(_SaveRedline(pNewRedl, rRg.aStart));
pTmpPos = pTmp->End();
pTmpPos->nNode = rRg.aEnd;
@@ -760,8 +757,7 @@ namespace
( pREnd->nNode == rRg.aEnd && !pREnd->nContent.GetIndex()) )
{
// move everything
- _SaveRedline* pSave = new _SaveRedline( pTmp, rRg.aStart );
- rArr.push_back( pSave );
+ rArr.push_back(_SaveRedline( pTmp, rRg.aStart ));
}
else
{
@@ -772,8 +768,7 @@ namespace
pTmpPos->nContent.Assign(
pTmpPos->nNode.GetNode().GetContentNode(), 0 );
- _SaveRedline* pSave = new _SaveRedline( pNewRedl, rRg.aStart );
- rArr.push_back( pSave );
+ rArr.push_back(_SaveRedline( pNewRedl, rRg.aStart ));
pTmpPos = pTmp->Start();
pTmpPos->nNode = rRg.aEnd;
@@ -789,7 +784,7 @@ namespace
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld );
}
- static void lcl_RestoreRedlines( SwDoc* pDoc, sal_uInt32 nInsPos, _SaveRedlines& rArr )
+ static void lcl_RestoreRedlines(SwDoc *const pDoc, sal_uInt32 const nInsPos, SaveRedlines_t& rArr)
{
RedlineMode_t eOld = pDoc->getIDocumentRedlineAccess().GetRedlineMode();
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( (RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON ));
@@ -1904,7 +1899,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos,
_SaveFlyInRange( rPaM, rPos.nNode, aSaveFlyArr, bool( SwMoveFlags::ALLFLYS & eMvFlags ) );
// save redlines (if DOC_MOVEREDLINES is used)
- _SaveRedlines aSaveRedl;
+ SaveRedlines_t aSaveRedl;
if( SwMoveFlags::REDLINES & eMvFlags && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() )
{
lcl_SaveRedlines( rPaM, aSaveRedl );
@@ -2179,7 +2174,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod
m_rDoc.GetFootnoteIdxs(), aTmpFntIdx );
}
- _SaveRedlines aSaveRedl;
+ SaveRedlines_t aSaveRedl;
std::vector<SwRangeRedline*> aSavRedlInsPosArr;
if( SwMoveFlags::REDLINES & eMvFlags && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() )
{