summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-06-16 05:21:56 -0700
committerJoseph Powers <jpowers27@cox.net>2011-06-16 05:26:24 -0700
commit8d7a4841bc1615a637562fe6c0dbfdff1c345462 (patch)
tree58bdc0edfa74b0fffc6225d59b1ec47c6ae1857f /sc
parentb6cca4dd910fc9fb9892f0d6014ec1080defd40b (diff)
Replace List with std::vector< SvxMSDffConnectorRule* >
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xiescher.cxx21
-rw-r--r--sc/source/filter/inc/xiescher.hxx4
2 files changed, 6 insertions, 19 deletions
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index dd2bd616a900..6a15ee44f232 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -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 );
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index be6a48f317bc..71c0b3c66859 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -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 );