diff options
author | Joseph Powers <jpowers27@cox.net> | 2011-02-02 05:18:45 -0800 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-02-02 05:19:11 -0800 |
commit | 1a82137a5dfe4db8eb7e377039ee6ce966081b71 (patch) | |
tree | 89361bdf13f391c0e4ac9abf4954c3ace0e87cb5 /svl | |
parent | ebdca00eb68d18e957fd167c52569ebdf60e085d (diff) |
Remove DECLARE_LIST(SvAddressList_Impl, SvAddressEntry_Impl*)
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/adrparse.hxx | 10 | ||||
-rw-r--r-- | svl/source/misc/adrparse.cxx | 11 |
2 files changed, 11 insertions, 10 deletions
diff --git a/svl/inc/adrparse.hxx b/svl/inc/adrparse.hxx index 2c69dff81102..dbb671889ec3 100644 --- a/svl/inc/adrparse.hxx +++ b/svl/inc/adrparse.hxx @@ -30,8 +30,8 @@ #define _ADRPARSE_HXX #include "svl/svldllapi.h" -#include <tools/list.hxx> #include <tools/string.hxx> +#include <vector> //============================================================================ struct SvAddressEntry_Impl @@ -46,7 +46,7 @@ struct SvAddressEntry_Impl }; //============================================================================ -DECLARE_LIST(SvAddressList_Impl, SvAddressEntry_Impl *) +typedef ::std::vector< SvAddressEntry_Impl* > SvAddressList_Impl; //============================================================================ class SVL_DLLPUBLIC SvAddressParser @@ -62,7 +62,7 @@ public: ~SvAddressParser(); - sal_Int32 Count() const { return m_bHasFirst ? m_aRest.Count() + 1 : 0; } + sal_Int32 Count() const { return m_bHasFirst ? m_aRest.size() + 1 : 0; } inline UniString const & GetEmailAddress(sal_Int32 nIndex) const; @@ -95,13 +95,13 @@ inline UniString const & SvAddressParser::GetEmailAddress(sal_Int32 nIndex) const { return nIndex == 0 ? m_aFirst.m_aAddrSpec : - m_aRest.GetObject(nIndex - 1)->m_aAddrSpec; + m_aRest[ nIndex - 1 ]->m_aAddrSpec; } inline UniString const & SvAddressParser::GetRealName(sal_Int32 nIndex) const { return nIndex == 0 ? m_aFirst.m_aRealName : - m_aRest.GetObject(nIndex - 1)->m_aRealName; + m_aRest[ nIndex - 1 ]->m_aRealName; } #endif // _ADRPARSE_HXX diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx index 8f9ff93902a0..1c99aee9fc71 100644 --- a/svl/source/misc/adrparse.cxx +++ b/svl/source/misc/adrparse.cxx @@ -701,10 +701,10 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser, nLen); } if (pParser->m_bHasFirst) - pParser->m_aRest.Insert(new SvAddressEntry_Impl( + pParser->m_aRest.push_back(new SvAddressEntry_Impl( aTheAddrSpec, - aTheRealName), - LIST_APPEND); + aTheRealName) + ); else { pParser->m_bHasFirst = true; @@ -775,8 +775,9 @@ SvAddressParser::SvAddressParser(UniString const & rInput): m_bHasFirst(false) //============================================================================ SvAddressParser::~SvAddressParser() { - for (ULONG i = m_aRest.Count(); i != 0;) - delete m_aRest.Remove(--i); + for ( size_t i = m_aRest.size(); i > 0; ) + delete m_aRest[ --i ]; + m_aRest.clear(); } //============================================================================ |