Bug 1402750 - Replace [Assign|Append|Insert|Equals](NS_LITERAL_STRING("")) with [Assign|Append|Insert|Equals]Literal(u""). r=aceman

This commit is contained in:
Jorg K 2017-09-26 00:43:54 +02:00
Родитель 4061934ccb
Коммит 0a22c34bff
11 изменённых файлов: 21 добавлений и 21 удалений

Просмотреть файл

@ -821,8 +821,8 @@ nsAbManager::ExportDirectoryToDelimitedText(nsIAbDirectory *aDirectory,
if (needsQuotes)
{
newValue.Insert(NS_LITERAL_STRING("\""), 0);
newValue.AppendLiteral("\"");
newValue.InsertLiteral(u"\"", 0);
newValue.Append(u'"');
}
rv = nsMsgI18NConvertFromUnicode(useUTF8 ? "UTF-8" : nsMsgI18NFileSystemCharset(),

Просмотреть файл

@ -197,7 +197,7 @@ nsMsgFilterList::GetLogFile(nsIFile **aFile)
rv = filterLogFile->GetLeafName(filterLogName);
NS_ENSURE_SUCCESS(rv,rv);
filterLogName.Append(NS_LITERAL_STRING(".htm"));
filterLogName.AppendLiteral(u".htm");
rv = filterLogFile->SetLeafName(filterLogName);
NS_ENSURE_SUCCESS(rv,rv);

Просмотреть файл

@ -526,7 +526,7 @@ nsMessenger::LoadURL(mozIDOMWindowProxy *aWin, const nsACString& aURL)
NS_ENSURE_SUCCESS(rv, rv);
file->GetFileSize(&fileSize);
uriString.Replace(0, 5, NS_LITERAL_STRING("mailbox:"));
uriString.Append(NS_LITERAL_STRING("&number=0"));
uriString.AppendLiteral(u"&number=0");
loadingFromFile = true;
getDummyMsgHdr = true;
}
@ -871,7 +871,7 @@ nsMessenger::SaveOneAttachment(const char * aContentType, const char * aURL,
"saveAsType", extensionParam, 1, filterName);
NS_ENSURE_SUCCESS(rv, rv);
extension.Insert(NS_LITERAL_STRING("*."), 0);
extension.InsertLiteral(u"*.", 0);
filePicker->AppendFilter(filterName, extension);
}

Просмотреть файл

@ -516,7 +516,7 @@ nsresult nsMsgDBView::FetchRecipients(nsIMsgDBHdr * aHdr, nsAString &aRecipients
// add ', ' between each recipient
if (i != 0)
aRecipientsString.Append(NS_LITERAL_STRING(", "));
aRecipientsString.AppendLiteral(u", ");
aRecipientsString.Append(recipient);
}

Просмотреть файл

@ -1013,7 +1013,7 @@ nsresult nsMsgFolderDataSource::CreateUnreadMessagesNameString(int32_t unreadMes
//Only do this if unread messages are positive
if(unreadMessages > 0)
{
nameString.Append(NS_LITERAL_STRING(" ("));
nameString.AppendLiteral(u" (");
nameString.AppendInt(unreadMessages);
nameString.Append(u')');
}

Просмотреть файл

@ -1004,15 +1004,15 @@ nsMsgGroupView::CellTextForColumn(int32_t aRow,
formattedCountUnrMsg.AppendInt(numUnrMsg);
// Add text to header.
aValue.Append(NS_LITERAL_STRING(" ("));
aValue.AppendLiteral(u" (");
if (numUnrMsg)
{
aValue.Append(formattedCountUnrMsg);
aValue.Append(NS_LITERAL_STRING("/"));
aValue.Append(u'/');
}
aValue.Append(formattedCountMsg);
aValue.Append(NS_LITERAL_STRING(")"));
aValue.Append(u')');
}
}
else if (aColumnName[0] == 't' && aColumnName[1] == 'o')

Просмотреть файл

