fixing code that relied on implicit string construction

This commit is contained in:
scc%mozilla.org 2000-09-02 21:26:17 +00:00
Родитель ed6a16cfde
Коммит 1ff3cc8a63
3 изменённых файлов: 10 добавлений и 10 удалений

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

@ -1248,7 +1248,7 @@ NS_IMETHODIMP mozXMLTermSession::AutoDetectMarkup(const nsString& aString,
OutputMarkupType newMarkupType = PLAIN_TEXT;
// Copy string and trim leading spaces/backspaces/tabs
nsAutoString str = aString;
nsAutoString str(aString);
str.Trim(kWhitespace, PR_TRUE, PR_FALSE);
@ -1372,7 +1372,7 @@ NS_IMETHODIMP mozXMLTermSession::InitStream(const nsString& streamURL,
}
// Initialize markup handling
nsCAutoString iframeName = "iframe";
nsCAutoString iframeName("iframe");
#if 0
iframeName.Append("t");
#else
@ -1606,7 +1606,7 @@ NS_IMETHODIMP mozXMLTermSession::ProcessOutput(const nsString& aString,
// Write complete lines to document stream
if (newline || streamOutput) {
nsAutoString str = aString;
nsAutoString str(aString);
if (newline)
str.AppendWithConversion("\n");
@ -2737,7 +2737,7 @@ NS_IMETHODIMP mozXMLTermSession::FlushOutput(FlushActionType flushAction)
if (mOutputDisplayNode != nsnull) {
// Update displayed PRE text
nsAutoString outString = mPreTextBuffered;
nsAutoString outString(mPreTextBuffered);
outString += mPreTextIncomplete;
// Increment total output line count for entry
@ -3869,7 +3869,7 @@ NS_IMETHODIMP mozXMLTermSession::NewIFrame(nsIDOMNode* parentNode,
XMLT_LOG(mozXMLTermSession::NewIFrame,80,("\n"));
#if 0
nsAutoString iframeFrag = "<iframe name='iframe";
nsAutoString iframeFrag("<iframe name='iframe");
iframeFrag.Append(number,10);
iframeFrag.Append("' frameborder=")
iframeFrag.Append(frameBorder,10);

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

@ -275,7 +275,7 @@ NS_IMETHODIMP mozXMLTermStream::Open(nsIDOMWindowInternal* aDOMWindow,
// Determine Class ID for viewing specified mimetype
nsCID classID;
static const char command[] = "view";
nsCAutoString progID = NS_DOCUMENT_LOADER_FACTORY_PROGID_PREFIX;
nsCAutoString progID(NS_DOCUMENT_LOADER_FACTORY_PROGID_PREFIX);
progID += command;
progID += "/";
progID += contentType;
@ -361,7 +361,7 @@ NS_IMETHODIMP mozXMLTermStream::Close(void)
return result;
nsresult status = NS_OK;
nsAutoString errorMsg = "";
nsAutoString errorMsg;
result = mStreamListener->OnStopRequest(mChannel, mContext,
status, errorMsg.GetUnicode());
if (NS_FAILED(result))

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

@ -360,7 +360,7 @@ NS_IMETHODIMP mozXMLTerminal::Activate(void)
#if 0
// TEMPORARY: Testing mozIXMLTermStream
nsAutoString streamData = "<HTML><HEAD><TITLE>Stream Title</TITLE>"
nsAutoString streamData( "<HTML><HEAD><TITLE>Stream Title</TITLE>"
"<SCRIPT language='JavaScript'>"
"function clik(){ dump('click\\n');return(false);}"
"</SCRIPT></HEAD>"
@ -368,7 +368,7 @@ NS_IMETHODIMP mozXMLTerminal::Activate(void)
"<SPAN STYLE='color: blue' onClick='return clik();'>Clik</SPAN></B><BR>"
"<TABLE WIDTH=720><TR><TD WIDTH=700 BGCOLOR=maroon>&nbsp;</TABLE>"
"<BR>ABCD<BR>EFGH<BR>JKLM<BR>"
"</BODY></HTML>";
"</BODY></HTML>" );
nsCOMPtr<mozIXMLTermStream> stream;
result = NS_NewXMLTermStream(getter_AddRefs(stream));
@ -673,7 +673,7 @@ NS_IMETHODIMP mozXMLTerminal::SendText(const nsString& aString,
if (!mLineTermAux)
return NS_ERROR_FAILURE;
nsAutoString sendStr = aString;
nsAutoString sendStr(aString);
// Preprocess string and check if it is to be consumed
PRBool consumed, checkSize;