diff options
author | Noel Grandin <noel@peralex.com> | 2012-04-14 23:32:56 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-04-18 15:30:03 +0200 |
commit | 850bfeeda8ceae207417c2a1733c2304056fdcb2 (patch) | |
tree | 1ec18fb76b763a4c4befa66ecafffade0fe1a151 /xmloff/source/style/xmlnumi.cxx | |
parent | 96a36b917a1f69e672bcb273df0513dba8d8a379 (diff) |
Convert SV_DECL_PTRARR to std::vector
Diffstat (limited to 'xmloff/source/style/xmlnumi.cxx')
-rw-r--r-- | xmloff/source/style/xmlnumi.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 7f13c1517302..eddf113f6eb0 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -1085,8 +1085,7 @@ SvxXMLListLevelStyleLabelAlignmentAttrContext_Impl::~SvxXMLListLevelStyleLabelAl // --------------------------------------------------------------------- -typedef SvxXMLListLevelStyleContext_Impl *SvxXMLListLevelStyleContext_ImplPtr; -SV_DECL_PTRARR( SvxXMLListStyle_Impl, SvxXMLListLevelStyleContext_ImplPtr, 10 ) +class SvxXMLListStyle_Impl : public std::vector<SvxXMLListLevelStyleContext_Impl *> {}; void SvxXMLListStyleContext::SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName, @@ -1125,11 +1124,10 @@ SvxXMLListStyleContext::~SvxXMLListStyleContext() { if( pLevelStyles ) { - while( pLevelStyles->Count() ) + while( !pLevelStyles->empty() ) { - sal_uInt16 n = pLevelStyles->Count() - 1; - SvxXMLListLevelStyleContext_Impl *pStyle = (*pLevelStyles)[n]; - pLevelStyles->Remove( n, 1 ); + SvxXMLListLevelStyleContext_Impl *pStyle = pLevelStyles->back(); + pLevelStyles->pop_back(); pStyle->ReleaseRef(); } } @@ -1158,7 +1156,7 @@ SvXMLImportContext *SvxXMLListStyleContext::CreateChildContext( rLocalName, xAttrList ); if( !pLevelStyles ) pLevelStyles = new SvxXMLListStyle_Impl; - pLevelStyles->Insert( pLevelStyle, pLevelStyles->Count() ); + pLevelStyles->push_back( pLevelStyle ); pLevelStyle->AddRef(); pContext = pLevelStyle; @@ -1179,7 +1177,7 @@ void SvxXMLListStyleContext::FillUnoNumRule( { if( pLevelStyles && rNumRule.is() ) { - sal_uInt16 nCount = pLevelStyles->Count(); + sal_uInt16 nCount = pLevelStyles->size(); sal_Int32 l_nLevels = rNumRule->getCount(); for( sal_uInt16 i=0; i < nCount; i++ ) { |