[Libreoffice-commits] .: sc/source

Joseph Powers jpowers at kemper.freedesktop.org
Thu Jun 16 05:38:33 PDT 2011


 sc/source/filter/excel/xiescher.cxx |   21 ++++++---------------
 sc/source/filter/inc/xiescher.hxx   |    4 ----
 2 files changed, 6 insertions(+), 19 deletions(-)

New commits:
commit fa3b0d54eaeec5d47729db49cb3b50e74b1522c4
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Thu Jun 16 05:21:56 2011 -0700

    Replace List with std::vector< SvxMSDffConnectorRule* >

diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 759daea..408321b 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 be6a48f..71c0b3c 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 );
 


More information about the Libreoffice-commits mailing list