зеркало из https://github.com/mozilla/gecko-dev.git
small changes to clients of string converting APIs
This commit is contained in:
Родитель
b72f57a93d
Коммит
920db6e464
|
@ -432,7 +432,7 @@ mime_generate_headers (nsMsgCompFields *fields,
|
|||
nsXPIDLString userAgentString;
|
||||
nsCAutoString cStr;
|
||||
pHTTPHandler->GetUserAgent(getter_Copies(userAgentString));
|
||||
cStr = userAgentString;
|
||||
cStr.Assign(userAgentString);
|
||||
|
||||
if (!cStr.IsEmpty())
|
||||
{
|
||||
|
@ -1886,7 +1886,7 @@ nsMsgGetExtensionFromFileURL(nsString aUrl)
|
|||
char *rightDot = nsnull;
|
||||
char *rightSlash = nsnull;
|
||||
|
||||
if (aUrl == "")
|
||||
if (aUrl.IsEmpty())
|
||||
return nsnull;
|
||||
|
||||
url = aUrl.ToNewCString();
|
||||
|
@ -1936,7 +1936,7 @@ ConvertBufToPlainText(nsString &aConBuf)
|
|||
nsString convertedText;
|
||||
nsIParser *parser;
|
||||
|
||||
if (aConBuf == "")
|
||||
if (aConBuf.IsEmpty())
|
||||
return NS_OK;
|
||||
|
||||
static NS_DEFINE_IID(kCParserIID, NS_IPARSER_IID);
|
||||
|
|
|
@ -248,7 +248,7 @@ nsresult nsMsgCompose::ConvertAndLoadComposeWindow(nsIEditorShell *aEditorShell,
|
|||
|
||||
if (!aBuf.IsEmpty())
|
||||
{
|
||||
if (mCiteReference != "")
|
||||
if (!mCiteReference.IsEmpty())
|
||||
aEditorShell->InsertAsCitedQuotation(aBuf.GetUnicode(), mCiteReference.GetUnicode(),
|
||||
PR_TRUE,
|
||||
nsString("UTF-8").GetUnicode(), getter_AddRefs(nodeInserted));
|
||||
|
@ -534,7 +534,7 @@ nsresult nsMsgCompose::_SendMsg(MSG_DeliverMode deliverMode,
|
|||
char *outCString;
|
||||
nsString aCharset = m_compFields->GetCharacterSet();
|
||||
|
||||
if ( aCharset != "")
|
||||
if ( !aCharset.IsEmpty() )
|
||||
{
|
||||
// Apply entity conversion then convert to a mail charset.
|
||||
char charset[65];
|
||||
|
@ -1209,7 +1209,7 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIChannel *aChannel, n
|
|||
MSG_ComposeType type = mComposeObj->GetMessageType();
|
||||
|
||||
// Assign cite information if available...
|
||||
if (mCiteReference != "")
|
||||
if (!mCiteReference.IsEmpty())
|
||||
mComposeObj->mCiteReference = mCiteReference;
|
||||
|
||||
if (mHeaders && (type == nsIMsgCompType::Reply || type == nsIMsgCompType::ReplyAll ||
|
||||
|
@ -1984,7 +1984,7 @@ nsMsgCompose::ProcessSignature(nsIMsgIdentity *identity, nsString *aMsgBody)
|
|||
//
|
||||
char *htmlBreak = "<BR>";
|
||||
char *dashes = "--";
|
||||
if (sigData != "")
|
||||
if (!sigData.IsEmpty())
|
||||
{
|
||||
if (m_composeHTML)
|
||||
{
|
||||
|
@ -2280,7 +2280,7 @@ nsresult nsMsgCompose::GetNoHtmlRecipients(const PRUnichar *recipients, PRUnicha
|
|||
if (! recipientStr.IsEmpty())
|
||||
recipientStr += ',';
|
||||
noHTMLArray->StringAt(i, getter_Copies(emailAddr));
|
||||
recipientStr += emailAddr;
|
||||
recipientStr.Append(emailAddr);
|
||||
}
|
||||
//Remaining recipients which do not have an entry in the AB are considered as non HTML compliant
|
||||
array->GetCount(&nbrRecipients);
|
||||
|
@ -2289,7 +2289,7 @@ nsresult nsMsgCompose::GetNoHtmlRecipients(const PRUnichar *recipients, PRUnicha
|
|||
if (! recipientStr.IsEmpty())
|
||||
recipientStr += ',';
|
||||
array->StringAt(i, getter_Copies(emailAddr));
|
||||
recipientStr += emailAddr;
|
||||
recipientStr.Append(emailAddr);
|
||||
}
|
||||
*_retval = recipientStr.ToNewUnicode();
|
||||
|
||||
|
|
|
@ -1270,7 +1270,7 @@ nsMsgComposeAndSend::GetBodyFromEditor()
|
|||
char *outCString;
|
||||
nsString aCharset = mCompFields->GetCharacterSet();
|
||||
|
||||
if (aCharset != "")
|
||||
if (!aCharset.IsEmpty())
|
||||
{
|
||||
// Convert to entities.
|
||||
// If later Editor generates entities then we can remove this.
|
||||
|
|
|
@ -831,7 +831,7 @@ PRInt32 nsSmtpProtocol::AuthLoginUsername()
|
|||
if (!TestFlag(SMTP_USE_LOGIN_REDIRECTION))
|
||||
{
|
||||
rv = GetPassword(getter_Copies(origPassword));
|
||||
password = origPassword;
|
||||
password.Assign(origPassword);
|
||||
if (password.IsEmpty())
|
||||
return NS_ERROR_SMTP_PASSWORD_UNDEFINED;
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ nsSmtpServer::GetServerURI(char **aResult)
|
|||
nsEscape(username, url_XAlphas);
|
||||
// nsEscape(username, url_Path);
|
||||
// not all servers have a username
|
||||
uri += escapedUsername;
|
||||
uri.Append(escapedUsername);
|
||||
uri += '@';
|
||||
}
|
||||
|
||||
|
@ -285,7 +285,7 @@ nsSmtpServer::GetServerURI(char **aResult)
|
|||
*((char **)getter_Copies(escapedHostname)) =
|
||||
nsEscape(hostname, url_Path);
|
||||
// not all servers have a hostname
|
||||
uri += escapedHostname;
|
||||
uri.Append(escapedHostname);
|
||||
}
|
||||
|
||||
*aResult = uri.ToNewCString();
|
||||
|
|
|
@ -223,7 +223,7 @@ nsresult nsMailtoUrl::ParseUrl()
|
|||
nsXPIDLCString aPath;
|
||||
m_baseURL->GetPath(getter_Copies(aPath));
|
||||
if (aPath)
|
||||
m_toPart = aPath;
|
||||
m_toPart.Assign(aPath);
|
||||
|
||||
PRInt32 startOfSearchPart = m_toPart.FindChar('?');
|
||||
if (startOfSearchPart > 0)
|
||||
|
|
Загрузка…
Ссылка в новой задаче