Bug 1402750 - Replace [Assign|Append|Insert|Equals](NS_LITERAL_CSTRING("")) with [Assign|Append|Insert|Equals]Literal(""). r=aceman
This commit is contained in:
Родитель
3e72f90234
Коммит
4061934ccb
|
@ -257,7 +257,7 @@ NS_IMETHODIMP nsAbLDAPListenerBase::OnLDAPInit(nsILDAPConnection *aConn, nsresul
|
|||
rv = mDirectoryUrl->GetAsciiHost(service);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
service.Insert(NS_LITERAL_CSTRING("ldap@"), 0);
|
||||
service.InsertLiteral("ldap@", 0);
|
||||
|
||||
nsCOMPtr<nsIAuthModule> authModule =
|
||||
do_CreateInstance(NS_AUTH_MODULE_CONTRACTID_PREFIX "sasl-gssapi", &rv);
|
||||
|
|
|
@ -1415,7 +1415,7 @@ nsAbManager::Handle(nsICommandLine* aCmdLine)
|
|||
NS_IMETHODIMP
|
||||
nsAbManager::GetHelpInfo(nsACString& aResult)
|
||||
{
|
||||
aResult.Assign(NS_LITERAL_CSTRING(" -addressbook Open the address book at startup.\n"));
|
||||
aResult.AssignLiteral(" -addressbook Open the address book at startup.\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ NS_IMETHODIMP nsAddrDatabase::Open
|
|||
rv = dummyBackupMabFile->GetNativeLeafName(dummyBackupMabFileName);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
dummyBackupMabFileName.Append(NS_LITERAL_CSTRING(".bak"));
|
||||
dummyBackupMabFileName.AppendLiteral(".bak");
|
||||
|
||||
rv = dummyBackupMabFile->SetNativeLeafName(dummyBackupMabFileName);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
|
|
@ -1134,7 +1134,7 @@ static void writeGroup(OFile *fp, VObject *o)
|
|||
nsAutoCString buf(NAME_OF(o));
|
||||
|
||||
while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) {
|
||||
buf.Insert(NS_LITERAL_CSTRING("."), 0);
|
||||
buf.InsertLiteral(".", 0);
|
||||
buf.Insert(STRINGZ_VALUE_OF(o), 0);
|
||||
}
|
||||
appendsOFile(fp, buf.get());
|
||||
|
|
|
@ -1822,11 +1822,11 @@ NS_IMPL_GETSET(nsMsgSearchTerm, EndsGrouping, bool, mEndsGrouping)
|
|||
void nsMsgSearchTerm::ToLowerCaseExceptSpecials(nsACString &aValue)
|
||||
{
|
||||
if (aValue.LowerCaseEqualsLiteral("sender"))
|
||||
aValue.Assign(NS_LITERAL_CSTRING("Sender"));
|
||||
aValue.AssignLiteral("Sender");
|
||||
else if (aValue.LowerCaseEqualsLiteral("date"))
|
||||
aValue.Assign(NS_LITERAL_CSTRING("Date"));
|
||||
aValue.AssignLiteral("Date");
|
||||
else if (aValue.LowerCaseEqualsLiteral("status"))
|
||||
aValue.Assign(NS_LITERAL_CSTRING("Status"));
|
||||
aValue.AssignLiteral("Status");
|
||||
else
|
||||
ToLowerCase(aValue);
|
||||
}
|
||||
|
|
|
@ -2222,7 +2222,7 @@ nsMsgDBFolder::GetForcePropertyEmpty(const char *aPropertyName, bool *_retval)
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
nsAutoCString nameEmpty(aPropertyName);
|
||||
nameEmpty.Append(NS_LITERAL_CSTRING(".empty"));
|
||||
nameEmpty.AppendLiteral(".empty");
|
||||
nsCString value;
|
||||
GetStringProperty(nameEmpty.get(), value);
|
||||
*_retval = value.EqualsLiteral("true");
|
||||
|
@ -2233,7 +2233,7 @@ NS_IMETHODIMP
|
|||
nsMsgDBFolder::SetForcePropertyEmpty(const char *aPropertyName, bool aValue)
|
||||
{
|
||||
nsAutoCString nameEmpty(aPropertyName);
|
||||
nameEmpty.Append(NS_LITERAL_CSTRING(".empty"));
|
||||
nameEmpty.AppendLiteral(".empty");
|
||||
return SetStringProperty(nameEmpty.get(),
|
||||
aValue ? NS_LITERAL_CSTRING("true") : NS_LITERAL_CSTRING(""));
|
||||
}
|
||||
|
@ -2485,7 +2485,7 @@ nsMsgDBFolder::OnMessageTraitsClassified(const char *aMsgURI,
|
|||
continue; // junk is processed by the junk listener
|
||||
nsAutoCString traitId;
|
||||
rv = traitService->GetId(aTraits[i], traitId);
|
||||
traitId.Insert(NS_LITERAL_CSTRING("bayespercent/"), 0);
|
||||
traitId.InsertLiteral("bayespercent/", 0);
|
||||
nsAutoCString strPercent;
|
||||
strPercent.AppendInt(aPercents[i]);
|
||||
mDatabase->SetStringPropertyByHdr(msgHdr, traitId.get(), strPercent.get());
|
||||
|
@ -5497,7 +5497,7 @@ NS_IMETHODIMP nsMsgDBFolder::GetMsgTextFromStream(nsIInputStream *stream, const
|
|||
if (curLine.IsEmpty())
|
||||
break;
|
||||
msgHeaders.Append(curLine);
|
||||
msgHeaders.Append(NS_LITERAL_CSTRING("\r\n"));
|
||||
msgHeaders.AppendLiteral("\r\n");
|
||||
bytesRead += curLine.Length();
|
||||
if (bytesRead > bytesToRead)
|
||||
break;
|
||||
|
@ -5576,7 +5576,7 @@ NS_IMETHODIMP nsMsgDBFolder::GetMsgTextFromStream(nsIInputStream *stream, const
|
|||
{
|
||||
boundary.Assign(boundaryStack.ElementAt(count - 1));
|
||||
endBoundary.Assign(boundary);
|
||||
endBoundary.Append(NS_LITERAL_CSTRING("--"));
|
||||
endBoundary.AppendLiteral("--");
|
||||
}
|
||||
while (more)
|
||||
{
|
||||
|
@ -5608,7 +5608,7 @@ NS_IMETHODIMP nsMsgDBFolder::GetMsgTextFromStream(nsIInputStream *stream, const
|
|||
{
|
||||
msgText.Append(curLine);
|
||||
if (!isBase64)
|
||||
msgText.Append(NS_LITERAL_CSTRING("\r\n"));
|
||||
msgText.AppendLiteral("\r\n");
|
||||
}
|
||||
|
||||
bytesRead += curLine.Length();
|
||||
|
|
|
@ -2274,7 +2274,7 @@ nsMsgIncomingServer::GetForcePropertyEmpty(const char *aPropertyName, bool *_ret
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(_retval);
|
||||
nsAutoCString nameEmpty(aPropertyName);
|
||||
nameEmpty.Append(NS_LITERAL_CSTRING(".empty"));
|
||||
nameEmpty.AppendLiteral(".empty");
|
||||
nsCString value;
|
||||
GetCharValue(nameEmpty.get(), value);
|
||||
*_retval = value.EqualsLiteral("true");
|
||||
|
@ -2285,7 +2285,7 @@ NS_IMETHODIMP
|
|||
nsMsgIncomingServer::SetForcePropertyEmpty(const char *aPropertyName, bool aValue)
|
||||
{
|
||||
nsAutoCString nameEmpty(aPropertyName);
|
||||
nameEmpty.Append(NS_LITERAL_CSTRING(".empty"));
|
||||
nameEmpty.AppendLiteral(".empty");
|
||||
return SetCharValue(nameEmpty.get(),
|
||||
aValue ? NS_LITERAL_CSTRING("true") : NS_LITERAL_CSTRING(""));
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ nsresult nsMsgProtocol::GetFileFromURL(nsIURI * aURL, nsIFile **aResult)
|
|||
// extract the file path from the uri...
|
||||
nsAutoCString urlSpec;
|
||||
aURL->GetPathQueryRef(urlSpec);
|
||||
urlSpec.Insert(NS_LITERAL_CSTRING("file://"), 0);
|
||||
urlSpec.InsertLiteral("file://", 0);
|
||||
nsresult rv;
|
||||
|
||||
// dougt - there should be an easier way!
|
||||
|
|
|
@ -1917,7 +1917,7 @@ MsgStreamMsgHeaders(nsIInputStream *aInputStream, nsIStreamListener *aConsumer)
|
|||
if (curLine.IsEmpty())
|
||||
break;
|
||||
msgHeaders.Append(curLine);
|
||||
msgHeaders.Append(NS_LITERAL_CSTRING("\r\n"));
|
||||
msgHeaders.AppendLiteral("\r\n");
|
||||
}
|
||||
lineBuffer = nullptr;
|
||||
nsCOMPtr<nsIStringInputStream> hdrsStream =
|
||||
|
|
|
@ -2138,18 +2138,18 @@ nsresult nsMsgCompose::CreateMessage(const char * originalMsgURI,
|
|||
if (isFirstPass)
|
||||
{
|
||||
nsAutoCString reference;
|
||||
reference.Append(NS_LITERAL_CSTRING("<"));
|
||||
reference.Append('<');
|
||||
reference.Append(messageId);
|
||||
reference.Append(NS_LITERAL_CSTRING(">"));
|
||||
reference.Append('>');
|
||||
m_compFields->SetReferences(reference.get());
|
||||
}
|
||||
else
|
||||
{
|
||||
nsAutoCString references;
|
||||
m_compFields->GetReferences(getter_Copies(references));
|
||||
references.Append(NS_LITERAL_CSTRING(" <"));
|
||||
references.AppendLiteral(" <");
|
||||
references.Append(messageId);
|
||||
references.Append(NS_LITERAL_CSTRING(">"));
|
||||
references.Append('>');
|
||||
m_compFields->SetReferences(references.get());
|
||||
}
|
||||
|
||||
|
|
|
@ -1318,7 +1318,7 @@ nsMsgComposeService::RunMessageThroughMimeDraft(
|
|||
{
|
||||
// We loaded a .eml file from a file: url. Construct equivalent mailbox url.
|
||||
mailboxUri.Replace(0, 5, NS_LITERAL_CSTRING("mailbox:"));
|
||||
mailboxUri.Append(NS_LITERAL_CSTRING("&number=0"));
|
||||
mailboxUri.AppendLiteral("&number=0");
|
||||
// Need this to prevent nsMsgCompose::TagEmbeddedObjects from setting
|
||||
// inline images as moz-do-not-send.
|
||||
mimeConverter->SetOriginalMsgURI(mailboxUri.get());
|
||||
|
|
|
@ -8780,9 +8780,9 @@ void nsImapProtocol::GetQuotaDataIfSupported(const char *aBoxName)
|
|||
IncrementCommandTagNumber();
|
||||
|
||||
nsAutoCString quotacommand(GetServerCommandTag());
|
||||
quotacommand.Append(NS_LITERAL_CSTRING(" getquotaroot \""));
|
||||
quotacommand.AppendLiteral(" getquotaroot \"");
|
||||
quotacommand.Append(escapedName);
|
||||
quotacommand.Append(NS_LITERAL_CSTRING("\"" CRLF));
|
||||
quotacommand.AppendLiteral("\"" CRLF);
|
||||
|
||||
NS_ASSERTION(m_imapMailFolderSink, "m_imapMailFolderSink is null!");
|
||||
if (m_imapMailFolderSink)
|
||||
|
|
|
@ -1532,7 +1532,7 @@ void nsImapServerResponseParser::xaolenvelope_data()
|
|||
fromLine.AppendLiteral("To: ");
|
||||
nsAutoCString fakeFromLine(NS_LITERAL_CSTRING("From: "));
|
||||
fakeFromLine.Append(fServerConnection.GetImapUserName());
|
||||
fakeFromLine.Append(NS_LITERAL_CSTRING("@aol.com"));
|
||||
fakeFromLine.AppendLiteral("@aol.com");
|
||||
fServerConnection.HandleMessageDownLoadLine(fakeFromLine.get(), false);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -170,7 +170,7 @@ nsresult nsMailboxService::FetchMessage(const char* aMessageURI,
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
file->GetFileSize(&fileSize);
|
||||
uriString.Replace(0, 5, NS_LITERAL_CSTRING("mailbox:"));
|
||||
uriString.Append(NS_LITERAL_CSTRING("&number=0"));
|
||||
uriString.AppendLiteral("&number=0");
|
||||
rv = NS_NewURI(getter_AddRefs(url), uriString);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
|
|
@ -532,7 +532,7 @@ nsParseMailMessageState::nsParseMailMessageState()
|
|||
pPrefBranch->GetCharPref("mailnews.customDBHeaders", getter_Copies(customDBHeaders));
|
||||
ToLowerCase(customDBHeaders);
|
||||
if (customDBHeaders.Find("content-base") == -1)
|
||||
customDBHeaders.Insert(NS_LITERAL_CSTRING("content-base "), 0);
|
||||
customDBHeaders.InsertLiteral("content-base ", 0);
|
||||
ParseString(customDBHeaders, ' ', m_customDBHeaders);
|
||||
|
||||
// now add customHeaders
|
||||
|
|
|
@ -1617,7 +1617,7 @@ nsNntpService::Handle(nsICommandLine* aCmdLine)
|
|||
NS_IMETHODIMP
|
||||
nsNntpService::GetHelpInfo(nsACString& aResult)
|
||||
{
|
||||
aResult.Assign(NS_LITERAL_CSTRING(" -news Open the news client.\n"));
|
||||
aResult.AssignLiteral(" -news Open the news client.\n");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче