зеркало из https://github.com/mozilla/pjs.git
Bug #385486 --> back out FindInReadable changes for case insensitive unichar calls. This should fix mail filters which are broken in todays build.
sr=bienvneu
This commit is contained in:
Родитель
06445f5896
Коммит
efb186c1db
|
@ -594,9 +594,13 @@ nsresult nsAbDirectoryQuery::matchCardCondition (nsIAbCard* card,
|
|||
*matchFound = PR_TRUE;
|
||||
break;
|
||||
case nsIAbBooleanConditionTypes::Contains:
|
||||
// When we move to frozen linkage, this should be:
|
||||
// *matchFound = value.Find(matchValue, CaseInsensitiveCompare) >= 0;
|
||||
*matchFound = FindInReadable(matchValue, value, nsCaseInsensitiveStringComparator());
|
||||
break;
|
||||
case nsIAbBooleanConditionTypes::DoesNotContain:
|
||||
// When we move to frozen linkage, this should be:
|
||||
// *matchFound = value.Find(matchValue, CaseInsensitiveCompare) == -1;
|
||||
*matchFound = !FindInReadable(matchValue, value, nsCaseInsensitiveStringComparator());
|
||||
break;
|
||||
case nsIAbBooleanConditionTypes::Is:
|
||||
|
|
|
@ -954,11 +954,13 @@ nsresult nsMsgSearchTerm::MatchString (const char *stringToMatch,
|
|||
switch (m_operator)
|
||||
{
|
||||
case nsMsgSearchOp::Contains:
|
||||
if (utf16StrToMatch.Find(needle, PR_TRUE) >= 0)
|
||||
// When we move to frozen linkage, this should be:
|
||||
// utf16StrToMatch.Find(needle, CaseInsensitiveCompare) >= 0);
|
||||
if (CaseInsensitiveFindInReadable(needle, utf16StrToMatch))
|
||||
result = PR_TRUE;
|
||||
break;
|
||||
case nsMsgSearchOp::DoesntContain:
|
||||
if (utf16StrToMatch.Find(needle, PR_TRUE) == -1)
|
||||
if (!CaseInsensitiveFindInReadable(needle, utf16StrToMatch))
|
||||
result = PR_TRUE;
|
||||
break;
|
||||
case nsMsgSearchOp::Is:
|
||||
|
|
|
@ -3628,9 +3628,17 @@ nsMsgCompose::LoadDataFromFile(nsILocalFile *file, nsString &sigData,
|
|||
{
|
||||
nsAutoString metaCharset(NS_LITERAL_STRING("charset="));
|
||||
AppendASCIItoUTF16(sigEncoding, metaCharset);
|
||||
PRInt32 offset = sigData.Find(metaCharset, PR_TRUE);
|
||||
if (offset >= 0)
|
||||
sigData.Cut(offset, metaCharset.Length());
|
||||
// When we move to frozen linkage, this should become:
|
||||
// PRInt32 offset = sigData.Find(metaCharset, CaseInsensitiveCompare) ;
|
||||
// if (offset >= 0)
|
||||
// sigData.Cut(offset, metaCharset.Length());
|
||||
nsAString::const_iterator realstart, start, end;
|
||||
sigData.BeginReading(start);
|
||||
sigData.EndReading(end);
|
||||
realstart = start;
|
||||
if (FindInReadable(metaCharset, start, end,
|
||||
nsCaseInsensitiveStringComparator()))
|
||||
sigData.Cut(Distance(realstart, start), Distance(start, end));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -4486,10 +4494,14 @@ NS_IMETHODIMP nsMsgCompose::CheckAndPopulateRecipients(PRBool populateMailList,
|
|||
if (atPos >= 0)
|
||||
{
|
||||
recipient->mEmail.Right(domain, recipient->mEmail.Length() - atPos - 1);
|
||||
if (plaintextDomains.Find(domain, PR_TRUE) >= 0)
|
||||
// when we move to frozen linkage this should be:
|
||||
// if (plaintextDomains.Find(domain, CaseInsensitiveCompare) >= 0)
|
||||
if (FindInReadable(domain, plaintextDomains, nsCaseInsensitiveStringComparator()))
|
||||
recipient->mPreferFormat = nsIAbPreferMailFormat::plaintext;
|
||||
else
|
||||
if (htmlDomains.Find(domain, PR_TRUE) >= 0)
|
||||
// when we move to frozen linkage this should be:
|
||||
// if (htmlDomains.Find(domain, CaseInsensitiveCompare) >= 0)
|
||||
if (FindInReadable(domain, htmlDomains, nsCaseInsensitiveStringComparator()))
|
||||
recipient->mPreferFormat = nsIAbPreferMailFormat::html;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1699,7 +1699,13 @@ nsresult
|
|||
nsNntpIncomingServer::AppendIfSearchMatch(nsCString& newsgroupName)
|
||||
{
|
||||
NS_ConvertUTF8toUTF16 groupName(newsgroupName);
|
||||
if (groupName.Find(mSearchValue, PR_TRUE) >= 0)
|
||||
// When we move to frozen linkage this should be:
|
||||
// if (groupName.Find(mSearchValue, CaseInsensitiveCompare) >= 0)
|
||||
nsAString::const_iterator start, end;
|
||||
groupName.BeginReading(start);
|
||||
groupName.EndReading(end);
|
||||
if (FindInReadable(mSearchValue, start, end,
|
||||
nsCaseInsensitiveStringComparator()))
|
||||
mSubscribeSearchResult.AppendCString(newsgroupName);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче