summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-06-16 07:55:11 -0700
committerJoseph Powers <jpowers27@cox.net>2011-06-16 07:55:11 -0700
commita07e97c48f23b90dfab4b2172627ad70bea3ac0a (patch)
treeabce0c89824ca11021e77016d91dfc689f167064 /filter
parentConvert List to std::vector< EscherShapeListEntry* > (diff)
downloadcore-a07e97c48f23b90dfab4b2172627ad70bea3ac0a.tar.gz
core-a07e97c48f23b90dfab4b2172627ad70bea3ac0a.zip
Replace List with std::vector< EscherConnectorListEntry* >
Diffstat (limited to 'filter')
-rw-r--r--filter/inc/filter/msfilter/escherex.hxx7
-rw-r--r--filter/source/msfilter/escherex.cxx17
2 files changed, 12 insertions, 12 deletions
diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx
index 32192eb64969..7473b93fed4d 100644
--- a/filter/inc/filter/msfilter/escherex.hxx
+++ b/filter/inc/filter/msfilter/escherex.hxx
@@ -1115,12 +1115,13 @@ public:
};
class EscherShapeListEntry;
-typedef ::std::vector< EscherShapeListEntry* > EscherShapeList_impl;
+typedef ::std::vector< EscherShapeListEntry* > EscherShapeList_impl;
+typedef ::std::vector< EscherConnectorListEntry* > EscherConnectorList_impl;
class MSFILTER_DLLPUBLIC EscherSolverContainer
{
- EscherShapeList_impl maShapeList;
- List maConnectorList;
+ EscherShapeList_impl maShapeList;
+ EscherConnectorList_impl maConnectorList;
public:
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 92b9a7b91142..eea9ff2e7dce 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -4140,13 +4140,12 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst )
EscherSolverContainer::~EscherSolverContainer()
{
- void* pP;
-
for( size_t i = 0, n = maShapeList.size(); i < n; ++i ) {
delete maShapeList[ i ];
}
- for( pP = maConnectorList.First(); pP; pP = maConnectorList.Next() )
- delete (EscherConnectorListEntry*)pP;
+ for( size_t i = 0, n = maConnectorList.size(); i < n; ++i ) {
+ delete maConnectorList[ i ];
+ }
}
void EscherSolverContainer::AddShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape, sal_uInt32 nId )
@@ -4162,7 +4161,7 @@ void EscherSolverContainer::AddConnector(
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rConB
)
{
- maConnectorList.Insert( new EscherConnectorListEntry( rConnector, rPA, rConA, rPB, rConB ), LIST_APPEND );
+ maConnectorList.push_back( new EscherConnectorListEntry( rConnector, rPA, rConA, rPB, rConB ) );
}
sal_uInt32 EscherSolverContainer::GetShapeId( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape ) const
@@ -4178,7 +4177,7 @@ sal_uInt32 EscherSolverContainer::GetShapeId( const ::com::sun::star::uno::Refer
void EscherSolverContainer::WriteSolver( SvStream& rStrm )
{
- sal_uInt32 nCount = maConnectorList.Count();
+ sal_uInt32 nCount = maConnectorList.size();
if ( nCount )
{
sal_uInt32 nRecHdPos, nCurrentPos, nSize;
@@ -4190,10 +4189,10 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm )
EscherConnectorRule aConnectorRule;
aConnectorRule.nRuleId = 2;
- for ( EscherConnectorListEntry* pPtr = (EscherConnectorListEntry*)maConnectorList.First();
- pPtr; pPtr = (EscherConnectorListEntry*)maConnectorList.Next() )
+ for ( size_t i = 0, n = maConnectorList.size(); i < n; ++i )
{
- aConnectorRule.ncptiA = aConnectorRule.ncptiB = 0xffffffff;
+ EscherConnectorListEntry* pPtr = maConnectorList[ i ];
+ aConnectorRule.ncptiA = aConnectorRule.ncptiB = 0xffffffff;
aConnectorRule.nShapeC = GetShapeId( pPtr->mXConnector );
aConnectorRule.nShapeA = GetShapeId( pPtr->mXConnectToA );
aConnectorRule.nShapeB = GetShapeId( pPtr->mXConnectToB );