[Libreoffice-commits] .: binfilter/bf_svtools binfilter/inc
Joseph Powers
jpowers at kemper.freedesktop.org
Tue Jan 18 21:36:44 PST 2011
binfilter/bf_svtools/source/misc1/svt_adrparse.cxx | 13 +++++++------
binfilter/inc/bf_svtools/adrparse.hxx | 16 +++++++---------
2 files changed, 14 insertions(+), 15 deletions(-)
New commits:
commit cc684648e79fe050d7e2b52217ab1d157690d387
Author: Joseph Powers <jpowers27 at cox.net>
Date: Tue Jan 18 21:36:39 2011 -0800
Remove DECLARE_LIST(SvAddressList_Impl, SvAddressEntry_Impl *)
diff --git a/binfilter/bf_svtools/source/misc1/svt_adrparse.cxx b/binfilter/bf_svtools/source/misc1/svt_adrparse.cxx
index 22112b4..6f749f0 100644
--- a/binfilter/bf_svtools/source/misc1/svt_adrparse.cxx
+++ b/binfilter/bf_svtools/source/misc1/svt_adrparse.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -699,10 +699,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;
@@ -773,8 +773,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();
}
}
diff --git a/binfilter/inc/bf_svtools/adrparse.hxx b/binfilter/inc/bf_svtools/adrparse.hxx
index 14c6eb1..570a9b8 100644
--- a/binfilter/inc/bf_svtools/adrparse.hxx
+++ b/binfilter/inc/bf_svtools/adrparse.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,6 +31,7 @@
#include <tools/list.hxx>
#include <tools/string.hxx>
+#include <vector>
namespace binfilter {
@@ -47,7 +48,7 @@ struct SvAddressEntry_Impl
};
//============================================================================
-DECLARE_LIST(SvAddressList_Impl, SvAddressEntry_Impl *)
+typedef ::std::vector< SvAddressEntry_Impl* > SvAddressList_Impl;
//============================================================================
class SvAddressParser
@@ -63,24 +64,21 @@ 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;
inline UniString const &GetRealName(sal_Int32 nIndex) const;
};
-inline UniString const & SvAddressParser::GetEmailAddress(sal_Int32 nIndex)
- const
+inline UniString const & SvAddressParser::GetEmailAddress(sal_Int32 nIndex) const
{
- return nIndex == 0 ? m_aFirst.m_aAddrSpec :
- m_aRest.GetObject(nIndex - 1)->m_aAddrSpec;
+ return nIndex == 0 ? m_aFirst.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;
+ return nIndex == 0 ? m_aFirst.m_aRealName : m_aRest[ nIndex - 1 ]->m_aRealName;
}
}
More information about the Libreoffice-commits
mailing list