summaryrefslogtreecommitdiff
path: root/sc/source/filter/xcl97/XclExpChangeTrack.cxx
diff options
context:
space:
mode:
authorDerrick Rocha <drocha616@gmail.com>2015-09-12 16:49:29 -0600
committerNoel Grandin <noelgrandin@gmail.com>2015-09-13 06:25:18 +0000
commit927447356fb7025d2b61073f525adc24643c7925 (patch)
treecd1f3b5471a91e1f56463fd2fe7f02f2ee8d4123 /sc/source/filter/xcl97/XclExpChangeTrack.cxx
parentd8707b06e4b5a1dc6934ba4c15774d370eed6535 (diff)
replace boost::ptr_container with std::container<std::unique_ptr>
Change-Id: I8fd1121577c6443f9100b181402083d1b7c30b6b Reviewed-on: https://gerrit.libreoffice.org/18525 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source/filter/xcl97/XclExpChangeTrack.cxx')
-rw-r--r--sc/source/filter/xcl97/XclExpChangeTrack.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index acd7fa2cb33f..6a7e67b71e0f 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -1425,7 +1425,7 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
return;
pTabIdBuffer = new XclExpChTrTabIdBuffer( GetTabInfo().GetXclTabCount() );
- maBuffers.push_back( pTabIdBuffer );
+ maBuffers.push_back( std::unique_ptr<XclExpChTrTabIdBuffer>(pTabIdBuffer) );
// calculate final table order (tab id list)
const ScChangeAction* pScAction;
@@ -1453,9 +1453,9 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
if (GetOutput() == EXC_OUTPUT_BINARY)
{
pHeader = new XclExpChTrHeader;
- maRecList.push_back( pHeader );
- maRecList.push_back( new XclExpChTr0x0195 );
- maRecList.push_back( new XclExpChTr0x0194( *pTempChangeTrack ) );
+ maRecList.push_back( std::unique_ptr<ExcRecord>(pHeader) );
+ maRecList.push_back( std::unique_ptr<ExcRecord>( new XclExpChTr0x0195 ) );
+ maRecList.push_back( std::unique_ptr<ExcRecord>( new XclExpChTr0x0194( *pTempChangeTrack ) ) );
OUString sLastUsername;
DateTime aLastDateTime( DateTime::EMPTY );
@@ -1475,22 +1475,22 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
aLastDateTime = pAction->GetDateTime();
nLogNumber++;
- maRecList.push_back( new XclExpChTrInfo(sLastUsername, aLastDateTime, aGUID) );
- maRecList.push_back( new XclExpChTrTabId(pAction->GetTabIdBuffer()) );
+ maRecList.push_back( std::unique_ptr<ExcRecord>(new XclExpChTrInfo(sLastUsername, aLastDateTime, aGUID)) );
+ maRecList.push_back( std::unique_ptr<ExcRecord>(new XclExpChTrTabId(pAction->GetTabIdBuffer())) );
pHeader->SetGUID( aGUID );
}
pAction->SetIndex( nIndex );
- maRecList.push_back( pAction );
+ maRecList.push_back( std::unique_ptr<ExcRecord>(pAction) );
}
pHeader->SetGUID( aGUID );
pHeader->SetCount( nIndex - 1 );
- maRecList.push_back( new ExcEof );
+ maRecList.push_back( std::unique_ptr<ExcRecord>(new ExcEof) );
}
else
{
XclExpXmlChTrHeaders* pHeaders = new XclExpXmlChTrHeaders;
- maRecList.push_back(pHeaders);
+ maRecList.push_back( std::unique_ptr<ExcRecord>(pHeaders));
OUString sLastUsername;
DateTime aLastDateTime(DateTime::EMPTY);
@@ -1512,7 +1512,7 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
aLastDateTime = pAction->GetDateTime();
pCurHeader = new XclExpXmlChTrHeader(sLastUsername, aLastDateTime, aGUID, nLogNumber, pAction->GetTabIdBuffer());
- maRecList.push_back(pCurHeader);
+ maRecList.push_back( std::unique_ptr<ExcRecord>(pCurHeader));
nLogNumber++;
pHeaders->SetGUID(aGUID);
}
@@ -1521,7 +1521,7 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) :
}
pHeaders->SetGUID(aGUID);
- maRecList.push_back(new EndXmlElement(XML_headers));
+ maRecList.push_back( std::unique_ptr<ExcRecord>(new EndXmlElement(XML_headers)));
}
}
@@ -1584,7 +1584,7 @@ void XclExpChangeTrack::PushActionRecord( const ScChangeAction& rAction )
pXclAction = new XclExpChTrInsertTab( rAction, GetRoot(), *pTabIdBuffer );
XclExpChTrTabIdBuffer* pNewBuffer = new XclExpChTrTabIdBuffer( *pTabIdBuffer );
pNewBuffer->Remove();
- maBuffers.push_back( pNewBuffer );
+ maBuffers.push_back( std::unique_ptr<XclExpChTrTabIdBuffer>(pNewBuffer) );
pTabIdBuffer = pNewBuffer;
}
break;
@@ -1630,8 +1630,8 @@ void XclExpChangeTrack::Write()
XclExpStream aXclStrm( *xSvStrm, GetRoot(), EXC_MAXRECSIZE_BIFF8 + 8 );
RecListType::iterator pIter;
- for (pIter = maRecList.begin(); pIter != maRecList.end(); ++pIter)
- pIter->Save(aXclStrm);
+ for(pIter = maRecList.begin(); pIter != maRecList.end(); ++pIter)
+ (*pIter)->Save(aXclStrm);
xSvStrm->Commit();
}
@@ -1677,7 +1677,7 @@ void XclExpChangeTrack::WriteXml( XclExpXmlStream& rWorkbookStrm )
RecListType::iterator pIter;
for (pIter = maRecList.begin(); pIter != maRecList.end(); ++pIter)
- pIter->SaveXml(rWorkbookStrm);
+ (*pIter)->SaveXml(rWorkbookStrm);
rWorkbookStrm.PopStream();
}