Kaydet (Commit) 81321de6 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Stahl

Convert SvPtrarr aBoxArr to std::deque<SwTableBox*>

Change-Id: I97634289e94f34e18d00d88d81d99dae1e593ec1
üst e22cc759
...@@ -693,19 +693,12 @@ struct Parm ...@@ -693,19 +693,12 @@ struct Parm
const SwTabCols &rOld; const SwTabCols &rOld;
long nNewWish, long nNewWish,
nOldWish; nOldWish;
SvPtrarr aBoxArr; std::deque<SwTableBox*> aBoxArr;
SwShareBoxFmts aShareFmts; SwShareBoxFmts aShareFmts;
Parm( const SwTabCols &rN, const SwTabCols &rO ) : Parm( const SwTabCols &rN, const SwTabCols &rO ) :
rNew( rN ), rOld( rO ), nNewWish(0), nOldWish(0), aBoxArr( 10 ){} rNew( rN ), rOld( rO ), nNewWish(0), nOldWish(0), aBoxArr( 10 ){}
}; };
inline sal_Bool BoxInArr( SvPtrarr& rArr, SwTableBox* pBox )
{
sal_Bool bRet = USHRT_MAX != rArr.GetPos( (VoidPtr)pBox );
if( !bRet )
rArr.Insert( (VoidPtr)pBox, rArr.Count() );
return bRet;
}
void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ); void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm );
...@@ -862,7 +855,7 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm ) ...@@ -862,7 +855,7 @@ void lcl_ProcessBoxSet( SwTableBox *pBox, Parm &rParm )
} }
} }
void lcl_ProcessBoxPtr( SwTableBox *pBox, SvPtrarr &rBoxArr, void lcl_ProcessBoxPtr( SwTableBox *pBox, std::deque<SwTableBox*> &rBoxArr,
sal_Bool bBefore ) sal_Bool bBefore )
{ {
if ( !pBox->GetTabLines().empty() ) if ( !pBox->GetTabLines().empty() )
...@@ -876,9 +869,9 @@ void lcl_ProcessBoxPtr( SwTableBox *pBox, SvPtrarr &rBoxArr, ...@@ -876,9 +869,9 @@ void lcl_ProcessBoxPtr( SwTableBox *pBox, SvPtrarr &rBoxArr,
} }
} }
else if ( bBefore ) else if ( bBefore )
rBoxArr.Insert( (VoidPtr)pBox, 0 ); rBoxArr.push_front( pBox );
else else
rBoxArr.Insert( (VoidPtr)pBox, rBoxArr.Count() ); rBoxArr.push_back( pBox );
} }
void lcl_AdjustBox( SwTableBox *pBox, const long nDiff, Parm &rParm ); void lcl_AdjustBox( SwTableBox *pBox, const long nDiff, Parm &rParm );
...@@ -1035,9 +1028,9 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld, ...@@ -1035,9 +1028,9 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
//Nachdem wir haufenweise Boxen (hoffentlich alle und in der richtigen //Nachdem wir haufenweise Boxen (hoffentlich alle und in der richtigen
//Reihenfolge) eingetragen haben, brauchen diese nur noch rueckwaerts //Reihenfolge) eingetragen haben, brauchen diese nur noch rueckwaerts
//verarbeitet zu werden. //verarbeitet zu werden.
for ( int j = aParm.aBoxArr.Count()-1; j >= 0; --j ) for ( int j = aParm.aBoxArr.size()-1; j >= 0; --j )
{ {
SwTableBox *pBox = (SwTableBox*)aParm.aBoxArr[ static_cast< sal_uInt16 >(j)]; SwTableBox *pBox = aParm.aBoxArr[j];
::lcl_ProcessBoxSet( pBox, aParm ); ::lcl_ProcessBoxSet( pBox, aParm );
} }
} }
......
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