diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-12 10:07:22 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-12 10:45:04 +0200 |
commit | 49b2208ffab0631a8aa150c26086f722aa8d978d (patch) | |
tree | 871bbdb0bf3f170f89d888660897765fa93a90dc /sc | |
parent | 3a03dd6c66b50d37df498e7820efbb7f345965b0 (diff) |
sc: boost::ptr_vector->std::vector<std::unique_ptr>
Change-Id: I6f1ab588b4523fa5d2fdbe41b136fa8365499351
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xistyle.cxx | 16 | ||||
-rw-r--r-- | sc/source/filter/inc/xistyle.hxx | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 68e49eb00f18..21894beb18eb 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -1576,7 +1576,7 @@ void XclImpXFBuffer::ReadStyle( XclImpStream& rStrm ) { XclImpStyle* pStyle = new XclImpStyle( GetRoot() ); pStyle->ReadStyle( rStrm ); - (pStyle->IsBuiltin() ? maBuiltinStyles : maUserStyles).push_back( pStyle ); + (pStyle->IsBuiltin() ? maBuiltinStyles : maUserStyles).push_back( std::unique_ptr<XclImpStyle>(pStyle) ); OSL_ENSURE( maStylesByXf.count( pStyle->GetXfId() ) == 0, "XclImpXFBuffer::ReadStyle - multiple styles with equal XF identifier" ); maStylesByXf[ pStyle->GetXfId() ] = pStyle; } @@ -1632,13 +1632,13 @@ void XclImpXFBuffer::CreateUserStyles() in the aConflictNameStyles list. */ for( XclImpStyleList::iterator itStyle = maBuiltinStyles.begin(); itStyle != maBuiltinStyles.end(); ++itStyle ) { - OUString aStyleName = XclTools::GetBuiltInStyleName( itStyle->GetBuiltinId(), itStyle->GetName(), itStyle->GetLevel() ); + OUString aStyleName = XclTools::GetBuiltInStyleName( (*itStyle)->GetBuiltinId(), (*itStyle)->GetName(), (*itStyle)->GetLevel() ); OSL_ENSURE( bReserveAll || (aCellStyles.count( aStyleName ) == 0), "XclImpXFBuffer::CreateUserStyles - multiple styles with equal built-in identifier" ); if( aCellStyles.count( aStyleName ) > 0 ) - aConflictNameStyles.push_back( &(*itStyle) ); + aConflictNameStyles.push_back( itStyle->get() ); else - aCellStyles[ aStyleName ] = &(*itStyle); + aCellStyles[ aStyleName ] = itStyle->get(); } /* Calculate names of user defined styles. Store styles with reserved @@ -1646,12 +1646,12 @@ void XclImpXFBuffer::CreateUserStyles() for( XclImpStyleList::iterator itStyle = maUserStyles.begin(); itStyle != maUserStyles.end(); ++itStyle ) { // #i1624# #i1768# ignore unnamed user styles - if( !itStyle->GetName().isEmpty() ) + if( !(*itStyle)->GetName().isEmpty() ) { - if( aCellStyles.count( itStyle->GetName() ) > 0 ) - aConflictNameStyles.push_back( &(*itStyle) ); + if( aCellStyles.count( (*itStyle)->GetName() ) > 0 ) + aConflictNameStyles.push_back( itStyle->get() ); else - aCellStyles[ itStyle->GetName() ] = &(*itStyle); + aCellStyles[ (*itStyle)->GetName() ] = itStyle->get(); } } diff --git a/sc/source/filter/inc/xistyle.hxx b/sc/source/filter/inc/xistyle.hxx index f302beaaf50a..01e614ddda68 100644 --- a/sc/source/filter/inc/xistyle.hxx +++ b/sc/source/filter/inc/xistyle.hxx @@ -506,7 +506,7 @@ public: ScStyleSheet* CreateStyleSheet( sal_uInt16 nXFIndex ); private: - typedef boost::ptr_vector< XclImpStyle > XclImpStyleList; + typedef std::vector< std::unique_ptr<XclImpStyle> > XclImpStyleList; typedef ::std::map< sal_uInt16, XclImpStyle* > XclImpStyleMap; boost::ptr_vector< XclImpXF > maXFList; /// List of contents of all XF record. |