summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-07-10 00:08:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-07-11 09:05:05 +0100
commit9cec47773b6c93239c75127e99e638f2e2b2aa86 (patch)
tree960b2922b3174d8204e2d6a9dde39503e91f04f1 /svl
parent6c4a4c200eda74ab0f958a10f38d3808df423e02 (diff)
callcatcher: remove unused createRFC822Mailbox
Diffstat (limited to 'svl')
-rw-r--r--svl/inc/svl/adrparse.hxx22
-rw-r--r--svl/source/misc/adrparse.cxx138
2 files changed, 0 insertions, 160 deletions
diff --git a/svl/inc/svl/adrparse.hxx b/svl/inc/svl/adrparse.hxx
index dbb671889ec3..e9f479af9e09 100644
--- a/svl/inc/svl/adrparse.hxx
+++ b/svl/inc/svl/adrparse.hxx
@@ -67,28 +67,6 @@ public:
inline UniString const & GetEmailAddress(sal_Int32 nIndex) const;
inline UniString const &GetRealName(sal_Int32 nIndex) const;
-
- /** Create an RFC 822 <mailbox> (i.e., 'e-mail address').
-
- @param rPhrase Either an empty string (the <mailbox> will have no
- <phrase> an will be of the form <addr-spec>), or some text that will
- become the <phrase> part of a <phrase route-addr> form <mailbox>. Non
- US-ASCII characters within the text are put into a <qouted-string>
- verbatim, so the result may actually not be a valid RFC 822 <mailbox>,
- but a more human-readable representation.
-
- @param rAddrSpec A valid RFC 822 <addr-spec>. (An RFC 822 <mailbox>
- including a <route> cannot be created by this method.)
-
- @param rMailbox If this method returns true, this parameter returns
- the created RFC 822 <mailbox> (rather, a more human-readable
- representation thereof). Otherwise, this parameter is not modified.
-
- @return True, if rAddrSpec is a valid RFC 822 <addr-spec>.
- */
- static bool createRFC822Mailbox(String const & rPhrase,
- String const & rAddrSpec,
- String & rMailbox);
};
inline UniString const & SvAddressParser::GetEmailAddress(sal_Int32 nIndex)
diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx
index e0087aa5220d..b6aa9d9e6ff2 100644
--- a/svl/source/misc/adrparse.cxx
+++ b/svl/source/misc/adrparse.cxx
@@ -780,142 +780,4 @@ SvAddressParser::~SvAddressParser()
m_aRest.clear();
}
-//============================================================================
-// static
-bool SvAddressParser::createRFC822Mailbox(String const & rPhrase,
- String const & rAddrSpec,
- String & rMailbox)
-{
- String aTheAddrSpec;
- sal_Unicode const * p = rAddrSpec.GetBuffer();
- sal_Unicode const * pEnd = p + rAddrSpec.Len();
- {for (bool bSegment = false;;)
- {
- p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd);
- if (p == pEnd)
- return false;
- if (bSegment)
- {
- sal_Unicode c = *p++;
- if (c == '@')
- break;
- else if (c != '.')
- return false;
- aTheAddrSpec += '.';
- p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd);
- if (p == pEnd)
- return false;
- }
- else
- bSegment = true;
- if (*p == '"')
- {
- aTheAddrSpec += *p++;
- for (;;)
- {
- if (INetMIME::startsWithLineFolding(p, pEnd))
- p += 2;
- if (p == pEnd)
- return false;
- if (*p == '"')
- break;
- if (*p == '\x0D' || (*p == '\\' && ++p == pEnd)
- || !INetMIME::isUSASCII(*p))
- return false;
- if (INetMIME::needsQuotedStringEscape(*p))
- aTheAddrSpec += '\\';
- aTheAddrSpec += *p++;
- }
- aTheAddrSpec += *p++;
- }
- else if (INetMIME::isAtomChar(*p))
- while (p != pEnd && INetMIME::isAtomChar(*p))
- aTheAddrSpec += *p++;
- else
- return false;
- }}
- aTheAddrSpec += '@';
- {for (bool bSegment = false;;)
- {
- p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd);
- if (p == pEnd)
- {
- if (bSegment)
- break;
- else
- return false;
- }
- if (bSegment)
- {
- if (*p++ != '.')
- return false;
- aTheAddrSpec += '.';
- p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd);
- if (p == pEnd)
- return false;
- }
- else
- bSegment = true;
- if (*p == '[')
- {
- aTheAddrSpec += *p++;
- for (;;)
- {
- if (INetMIME::startsWithLineFolding(p, pEnd))
- p += 2;
- if (p == pEnd)
- return false;
- if (*p == ']')
- break;
- if (*p == '\x0D' || *p == '[' || (*p == '\\' && ++p == pEnd)
- || !INetMIME::isUSASCII(*p))
- return false;
- if (*p >= '[' && *p <= ']')
- aTheAddrSpec += '\\';
- aTheAddrSpec += *p++;
- }
- aTheAddrSpec += *p++;
- }
- else if (INetMIME::isAtomChar(*p))
- while (p != pEnd && INetMIME::isAtomChar(*p))
- aTheAddrSpec += *p++;
- else
- return false;
- }}
-
- if (rPhrase.Len() == 0)
- rMailbox = aTheAddrSpec;
- else
- {
- bool bQuotedString = false;
- p = rPhrase.GetBuffer();
- pEnd = p + rPhrase.Len();
- for (;p != pEnd; ++p)
- if (!(INetMIME::isAtomChar(*p)))
- {
- bQuotedString = true;
- break;
- }
- String aTheMailbox;
- if (bQuotedString)
- {
- aTheMailbox = '"';
- for (p = rPhrase.GetBuffer(); p != pEnd; ++p)
- {
- if (INetMIME::needsQuotedStringEscape(*p))
- aTheMailbox += '\\';
- aTheMailbox += *p;
- }
- aTheMailbox += '"';
- }
- else
- aTheMailbox = rPhrase;
- aTheMailbox.AppendAscii(RTL_CONSTASCII_STRINGPARAM(" <"));
- aTheMailbox += aTheAddrSpec;
- aTheMailbox += '>';
- rMailbox = aTheMailbox;
- }
- return true;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */