From ef01fae2759ac225f281f11a2b24ebaad40be941 Mon Sep 17 00:00:00 2001 From: Maciej Rumianowski Date: Tue, 27 Sep 2011 22:04:20 +0200 Subject: Replace SvULongs with std::vector in sfx2 Bug 38831, replace SvULongs with std::vector in sfx2 and related svtools --- svtools/source/svhtml/parhtml.cxx | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'svtools/source/svhtml') diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 770f03bda8ee..8ec3503303e8 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -36,10 +36,6 @@ #include #include #include -#ifndef _SVSTDARR_HXX -#define _SVSTDARR_ULONGS -#include -#endif #include #include @@ -176,10 +172,9 @@ sal_Int32 HTMLOption::GetSNumber() const return aTmp.ToInt32(); } -void HTMLOption::GetNumbers( SvULongs &rLongs, bool bSpaceDelim ) const +void HTMLOption::GetNumbers( std::vector &rNumbers, bool bSpaceDelim ) const { - if( rLongs.Count() ) - rLongs.Remove( 0, rLongs.Count() ); + rNumbers.clear(); if( bSpaceDelim ) { @@ -198,14 +193,14 @@ void HTMLOption::GetNumbers( SvULongs &rLongs, bool bSpaceDelim ) const } else if( bInNum ) { - rLongs.Insert( nNum, rLongs.Count() ); + rNumbers.push_back( nNum ); bInNum = false; nNum = 0; } } if( bInNum ) { - rLongs.Insert( nNum, rLongs.Count() ); + rNumbers.push_back( nNum ); } } else @@ -222,23 +217,21 @@ void HTMLOption::GetNumbers( SvULongs &rLongs, bool bSpaceDelim ) const nPos++; if( nPos==aValue.Len() ) - rLongs.Insert( sal_uLong(0), rLongs.Count() ); + rNumbers.push_back(0); else { xub_StrLen nEnd = aValue.Search( (sal_Unicode)',', nPos ); if( STRING_NOTFOUND==nEnd ) { sal_Int32 nTmp = aValue.Copy(nPos).ToInt32(); - rLongs.Insert( nTmp >= 0 ? (sal_uInt32)nTmp : 0, - rLongs.Count() ); + rNumbers.push_back( nTmp >= 0 ? (sal_uInt32)nTmp : 0 ); nPos = aValue.Len(); } else { sal_Int32 nTmp = aValue.Copy(nPos,nEnd-nPos).ToInt32(); - rLongs.Insert( nTmp >= 0 ? (sal_uInt32)nTmp : 0, - rLongs.Count() ); + rNumbers.push_back( nTmp >= 0 ? (sal_uInt32)nTmp : 0 ); nPos = nEnd+1; } } -- cgit