Kaydet (Commit) 8c40de80 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Stahl

Convert SV_DECL_PTRARR to std::vector

üst 759c5373
...@@ -284,8 +284,7 @@ XMLTextColumnSepContext_Impl::~XMLTextColumnSepContext_Impl() ...@@ -284,8 +284,7 @@ XMLTextColumnSepContext_Impl::~XMLTextColumnSepContext_Impl()
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
typedef XMLTextColumnContext_Impl *XMLTextColumnContext_ImplPtr; class XMLTextColumnsArray_Impl : public std::vector<XMLTextColumnContext_Impl *> {};
SV_DECL_PTRARR( XMLTextColumnsArray_Impl, XMLTextColumnContext_ImplPtr, 5 )
TYPEINIT1( XMLTextColumnsContext, XMLElementPropertyContext ); TYPEINIT1( XMLTextColumnsContext, XMLElementPropertyContext );
...@@ -343,12 +342,10 @@ XMLTextColumnsContext::~XMLTextColumnsContext() ...@@ -343,12 +342,10 @@ XMLTextColumnsContext::~XMLTextColumnsContext()
{ {
if( pColumns ) if( pColumns )
{ {
sal_uInt16 nColCount = pColumns->Count(); while( !pColumns->empty() )
while( nColCount )
{ {
nColCount--; XMLTextColumnContext_Impl *pColumn = *pColumns->begin();
XMLTextColumnContext_Impl *pColumn = (*pColumns)[nColCount]; pColumns->erase( pColumns->begin() );
pColumns->Remove( nColCount, 1 );
pColumn->ReleaseRef(); pColumn->ReleaseRef();
} }
} }
...@@ -378,7 +375,7 @@ SvXMLImportContext *XMLTextColumnsContext::CreateChildContext( ...@@ -378,7 +375,7 @@ SvXMLImportContext *XMLTextColumnsContext::CreateChildContext(
if( !pColumns ) if( !pColumns )
pColumns = new XMLTextColumnsArray_Impl; pColumns = new XMLTextColumnsArray_Impl;
pColumns->Insert( pColumn, pColumns->Count() ); pColumns->push_back( pColumn );
pColumn->AddRef(); pColumn->AddRef();
pContext = pColumn; pContext = pColumn;
...@@ -419,7 +416,7 @@ void XMLTextColumnsContext::EndElement( ) ...@@ -419,7 +416,7 @@ void XMLTextColumnsContext::EndElement( )
xColumns->setColumnCount( 1 ); xColumns->setColumnCount( 1 );
} }
else if( !bAutomatic && pColumns && 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 // if we have column descriptions, one per column, and we don't use
// automatic width, then set the column widths // automatic width, then set the column widths
......
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