diff options
author | Noel Grandin <noel@peralex.com> | 2012-04-14 23:19:17 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-04-18 15:30:02 +0200 |
commit | 8c40de809ac06670b1af1359b4eb355843a77282 (patch) | |
tree | a0292d9a3f9e6f5de652b20690bbc7b8874515fb /xmloff | |
parent | 759c5373e04f797f656999995c60918c384f6ca0 (diff) |
Convert SV_DECL_PTRARR to std::vector
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/XMLTextColumnsContext.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx index dcd3ab523558..e5c0750a4fea 100644 --- a/xmloff/source/text/XMLTextColumnsContext.cxx +++ b/xmloff/source/text/XMLTextColumnsContext.cxx @@ -284,8 +284,7 @@ XMLTextColumnSepContext_Impl::~XMLTextColumnSepContext_Impl() // -------------------------------------------------------------------------- -typedef XMLTextColumnContext_Impl *XMLTextColumnContext_ImplPtr; -SV_DECL_PTRARR( XMLTextColumnsArray_Impl, XMLTextColumnContext_ImplPtr, 5 ) +class XMLTextColumnsArray_Impl : public std::vector<XMLTextColumnContext_Impl *> {}; TYPEINIT1( XMLTextColumnsContext, XMLElementPropertyContext ); @@ -343,12 +342,10 @@ XMLTextColumnsContext::~XMLTextColumnsContext() { if( pColumns ) { - sal_uInt16 nColCount = pColumns->Count(); - while( nColCount ) + while( !pColumns->empty() ) { - nColCount--; - XMLTextColumnContext_Impl *pColumn = (*pColumns)[nColCount]; - pColumns->Remove( nColCount, 1 ); + XMLTextColumnContext_Impl *pColumn = *pColumns->begin(); + pColumns->erase( pColumns->begin() ); pColumn->ReleaseRef(); } } @@ -378,7 +375,7 @@ SvXMLImportContext *XMLTextColumnsContext::CreateChildContext( if( !pColumns ) pColumns = new XMLTextColumnsArray_Impl; - pColumns->Insert( pColumn, pColumns->Count() ); + pColumns->push_back( pColumn ); pColumn->AddRef(); pContext = pColumn; @@ -419,7 +416,7 @@ void XMLTextColumnsContext::EndElement( ) xColumns->setColumnCount( 1 ); } else if( !bAutomatic && pColumns && - pColumns->Count() == (sal_uInt16)nCount ) + pColumns->size() == (sal_uInt16)nCount ) { // if we have column descriptions, one per column, and we don't use // automatic width, then set the column widths |