Kaydet (Commit) bd2455d3 authored tarafından Noel Grandin's avatar Noel Grandin

sc: boost::ptr_vector->std::vector<std::unique_ptr>

Change-Id: I4fa56a36b68db8c771a5d634be3655d1f9fdda70
üst 2dcec2f7
......@@ -707,20 +707,20 @@ void XclImpCondFormatManager::ReadCondfmt( XclImpStream& rStrm )
{
XclImpCondFormat* pFmt = new XclImpCondFormat( GetRoot(), maCondFmtList.size() );
pFmt->ReadCondfmt( rStrm );
maCondFmtList.push_back( pFmt );
maCondFmtList.push_back( std::unique_ptr<XclImpCondFormat>(pFmt) );
}
void XclImpCondFormatManager::ReadCF( XclImpStream& rStrm )
{
OSL_ENSURE( !maCondFmtList.empty(), "XclImpCondFormatManager::ReadCF - CF without leading CONDFMT" );
if( !maCondFmtList.empty() )
maCondFmtList.back().ReadCF( rStrm );
maCondFmtList.back()->ReadCF( rStrm );
}
void XclImpCondFormatManager::Apply()
{
for( XclImpCondFmtList::iterator itFmt = maCondFmtList.begin(); itFmt != maCondFmtList.end(); ++itFmt )
itFmt->Apply();
(*itFmt)->Apply();
maCondFmtList.clear();
}
......
......@@ -29,6 +29,8 @@
#include "tabprotection.hxx"
#include <map>
#include <vector>
#include <memory>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/noncopyable.hpp>
......@@ -157,7 +159,7 @@ public:
void Apply();
private:
typedef boost::ptr_vector< XclImpCondFormat > XclImpCondFmtList;
typedef std::vector< std::unique_ptr<XclImpCondFormat> > XclImpCondFmtList;
XclImpCondFmtList maCondFmtList; /// List with all conditional formatting.
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment