mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug #227206 --> add support for autocompleting a set of comma delimted names in mail compose.
Part of the work to support names from excel spreadsheets directly into the mail compose envelope and have them get autocompleted. sr=bienvenu
This commit is contained in:
parent
4edbb63c73
commit
546ed45ec7
@ -734,9 +734,12 @@ NS_IMETHODIMP nsAbAutoCompleteSession::OnStartLookup(const PRUnichar *uSearchStr
|
||||
mAutoCompleteCommentColumn = 0;
|
||||
}
|
||||
|
||||
|
||||
// strings with @ signs or commas (commas denote multiple names) should be ignored for
|
||||
// autocomplete purposes
|
||||
PRInt32 i;
|
||||
for (i = nsCRT::strlen(uSearchString) - 1; i >= 0; i --)
|
||||
if (uSearchString[i] == '@')
|
||||
if (uSearchString[i] == '@' || uSearchString[i] == ',')
|
||||
{
|
||||
listener->OnAutoComplete(nsnull, nsIAutoCompleteStatus::ignored);
|
||||
return NS_OK;
|
||||
|
@ -116,6 +116,8 @@ nsLDAPAutoCompleteSession::OnStartLookup(const PRUnichar *searchString,
|
||||
if (searchString[0] == 0 ||
|
||||
nsDependentString(searchString).FindChar(PRUnichar('@'), 0) !=
|
||||
kNotFound ||
|
||||
nsDependentString(searchString).FindChar(PRUnichar(','), 0) !=
|
||||
kNotFound ||
|
||||
( !IS_CJK_CHAR_FOR_LDAP(searchString[0]) ?
|
||||
mMinStringLength && nsCRT::strlen(searchString) < mMinStringLength :
|
||||
mCjkMinStringLength && nsCRT::strlen(searchString) <
|
||||
|
Loading…
Reference in New Issue
Block a user