Kaydet (Commit) 618fe336 authored tarafından Michael Stahl's avatar Michael Stahl

sw: replace boost::ptr_vector with std::vector

Change-Id: Ic31f92dba347017c4e25f210728d63a4048c5a25
üst 8bee34a7
...@@ -74,7 +74,6 @@ ...@@ -74,7 +74,6 @@
#include <editeng/formatbreakitem.hxx> #include <editeng/formatbreakitem.hxx>
#include <com/sun/star/i18n/Boundary.hpp> #include <com/sun/star/i18n/Boundary.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::i18n;
...@@ -620,9 +619,9 @@ namespace ...@@ -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(); SwDoc* pDoc = aPam.GetNode().GetDoc();
...@@ -680,8 +679,7 @@ namespace ...@@ -680,8 +679,7 @@ namespace
} }
// save the current redline // save the current redline
_SaveRedline* pSave = new _SaveRedline( pCurrent, *pStart ); rArr.push_back(_SaveRedline( pCurrent, *pStart ));
rArr.push_back( pSave );
} }
} }
...@@ -689,7 +687,7 @@ namespace ...@@ -689,7 +687,7 @@ namespace
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); 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(); RedlineMode_t eOld = pDoc->getIDocumentRedlineAccess().GetRedlineMode();
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( (RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON )); pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( (RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON ));
...@@ -703,7 +701,7 @@ namespace ...@@ -703,7 +701,7 @@ namespace
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); 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(); SwDoc* pDoc = rRg.aStart.GetNode().GetDoc();
sal_uInt16 nRedlPos; sal_uInt16 nRedlPos;
...@@ -737,8 +735,7 @@ namespace ...@@ -737,8 +735,7 @@ namespace
pTmpPos->nContent.Assign( pTmpPos->nContent.Assign(
pTmpPos->nNode.GetNode().GetContentNode(), 0 ); pTmpPos->nNode.GetNode().GetContentNode(), 0 );
_SaveRedline* pSave = new _SaveRedline( pNewRedl, rRg.aStart ); rArr.push_back(_SaveRedline(pNewRedl, rRg.aStart));
rArr.push_back( pSave );
pTmpPos = pTmp->End(); pTmpPos = pTmp->End();
pTmpPos->nNode = rRg.aEnd; pTmpPos->nNode = rRg.aEnd;
...@@ -760,8 +757,7 @@ namespace ...@@ -760,8 +757,7 @@ namespace
( pREnd->nNode == rRg.aEnd && !pREnd->nContent.GetIndex()) ) ( pREnd->nNode == rRg.aEnd && !pREnd->nContent.GetIndex()) )
{ {
// move everything // move everything
_SaveRedline* pSave = new _SaveRedline( pTmp, rRg.aStart ); rArr.push_back(_SaveRedline( pTmp, rRg.aStart ));
rArr.push_back( pSave );
} }
else else
{ {
...@@ -772,8 +768,7 @@ namespace ...@@ -772,8 +768,7 @@ namespace
pTmpPos->nContent.Assign( pTmpPos->nContent.Assign(
pTmpPos->nNode.GetNode().GetContentNode(), 0 ); pTmpPos->nNode.GetNode().GetContentNode(), 0 );
_SaveRedline* pSave = new _SaveRedline( pNewRedl, rRg.aStart ); rArr.push_back(_SaveRedline( pNewRedl, rRg.aStart ));
rArr.push_back( pSave );
pTmpPos = pTmp->Start(); pTmpPos = pTmp->Start();
pTmpPos->nNode = rRg.aEnd; pTmpPos->nNode = rRg.aEnd;
...@@ -789,7 +784,7 @@ namespace ...@@ -789,7 +784,7 @@ namespace
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); 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(); RedlineMode_t eOld = pDoc->getIDocumentRedlineAccess().GetRedlineMode();
pDoc->getIDocumentRedlineAccess().SetRedlineMode_intern( (RedlineMode_t)(( eOld & ~nsRedlineMode_t::REDLINE_IGNORE) | nsRedlineMode_t::REDLINE_ON )); 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, ...@@ -1904,7 +1899,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos,
_SaveFlyInRange( rPaM, rPos.nNode, aSaveFlyArr, bool( SwMoveFlags::ALLFLYS & eMvFlags ) ); _SaveFlyInRange( rPaM, rPos.nNode, aSaveFlyArr, bool( SwMoveFlags::ALLFLYS & eMvFlags ) );
// save redlines (if DOC_MOVEREDLINES is used) // save redlines (if DOC_MOVEREDLINES is used)
_SaveRedlines aSaveRedl; SaveRedlines_t aSaveRedl;
if( SwMoveFlags::REDLINES & eMvFlags && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() ) if( SwMoveFlags::REDLINES & eMvFlags && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() )
{ {
lcl_SaveRedlines( rPaM, aSaveRedl ); lcl_SaveRedlines( rPaM, aSaveRedl );
...@@ -2179,7 +2174,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod ...@@ -2179,7 +2174,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod
m_rDoc.GetFootnoteIdxs(), aTmpFntIdx ); m_rDoc.GetFootnoteIdxs(), aTmpFntIdx );
} }
_SaveRedlines aSaveRedl; SaveRedlines_t aSaveRedl;
std::vector<SwRangeRedline*> aSavRedlInsPosArr; std::vector<SwRangeRedline*> aSavRedlInsPosArr;
if( SwMoveFlags::REDLINES & eMvFlags && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() ) if( SwMoveFlags::REDLINES & eMvFlags && !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty() )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment