making string conversions explicit

git-svn-id: svn://10.0.0.236/trunk@66097 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scc%netscape.com
2000-04-15 18:48:07 +00:00
parent 4826209b80
commit 3466d240d3
12 changed files with 34 additions and 34 deletions

View File

@@ -987,7 +987,7 @@ nsresult nsObserverTopic::Notify(eHTMLTags aTag,nsIParserNode& aNode,void* aUniq
mKeys.Push((PRUnichar*)mSourceKey.GetUnicode());
intValue.Append(PRInt32(theCharsetSource),10);
intValue.AppendInt(PRInt32(theCharsetSource),10);
mValues.Push((PRUnichar*)intValue.GetUnicode());
mKeys.Push((PRUnichar*)mDTDKey.GetUnicode());

View File

@@ -299,9 +299,9 @@ CreateErrorText(const nsParserError* aError, nsString& aErrorString)
if (aError) {
aErrorString.Append(aError->description);
aErrorString.AppendWithConversion("\nLine Number ");
aErrorString.AppendWithConversion(aError->lineNumber, 10);
aErrorString.AppendInt(aError->lineNumber, 10);
aErrorString.AppendWithConversion(", Column ");
aErrorString.AppendWithConversion(aError->colNumber, 10);
aErrorString.AppendInt(aError->colNumber, 10);
aErrorString.AppendWithConversion(":");
}

View File

@@ -364,7 +364,7 @@ void nsHTMLContentSinkStream::Write(char aData)
}
if (mString)
{
mString->Append(aData);
mString->AppendWithConversion(aData);
}
}

View File

@@ -540,17 +540,17 @@ nsHTMLToTXTSinkStream::OpenContainer(const nsIParserNode& aNode)
{
if (mOLStackIndex > 0)
// This is what nsBulletFrame does for OLs:
mInIndentString.AppendWithConversion(mOLStack[mOLStackIndex-1]++, 10);
mInIndentString.AppendInt(mOLStack[mOLStackIndex-1]++, 10);
else
mInIndentString.AppendWithConversion("#");
mInIndentString.Append('.');
mInIndentString.AppendWithConversion('.');
}
else
mInIndentString.Append('*');
mInIndentString.AppendWithConversion('*');
mInIndentString.Append(' ');
mInIndentString.AppendWithConversion(' ');
}
else if (type == eHTMLTag_blockquote)
{
@@ -816,7 +816,7 @@ nsHTMLToTXTSinkStream::AddLeaf(const nsIParserNode& aNode)
nsAutoString line;
PRUint32 width = (mWrapColumn > 0 ? mWrapColumn : 25);
while (line.Length() < width)
line += '-';
line.AppendWithConversion('-');
Write(line);
EnsureVerticalSpace(0);
@@ -957,7 +957,7 @@ nsHTMLToTXTSinkStream::AddToLine(const PRUnichar * aLineFragment, PRInt32 aLineF
// Space stuffing a la RFC 2646 if this will be used in a mail,
// but how can I know that??? Now space stuffing is done always
// when formatting text as HTML and that is wrong! XXX: Fix this!
mCurrentLine.Append(' ');
mCurrentLine.AppendWithConversion(' ');
}
}
mEmptyLines=-1;
@@ -1008,7 +1008,7 @@ nsHTMLToTXTSinkStream::AddToLine(const PRUnichar * aLineFragment, PRInt32 aLineF
// Space stuffing a la RFC 2646 if this will be used in a mail,
// but how can I know that??? Now space stuffing is done always
// when formatting text as HTML and that is wrong! XXX: Fix this!
mCurrentLine.Append(' ');
mCurrentLine.AppendWithConversion(' ');
}
}
mCurrentLine.Append(restOfLine);
@@ -1039,7 +1039,7 @@ nsHTMLToTXTSinkStream::EndLine(PRBool softlinebreak)
mCurrentLine.SetLength(mCurrentLine.Length()-1);
if(mFlags & nsIDocumentEncoder::OutputFormatFlowed) {
// Add the soft part of the soft linebreak (RFC 2646 4.1)
mCurrentLine.Append(' ');
mCurrentLine.AppendWithConversion(' ');
}
mCurrentLine.AppendWithConversion(NS_LINEBREAK);
WriteSimple(mCurrentLine);
@@ -1074,9 +1074,9 @@ nsHTMLToTXTSinkStream::WriteQuotesAndIndent()
if (mCiteQuoteLevel>0) {
nsAutoString quotes;
for(int i=0; i<mCiteQuoteLevel; i++) {
quotes.Append('>');
quotes.AppendWithConversion('>');
}
quotes.Append(' ');
quotes.AppendWithConversion(' ');
WriteSimple(quotes);
mColPos += (mCiteQuoteLevel+1);
}
@@ -1086,7 +1086,7 @@ nsHTMLToTXTSinkStream::WriteQuotesAndIndent()
if (indentwidth > 0) {
nsAutoString spaces;
for (int i=0; i<indentwidth; ++i)
spaces.Append(' ');
spaces.AppendWithConversion(' ');
WriteSimple(spaces);
mColPos += indentwidth;
}

View File

@@ -517,7 +517,7 @@ nsLoggingSink::QuoteText(const nsString& aValue, nsString& aResult)
}
else if ((ch < 32) || (ch >= 127)) {
aResult.AppendWithConversion("&#");
aResult.AppendWithConversion(PRInt32(ch), 10);
aResult.AppendInt(PRInt32(ch), 10);
aResult.AppendWithConversion(';');
}
else {

View File

@@ -1432,7 +1432,7 @@ void nsXIFDTD::ProcessEntityTag(const nsIParserNode& aNode)
nsAutoString value;
if (GetAttribute(aNode,NS_ConvertToString("value"),value)) {
value+=';';
value.AppendWithConversion(';');
CEntityToken* entity = new CEntityToken(value);
nsCParserNode node((CToken*)entity);
mSink->AddLeaf(node);