Bug 104158: Use NS_LITERAL_STRING instead of XXXWithConversion("..."). r=bryner, rs=alecf

This commit is contained in:
jaggernaut@netscape.com
2001-12-16 11:58:03 +00:00
parent 4b49fbac36
commit 0467433db5
281 changed files with 1332 additions and 1301 deletions
+6 -5
View File
@@ -72,6 +72,7 @@
#include "nsHTMLTokenizer.h"
#include "nsHTMLEntities.h"
#include "nsIPref.h"
#include "nsUnicharUtils.h"
#include "COtherDTD.h"
#include "nsElementTable.h"
@@ -643,9 +644,9 @@ nsresult CViewSourceHTML::GenerateSummary() {
if(mErrorCount && mTagCount) {
mErrors.AppendWithConversion("\n\n ");
mErrors.Append(NS_LITERAL_STRING("\n\n "));
mErrors.AppendInt(mErrorCount);
mErrors.AppendWithConversion(" error(s) detected -- see highlighted portions.\n");
mErrors.Append(NS_LITERAL_STRING(" error(s) detected -- see highlighted portions.\n"));
result=WriteTag(mSummaryTag,mErrors,0,PR_FALSE);
}
@@ -1061,7 +1062,7 @@ void CViewSourceHTML::AddContainmentError(eHTMLTags aChildTag,eHTMLTags aParentT
mErrors.AppendWithConversion(theMsg);
}
else if(gErrorThreshold+1==mErrorCount){
mErrors.AppendWithConversion("\n -- Too many errors -- terminating output.");
mErrors.Append(NS_LITERAL_STRING("\n -- Too many errors -- terminating output."));
}
}
@@ -1218,10 +1219,10 @@ NS_IMETHODIMP CViewSourceHTML::HandleToken(CToken* aToken,nsIParser* aParser) {
{
nsAutoString theStr;
theStr.Assign(aToken->GetStringValue());
if(!theStr.EqualsWithConversion("XI",IGNORE_CASE)) {
if(Compare(theStr, NS_LITERAL_STRING("XI"), nsCaseInsensitiveStringComparator()) != 0) {
PRUnichar theChar=theStr.CharAt(0);
if((nsCRT::IsAsciiDigit(theChar)) || ('X'==theChar) || ('x'==theChar)){
theStr.InsertWithConversion("#", 0);
theStr.Assign(NS_LITERAL_STRING("#") + theStr);
}
}
result=WriteTag(mEntityTag,theStr,0,PR_FALSE);