@ -517,9 +517,9 @@ NS_IMETHODIMP
nsMsgWindow::DisplayHTMLInMessagePane(const nsAString& title, const nsAString& body, bool clearMsgHdr)
{
nsString htmlStr;
htmlStr.Append(NS_LITERAL_STRING("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body>"));
htmlStr.AppendLiteral(u"<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"></head><body>");
htmlStr.Append(body);
htmlStr.Append(NS_LITERAL_STRING("</body></html>"));
htmlStr.AppendLiteral(u"</body></html>");
char *encodedHtml = PL_Base64Encode(NS_ConvertUTF16toUTF8(htmlStr).get(), 0, nullptr);
if (!encodedHtml)

Просмотреть файл

@ -5519,7 +5519,7 @@ NS_IMETHODIMP nsMsgDBFolder::GetMsgTextFromStream(nsIInputStream *stream, const
// this is in violation of the RFC for multipart/digest, though
// Also, if we've just passed an end boundary, we're going to ignore this.
if (!justPassedEndBoundary && contentTypeHdr.IsEmpty())
contentType.Assign(NS_LITERAL_STRING("text/plain"));
contentType.AssignLiteral(u"text/plain");
else
mimeHdrParam->GetParameter(contentTypeHdr, nullptr, EmptyCString(), false, nullptr, contentType);

Просмотреть файл

@ -362,9 +362,9 @@ void nsMsgProtocol::ShowAlertMessage(nsIMsgMailNewsUrl *aMsgUrl, nsresult aStatu
errorMsg.Adopt(FormatStringWithHostNameByName(errorString, aMsgUrl));
if (errorMsg.IsEmpty())
{
errorMsg.Assign(NS_LITERAL_STRING("[StringID "));
errorMsg.AssignLiteral(u"[StringID ");
errorMsg.Append(errorString);
errorMsg.AppendLiteral("?]");
errorMsg.AppendLiteral(u"?]");
}
nsCOMPtr<nsIMsgMailSession> mailSession =

Просмотреть файл

@ -2123,7 +2123,7 @@ nsresult nsMsgCompose::CreateMessage(const char * originalMsgURI,
}
mQuotingToFollow = true;
subject.Insert(NS_LITERAL_STRING("Re: "), 0);
subject.InsertLiteral(u"Re: ", 0);
m_compFields->SetSubject(subject);
// Setup quoting callbacks for later...
@ -2157,7 +2157,7 @@ nsresult nsMsgCompose::CreateMessage(const char * originalMsgURI,
msgHdr->GetFlags(&flags);
if (flags & nsMsgMessageFlags::HasRe)
subject.Insert(NS_LITERAL_STRING("Re: "), 0);
subject.InsertLiteral(u"Re: ", 0);
// Setup quoting callbacks for later...
mQuotingToFollow = false; //We don't need to quote the original message.
@ -2212,7 +2212,7 @@ nsresult nsMsgCompose::CreateMessage(const char * originalMsgURI,
}
else
{
subject.Insert(NS_LITERAL_STRING("Fwd: "), 0);
subject.InsertLiteral(u"Fwd: ", 0);
}
m_compFields->SetSubject(subject);
}
@ -3186,7 +3186,7 @@ bool IsInDomainList(const nsAString &aDomain, const nsAString &aDomainList)
return true;
nsAutoString dotDomain;
dotDomain.Assign(NS_LITERAL_STRING("."));
dotDomain.Assign(u'.');
dotDomain.Append(domain);
if (StringEndsWith(aDomain, dotDomain, nsCaseInsensitiveStringComparator()))
return true;

Просмотреть файл

@ -737,9 +737,9 @@ NS_IMETHODIMP nsMsgTemplateReplyHelper::OnStopRunningUrl(nsIURI *aUrl, nsresult
subject.Append(templateSubject);
if (!replySubject.IsEmpty())
{
subject.Append(NS_LITERAL_STRING(" (was: "));
subject.AppendLiteral(u" (was: ");
subject.Append(replySubject);
subject.Append(NS_LITERAL_STRING(")"));
subject.Append(u')');
}
compFields->SetSubject(subject);