diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-22 13:40:02 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-25 20:13:18 +0200 |
commit | db5ae90477c0ea851b5c85d8eeefe474cd5d70af (patch) | |
tree | 4527619e99b03f24a4c4ddc6b606dd3b57dc172f /sw | |
parent | a68012caed65549661ccddebd9dbba4cbf6691ef (diff) |
Convert SwNode2LayImpl::pUpperFrms field from Svptrarr to std::vector
Change-Id: I8f1e1c8a0dc92bf0451198d72a264e2d00ae0b0d
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/docnode/node2lay.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx index 08f475e10b02..0f6794e99d3c 100644 --- a/sw/source/core/docnode/node2lay.cxx +++ b/sw/source/core/docnode/node2lay.cxx @@ -49,7 +49,7 @@ class SwNode2LayImpl { SwIterator<SwFrm,SwModify>* pIter; SwModify* pMod; - SvPtrarr *pUpperFrms;// Zum Einsammeln der Upper + std::vector<SwFrm*>* pUpperFrms;// Zum Einsammeln der Upper sal_uLong nIndex; // Der Index des einzufuegenden Nodes sal_Bool bMaster : 1; // sal_True => nur Master , sal_False => nur Frames ohne Follow sal_Bool bInit : 1; // Ist am SwClient bereits ein First()-Aufruf erfolgt? @@ -261,7 +261,7 @@ SwFrm* SwNode2LayImpl::NextFrm() void SwNode2LayImpl::SaveUpperFrms() { - pUpperFrms = new SvPtrarr( 0 ); + pUpperFrms = new std::vector<SwFrm*>; SwFrm* pFrm; while( 0 != (pFrm = NextFrm()) ) { @@ -275,8 +275,8 @@ void SwNode2LayImpl::SaveUpperFrms() pFrm->FindSctFrm()->ColLock(); if( pPrv && pPrv->IsSctFrm() ) ((SwSectionFrm*)pPrv)->LockJoin(); - pUpperFrms->Insert( (void*)pPrv, pUpperFrms->Count() ); - pUpperFrms->Insert( (void*)pFrm, pUpperFrms->Count() ); + pUpperFrms->push_back( pPrv ); + pUpperFrms->push_back( pFrm ); } } delete pIter; @@ -356,9 +356,9 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong SwFrm* pNxt; SwLayoutFrm* pUp; if( (pNd = rNds[nStt])->IsCntntNode() ) - for( sal_uInt16 n = 0; n < pUpperFrms->Count(); ) + for( sal_uInt16 n = 0; n < pUpperFrms->size(); ) { - pNxt = (SwFrm*)(*pUpperFrms)[n++]; + pNxt = (*pUpperFrms)[n++]; if( bFirst && pNxt && pNxt->IsSctFrm() ) ((SwSectionFrm*)pNxt)->UnlockJoin(); pUp = (SwLayoutFrm*)(*pUpperFrms)[n++]; @@ -371,9 +371,9 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong (*pUpperFrms)[n-2] = pNew; } else if( pNd->IsTableNode() ) - for( sal_uInt16 x = 0; x < pUpperFrms->Count(); ) + for( sal_uInt16 x = 0; x < pUpperFrms->size(); ) { - pNxt = (SwFrm*)(*pUpperFrms)[x++]; + pNxt = (*pUpperFrms)[x++]; if( bFirst && pNxt && pNxt->IsSctFrm() ) ((SwSectionFrm*)pNxt)->UnlockJoin(); pUp = (SwLayoutFrm*)(*pUpperFrms)[x++]; @@ -390,9 +390,9 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong else if( pNd->IsSectionNode() ) { nStt = pNd->EndOfSectionIndex(); - for( sal_uInt16 x = 0; x < pUpperFrms->Count(); ) + for( sal_uInt16 x = 0; x < pUpperFrms->size(); ) { - pNxt = (SwFrm*)(*pUpperFrms)[x++]; + pNxt = (*pUpperFrms)[x++]; if( bFirst && pNxt && pNxt->IsSctFrm() ) ((SwSectionFrm*)pNxt)->UnlockJoin(); pUp = (SwLayoutFrm*)(*pUpperFrms)[x++]; @@ -404,9 +404,9 @@ void SwNode2LayImpl::RestoreUpperFrms( SwNodes& rNds, sal_uLong nStt, sal_uLong } bFirst = sal_False; } - for( sal_uInt16 x = 0; x < pUpperFrms->Count(); ++x ) + for( sal_uInt16 x = 0; x < pUpperFrms->size(); ++x ) { - SwFrm* pTmp = (SwFrm*)(*pUpperFrms)[++x]; + SwFrm* pTmp = (*pUpperFrms)[++x]; if( pTmp->IsFtnFrm() ) ((SwFtnFrm*)pTmp)->ColUnlock(); else if ( pTmp->IsInSct() ) |