diff options
author | Noel Grandin <noel@peralex.com> | 2012-04-24 16:32:56 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-05-09 08:52:53 +0200 |
commit | e193ad831e5bbca09e9c2e5b355ce8fd9dfebe33 (patch) | |
tree | f5a902437cdc51b3e50acadf44385083e0969748 /sw/source/filter/html/htmlcss1.cxx | |
parent | 35be7d7574cd0f45a18ee5838dd14cb1040890d4 (diff) |
Convert SV_DECL_PTRARR(_HTMLAttrs) to std::deque
The code frequently inserts at both ends, so a deque made more
sense.
Diffstat (limited to 'sw/source/filter/html/htmlcss1.cxx')
-rw-r--r-- | sw/source/filter/html/htmlcss1.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 170c9831df96..ebac2311e8cc 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -2304,7 +2304,7 @@ void SwHTMLParser::GetULSpaceFromContext( sal_uInt16& nUpper, void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, sal_Bool bRemove ) { _HTMLAttrs &rAttrs = pContext->GetAttrs(); - for( sal_uInt16 i=0; i<rAttrs.Count(); i++ ) + for( sal_uInt16 i=0; i<rAttrs.size(); i++ ) { _HTMLAttr *pAttr = rAttrs[i]; @@ -2324,8 +2324,8 @@ void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, sal_Bool bRemove EndAttr( pAttr ); } - if( bRemove && rAttrs.Count() ) - rAttrs.Remove( 0, rAttrs.Count() ); + if( bRemove && !rAttrs.empty() ) + rAttrs.clear(); } void SwHTMLParser::InsertParaAttrs( const SfxItemSet& rItemSet ) @@ -2344,7 +2344,7 @@ void SwHTMLParser::InsertParaAttrs( const SfxItemSet& rItemSet ) NewAttr( ppAttr, *pItem ); if( RES_PARATR_BEGIN > nWhich ) (*ppAttr)->SetLikePara(); - aParaAttrs.Insert( *ppAttr, aParaAttrs.Count() ); + aParaAttrs.push_back( *ppAttr ); EndAttr( *ppAttr, 0, sal_False ); } |