summaryrefslogtreecommitdiff
path: root/sc/source/filter/xcl97
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2011-06-09 20:12:35 -0430
committerKohei Yoshida <kyoshida@novell.com>2011-06-14 23:41:39 -0400
commit35f6989956bd8f6baaf3c630a1d78330266b3553 (patch)
tree8df39ec50e35660f7396dc1b09c377fb38f44295 /sc/source/filter/xcl97
parent54fd34f74cf9b87fe13116f53722f0bd3a08d2b8 (diff)
Replace XclExpChTrTabIdBufferList with std::vector<>.
Diffstat (limited to 'sc/source/filter/xcl97')
-rw-r--r--sc/source/filter/xcl97/XclExpChangeTrack.cxx17
1 files changed, 6 insertions, 11 deletions
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index e9e25efca5f0..ad48f3d23ba2 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -537,14 +537,6 @@ void XclExpChTrTabIdBuffer::Remove()
//___________________________________________________________________
-XclExpChTrTabIdBufferList::~XclExpChTrTabIdBufferList()
-{
- for( XclExpChTrTabIdBuffer* pBuffer = First(); pBuffer; pBuffer = Next() )
- delete pBuffer;
-}
-
-//___________________________________________________________________
-
XclExpChTrTabId::XclExpChTrTabId( const XclExpChTrTabIdBuffer& rBuffer, bool bInRevisionHeaders )
: nTabCount( rBuffer.GetBufferCount() )
, mbInRevisionHeaders( bInRevisionHeaders )
@@ -1466,7 +1458,6 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
XclExpRoot( rRoot ),
aRecList(),
aActionStack(),
- aTabIdBufferList(),
pTabIdBuffer( NULL ),
pTempDoc( NULL ),
nNewAction( 1 ),
@@ -1482,7 +1473,7 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
return;
pTabIdBuffer = new XclExpChTrTabIdBuffer( GetTabInfo().GetXclTabCount() );
- aTabIdBufferList.Append( pTabIdBuffer );
+ maBuffers.push_back( pTabIdBuffer );
// calculate final table order (tab id list)
const ScChangeAction* pScAction;
@@ -1557,6 +1548,10 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
XclExpChangeTrack::~XclExpChangeTrack()
{
+ std::vector<XclExpChTrTabIdBuffer*>::iterator pIter;
+ for ( pIter = maBuffers.begin(); pIter != maBuffers.end(); ++pIter )
+ delete *pIter;
+
if( pTempDoc )
delete pTempDoc;
}
@@ -1612,7 +1607,7 @@ void XclExpChangeTrack::PushActionRecord( const ScChangeAction& rAction )
pXclAction = new XclExpChTrInsertTab( rAction, GetRoot(), *pTabIdBuffer );
XclExpChTrTabIdBuffer* pNewBuffer = new XclExpChTrTabIdBuffer( *pTabIdBuffer );
pNewBuffer->Remove();
- aTabIdBufferList.Append( pNewBuffer );
+ maBuffers.push_back( pNewBuffer );
pTabIdBuffer = pNewBuffer;
}
break;