diff --git a/editor/libeditor/base/nsEditor.cpp b/editor/libeditor/base/nsEditor.cpp index fc661f07f21..c461bc93e00 100644 --- a/editor/libeditor/base/nsEditor.cpp +++ b/editor/libeditor/base/nsEditor.cpp @@ -41,6 +41,7 @@ #include "pratom.h" #include "nsIDOMDocument.h" #include "nsIPref.h" +#include "nsUnicharUtils.h" #include "nsIDOMText.h" #include "nsIDOMElement.h" @@ -3452,7 +3453,7 @@ nsEditor::NodeIsType(nsIDOMNode *aNode, nsIAtom *aTag) element->GetTagName(tag); const PRUnichar *unicodeString; aTag->GetUnicode(&unicodeString); - if (tag.EqualsIgnoreCase(nsAutoString(unicodeString))) + if (tag.Equals(unicodeString, nsCaseInsensitiveStringComparator())) { return PR_TRUE; } diff --git a/intl/locale/src/mac/nsDateTimeFormatMac.cpp b/intl/locale/src/mac/nsDateTimeFormatMac.cpp index 852ffd1040e..d8f77ddf9d6 100644 --- a/intl/locale/src/mac/nsDateTimeFormatMac.cpp +++ b/intl/locale/src/mac/nsDateTimeFormatMac.cpp @@ -52,6 +52,7 @@ #include "nsCRT.h" #include "plstr.h" #include "prmem.h" +#include "nsUnicharUtils.h" //////////////////////////////////////////////////////////////////////////////// @@ -247,7 +248,9 @@ nsresult nsDateTimeFormatMac::Initialize(nsILocale* locale) else { res = locale->GetCategory(aCategory.get(), &aLocaleUnichar); if (NS_SUCCEEDED(res) && NULL != aLocaleUnichar) { - if (mLocale.Length() && mLocale.EqualsIgnoreCase(nsAutoString(aLocaleUnichar))) { + if (!mLocale.IsEmpty() && + mLocale.Equals(aLocaleUnichar, + nsCaseInsensitiveStringComparator())) { nsMemory::Free(aLocaleUnichar); return NS_OK; } diff --git a/intl/locale/src/unix/nsDateTimeFormatUnix.cpp b/intl/locale/src/unix/nsDateTimeFormatUnix.cpp index 559f47f3781..9f2a71cb08e 100644 --- a/intl/locale/src/unix/nsDateTimeFormatUnix.cpp +++ b/intl/locale/src/unix/nsDateTimeFormatUnix.cpp @@ -47,6 +47,7 @@ #include "nsIPlatformCharset.h" #include "nsIPosixLocale.h" #include "nsCRT.h" +#include "nsUnicharUtils.h" NS_IMPL_THREADSAFE_ISUPPORTS1(nsDateTimeFormatUnix, nsIDateTimeFormat); @@ -67,7 +68,9 @@ nsresult nsDateTimeFormatUnix::Initialize(nsILocale* locale) else { res = locale->GetCategory(aCategory.get(), &aLocaleUnichar); if (NS_SUCCEEDED(res) && NULL != aLocaleUnichar) { - if (mLocale.Length() && mLocale.EqualsIgnoreCase(nsAutoString(aLocaleUnichar))) { + if (!mLocale.IsEmpty() && + mLocale.Equals(aLocaleUnichar, + nsCaseInsensitiveStringComparator())) { nsMemory::Free(aLocaleUnichar); return NS_OK; } diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp index b56b2014ccb..bce97ce47fc 100644 --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -355,11 +355,12 @@ NS_IMETHODIMP nsImapMailFolder::AddSubfolderWithPath(nsAutoString *name, nsIFile if(NS_SUCCEEDED(rv)) { - if(isServer && (Compare(*name, - NS_LITERAL_STRING("Inbox"), - nsCaseInsensitiveStringComparator()) == 0)) + if(isServer && + name->Equals(NS_LITERAL_STRING("Inbox"), + nsCaseInsensitiveStringComparator())) flags |= MSG_FOLDER_FLAG_INBOX; - else if((isServer || isParentInbox) && name->EqualsIgnoreCase(nsAutoString(kTrashName))) + else if((isServer || isParentInbox) && name->Equals(kTrashName, + nsCaseInsensitiveStringComparator())) flags |= MSG_FOLDER_FLAG_TRASH; #if 0 else if(name->EqualsIgnoreCase(kSentName)) diff --git a/mailnews/local/src/nsLocalMailFolder.cpp b/mailnews/local/src/nsLocalMailFolder.cpp index 915f4301024..11701922e95 100644 --- a/mailnews/local/src/nsLocalMailFolder.cpp +++ b/mailnews/local/src/nsLocalMailFolder.cpp @@ -295,15 +295,15 @@ NS_IMETHODIMP nsMsgLocalMailFolder::AddSubfolder(nsAutoString *name, //Only set these is these are top level children. if(NS_SUCCEEDED(rv) && isServer) { - if(name->EqualsIgnoreCase(nsAutoString(kInboxName))) + if(name->Equals(kInboxName, nsCaseInsensitiveStringComparator())) { flags |= MSG_FOLDER_FLAG_INBOX; SetBiffState(nsIMsgFolder::nsMsgBiffState_Unknown); } - else if (name->EqualsIgnoreCase(nsAutoString(kTrashName))) + else if (name->Equals(kTrashName, nsCaseInsensitiveStringComparator())) flags |= MSG_FOLDER_FLAG_TRASH; - else if (name->EqualsIgnoreCase(nsAutoString(kUnsentName)) - || Compare(*name, NS_LITERAL_STRING("Outbox"), nsCaseInsensitiveStringComparator()) == 0) + else if (name->Equals(kUnsentName, nsCaseInsensitiveStringComparator()) || + name->Equals(NS_LITERAL_STRING("Outbox"), nsCaseInsensitiveStringComparator())) flags |= MSG_FOLDER_FLAG_QUEUE; #if 0 // the logic for this has been moved into