зеркало из https://github.com/mozilla/pjs.git
fixing code that relied on implicit string construction
This commit is contained in:
Родитель
ed6a16cfde
Коммит
1ff3cc8a63
|
@ -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> </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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче