Kaydet (Commit) 8d7a4841 authored tarafından Joseph Powers's avatar Joseph Powers

Replace List with std::vector< SvxMSDffConnectorRule* >

üst b6cca4dd
......@@ -3076,8 +3076,9 @@ void XclImpSolverContainer::RemoveSdrObjectInfo( SdrObject& rSdrObj )
void XclImpSolverContainer::UpdateConnectorRules()
{
for( SvxMSDffConnectorRule* pRule = GetFirstRule(); pRule; pRule = GetNextRule() )
for ( size_t i = 0, n = aCList.size(); i < n; ++i )
{
SvxMSDffConnectorRule* pRule = aCList[ i ];
UpdateConnection( pRule->nShapeA, pRule->pAObj, &pRule->nSpFlagsA );
UpdateConnection( pRule->nShapeB, pRule->pBObj, &pRule->nSpFlagsB );
UpdateConnection( pRule->nShapeC, pRule->pCObj );
......@@ -3087,24 +3088,14 @@ void XclImpSolverContainer::UpdateConnectorRules()
void XclImpSolverContainer::RemoveConnectorRules()
{
// base class from SVX uses plain untyped tools/List
for( SvxMSDffConnectorRule* pRule = GetFirstRule(); pRule; pRule = GetNextRule() )
delete pRule;
aCList.Clear();
for ( size_t i = 0, n = aCList.size(); i < n; ++i ) {
delete aCList[ i ];
}
aCList.clear();
maSdrInfoMap.clear();
maSdrObjMap.clear();
}
SvxMSDffConnectorRule* XclImpSolverContainer::GetFirstRule()
{
return static_cast< SvxMSDffConnectorRule* >( aCList.First() );
}
SvxMSDffConnectorRule* XclImpSolverContainer::GetNextRule()
{
return static_cast< SvxMSDffConnectorRule* >( aCList.Next() );
}
void XclImpSolverContainer::UpdateConnection( sal_uInt32 nDffShapeId, SdrObject*& rpSdrObj, sal_uInt32* pnDffFlags )
{
XclImpSdrInfoMap::const_iterator aIt = maSdrInfoMap.find( nDffShapeId );
......
......@@ -940,10 +940,6 @@ public:
void RemoveConnectorRules();
private:
/** Returns the first connector rule from the internal list. */
SvxMSDffConnectorRule* GetFirstRule();
/** Returns the next connector rule from the internal list. */
SvxMSDffConnectorRule* GetNextRule();
/** Updates the data of a connected shape in a connector rule. */
void UpdateConnection( sal_uInt32 nDffShapeId, SdrObject*& rpSdrObj, sal_uInt32* pnDffFlags = 0 );
......
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