diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-12 10:59:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-12 12:29:25 +0200 |
commit | bd2455d310b35d6e231627c1a89301450be0c65d (patch) | |
tree | 811c47fd9a29b20f68729312a20488649ed93ed0 /sc | |
parent | 2dcec2f7a0a0ee7fb62e0e1aa876d1468d93a31c (diff) |
sc: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I4fa56a36b68db8c771a5d634be3655d1f9fdda70
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xicontent.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/inc/xicontent.hxx | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 5b63352c4738..8a78380e52bd 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -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(); } diff --git a/sc/source/filter/inc/xicontent.hxx b/sc/source/filter/inc/xicontent.hxx index 1a76f200503e..145b367945da 100644 --- a/sc/source/filter/inc/xicontent.hxx +++ b/sc/source/filter/inc/xicontent.hxx @@ -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. }; |