From f96f0e0a1afc49717e008b0a89cbd8306a483603 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Wed, 2 Nov 2005 07:42:31 +0000 Subject: [PATCH] Bug 226439. Convert codebase to use AppendLiteral/AssignLiteral/LowerCaseEqualsLiteral. r+sr=darin --- content/xslt/src/base/txDouble.cpp | 4 ++-- content/xslt/src/xml/txNodeDefinition.cpp | 10 ++++----- content/xslt/src/xml/txXMLParser.cpp | 6 ++--- content/xslt/src/xpath/nsXPathNSResolver.cpp | 2 +- content/xslt/src/xpath/txAdditiveExpr.cpp | 8 +++---- content/xslt/src/xpath/txBooleanExpr.cpp | 8 +++---- content/xslt/src/xpath/txBooleanResult.cpp | 4 ++-- content/xslt/src/xpath/txFilterExpr.cpp | 2 +- content/xslt/src/xpath/txFunctionCall.cpp | 2 +- content/xslt/src/xpath/txLocationStep.cpp | 22 +++++++++---------- .../xslt/src/xpath/txMultiplicativeExpr.cpp | 10 ++++----- content/xslt/src/xpath/txNodeTypeTest.cpp | 2 +- content/xslt/src/xpath/txPathExpr.cpp | 2 +- content/xslt/src/xpath/txRelationalExpr.cpp | 6 ++--- content/xslt/src/xpath/txUnionExpr.cpp | 2 +- .../src/xslt/txFormatNumberFunctionCall.cpp | 8 +++---- content/xslt/src/xslt/txMozillaXMLOutput.cpp | 4 ++-- content/xslt/src/xslt/txOutputFormat.cpp | 16 +++++++------- .../xslt/txStandaloneStylesheetCompiler.cpp | 6 ++--- content/xslt/src/xslt/txXSLTNumber.cpp | 4 ++-- content/xslt/src/xslt/txXSLTPatterns.cpp | 22 +++++++++---------- 21 files changed, 75 insertions(+), 75 deletions(-) diff --git a/content/xslt/src/base/txDouble.cpp b/content/xslt/src/base/txDouble.cpp index 8813395b3f1..8fd9e0c4cd4 100644 --- a/content/xslt/src/base/txDouble.cpp +++ b/content/xslt/src/base/txDouble.cpp @@ -283,13 +283,13 @@ void Double::toString(double aValue, nsAString& aDest) // check for special cases if (isNaN(aValue)) { - aDest.Append(NS_LITERAL_STRING("NaN")); + aDest.AppendLiteral("NaN"); return; } if (isInfinite(aValue)) { if (aValue < 0) aDest.Append(PRUnichar('-')); - aDest.Append(NS_LITERAL_STRING("Infinity")); + aDest.AppendLiteral("Infinity"); return; } diff --git a/content/xslt/src/xml/txNodeDefinition.cpp b/content/xslt/src/xml/txNodeDefinition.cpp index 1e1999fc2e1..4fe62224463 100644 --- a/content/xslt/src/xml/txNodeDefinition.cpp +++ b/content/xslt/src/xml/txNodeDefinition.cpp @@ -65,27 +65,27 @@ NodeDefinition::NodeDefinition(NodeType aType, const nsAString& aValue, { case CDATA_SECTION_NODE: { - nodeName = NS_LITERAL_STRING("#cdata-section"); + nodeName.AssignLiteral("#cdata-section"); break; } case COMMENT_NODE: { - nodeName = NS_LITERAL_STRING("#comment"); + nodeName.AssignLiteral("#comment"); break; } case DOCUMENT_NODE: { - nodeName = NS_LITERAL_STRING("#document"); + nodeName.AssignLiteral("#document"); break; } case DOCUMENT_FRAGMENT_NODE: { - nodeName = NS_LITERAL_STRING("#document-fragment"); + nodeName.AssignLiteral("#document-fragment"); break; } case TEXT_NODE: { - nodeName = NS_LITERAL_STRING("#text"); + nodeName.AssignLiteral("#text"); break; } default: diff --git a/content/xslt/src/xml/txXMLParser.cpp b/content/xslt/src/xml/txXMLParser.cpp index 858d178c852..d453d519c6a 100644 --- a/content/xslt/src/xml/txXMLParser.cpp +++ b/content/xslt/src/xml/txXMLParser.cpp @@ -236,7 +236,7 @@ txXMLParser::parse(istream& aInputStream, const nsAString& aUri, mErrorString.Truncate(); *aResultDoc = nsnull; if (!aInputStream) { - mErrorString.Append(NS_LITERAL_STRING("unable to parse xml: invalid or unopen stream encountered.")); + mErrorString.AppendLiteral("unable to parse xml: invalid or unopen stream encountered."); return NS_ERROR_FAILURE; } mExpatParser = XML_ParserCreate(nsnull); @@ -427,9 +427,9 @@ txXMLParser::createErrorString() { XML_Error errCode = XML_GetErrorCode(mExpatParser); mErrorString.AppendWithConversion(XML_ErrorString(errCode)); - mErrorString.Append(NS_LITERAL_STRING(" at line ")); + mErrorString.AppendLiteral(" at line "); mErrorString.AppendInt(XML_GetCurrentLineNumber(mExpatParser)); - mErrorString.Append(NS_LITERAL_STRING(" in ")); + mErrorString.AppendLiteral(" in "); mErrorString.Append((const PRUnichar*)XML_GetBase(mExpatParser)); } #endif diff --git a/content/xslt/src/xpath/nsXPathNSResolver.cpp b/content/xslt/src/xpath/nsXPathNSResolver.cpp index 3aa982008fd..a38f583e0a4 100644 --- a/content/xslt/src/xpath/nsXPathNSResolver.cpp +++ b/content/xslt/src/xpath/nsXPathNSResolver.cpp @@ -63,7 +63,7 @@ nsXPathNSResolver::LookupNamespaceURI(const nsAString & aPrefix, nsAString & aResult) { if (aPrefix.EqualsLiteral("xml")) { - aResult = NS_LITERAL_STRING("http://www.w3.org/XML/1998/namespace"); + aResult.AssignLiteral("http://www.w3.org/XML/1998/namespace"); return NS_OK; } diff --git a/content/xslt/src/xpath/txAdditiveExpr.cpp b/content/xslt/src/xpath/txAdditiveExpr.cpp index e94c1ea325b..acf5b01d732 100644 --- a/content/xslt/src/xpath/txAdditiveExpr.cpp +++ b/content/xslt/src/xpath/txAdditiveExpr.cpp @@ -88,18 +88,18 @@ void AdditiveExpr::toString(nsAString& str) { if ( leftExpr ) leftExpr->toString(str); - else str.Append(NS_LITERAL_STRING("null")); + else str.AppendLiteral("null"); switch ( op ) { case SUBTRACTION: - str.Append(NS_LITERAL_STRING(" - ")); + str.AppendLiteral(" - "); break; default: - str.Append(NS_LITERAL_STRING(" + ")); + str.AppendLiteral(" + "); break; } if ( rightExpr ) rightExpr->toString(str); - else str.Append(NS_LITERAL_STRING("null")); + else str.AppendLiteral("null"); } #endif diff --git a/content/xslt/src/xpath/txBooleanExpr.cpp b/content/xslt/src/xpath/txBooleanExpr.cpp index 94755e80d65..841250bcb7c 100644 --- a/content/xslt/src/xpath/txBooleanExpr.cpp +++ b/content/xslt/src/xpath/txBooleanExpr.cpp @@ -90,18 +90,18 @@ void BooleanExpr::toString(nsAString& str) { if ( leftExpr ) leftExpr->toString(str); - else str.Append(NS_LITERAL_STRING("null")); + else str.AppendLiteral("null"); switch ( op ) { case OR: - str.Append(NS_LITERAL_STRING(" or ")); + str.AppendLiteral(" or "); break; default: - str.Append(NS_LITERAL_STRING(" and ")); + str.AppendLiteral(" and "); break; } if ( rightExpr ) rightExpr->toString(str); - else str.Append(NS_LITERAL_STRING("null")); + else str.AppendLiteral("null"); } #endif diff --git a/content/xslt/src/xpath/txBooleanResult.cpp b/content/xslt/src/xpath/txBooleanResult.cpp index 952a898ba15..c61df5d73db 100644 --- a/content/xslt/src/xpath/txBooleanResult.cpp +++ b/content/xslt/src/xpath/txBooleanResult.cpp @@ -61,8 +61,8 @@ short BooleanResult::getResultType() { } //-- getResultType void BooleanResult::stringValue(nsAString& str) { - if ( value ) str.Append(NS_LITERAL_STRING("true")); - else str.Append(NS_LITERAL_STRING("false")); + if ( value ) str.AppendLiteral("true"); + else str.AppendLiteral("false"); } //-- toString nsAString* diff --git a/content/xslt/src/xpath/txFilterExpr.cpp b/content/xslt/src/xpath/txFilterExpr.cpp index 5e8c0191f0c..109057fc5fd 100644 --- a/content/xslt/src/xpath/txFilterExpr.cpp +++ b/content/xslt/src/xpath/txFilterExpr.cpp @@ -91,7 +91,7 @@ void FilterExpr::toString(nsAString& str) { if ( expr ) expr->toString(str); - else str.Append(NS_LITERAL_STRING("null")); + else str.AppendLiteral("null"); PredicateList::toString(str); } #endif diff --git a/content/xslt/src/xpath/txFunctionCall.cpp b/content/xslt/src/xpath/txFunctionCall.cpp index 797e994dfe2..daf942e74d8 100644 --- a/content/xslt/src/xpath/txFunctionCall.cpp +++ b/content/xslt/src/xpath/txFunctionCall.cpp @@ -160,7 +160,7 @@ PRBool FunctionCall::requireParams(PRInt32 aParamCountMin, (aParamCountMax > -1 && argc > aParamCountMax)) { nsAutoString err(NS_LITERAL_STRING("invalid number of parameters for function")); #ifdef TX_TO_STRING - err.Append(NS_LITERAL_STRING(": ")); + err.AppendLiteral(": "); toString(err); #endif aContext->receiveError(err, NS_ERROR_XPATH_INVALID_ARG); diff --git a/content/xslt/src/xpath/txLocationStep.cpp b/content/xslt/src/xpath/txLocationStep.cpp index b4781645552..7e03f8dce49 100644 --- a/content/xslt/src/xpath/txLocationStep.cpp +++ b/content/xslt/src/xpath/txLocationStep.cpp @@ -282,40 +282,40 @@ LocationStep::toString(nsAString& str) { switch (mAxisIdentifier) { case ANCESTOR_AXIS : - str.Append(NS_LITERAL_STRING("ancestor::")); + str.AppendLiteral("ancestor::"); break; case ANCESTOR_OR_SELF_AXIS : - str.Append(NS_LITERAL_STRING("ancestor-or-self::")); + str.AppendLiteral("ancestor-or-self::"); break; case ATTRIBUTE_AXIS: str.Append(PRUnichar('@')); break; case DESCENDANT_AXIS: - str.Append(NS_LITERAL_STRING("descendant::")); + str.AppendLiteral("descendant::"); break; case DESCENDANT_OR_SELF_AXIS: - str.Append(NS_LITERAL_STRING("descendant-or-self::")); + str.AppendLiteral("descendant-or-self::"); break; case FOLLOWING_AXIS : - str.Append(NS_LITERAL_STRING("following::")); + str.AppendLiteral("following::"); break; case FOLLOWING_SIBLING_AXIS: - str.Append(NS_LITERAL_STRING("following-sibling::")); + str.AppendLiteral("following-sibling::"); break; case NAMESPACE_AXIS: - str.Append(NS_LITERAL_STRING("namespace::")); + str.AppendLiteral("namespace::"); break; case PARENT_AXIS : - str.Append(NS_LITERAL_STRING("parent::")); + str.AppendLiteral("parent::"); break; case PRECEDING_AXIS : - str.Append(NS_LITERAL_STRING("preceding::")); + str.AppendLiteral("preceding::"); break; case PRECEDING_SIBLING_AXIS : - str.Append(NS_LITERAL_STRING("preceding-sibling::")); + str.AppendLiteral("preceding-sibling::"); break; case SELF_AXIS : - str.Append(NS_LITERAL_STRING("self::")); + str.AppendLiteral("self::"); break; default: break; diff --git a/content/xslt/src/xpath/txMultiplicativeExpr.cpp b/content/xslt/src/xpath/txMultiplicativeExpr.cpp index 6beff6c3f10..570a89385d1 100644 --- a/content/xslt/src/xpath/txMultiplicativeExpr.cpp +++ b/content/xslt/src/xpath/txMultiplicativeExpr.cpp @@ -119,21 +119,21 @@ void MultiplicativeExpr::toString(nsAString& str) { if ( leftExpr ) leftExpr->toString(str); - else str.Append(NS_LITERAL_STRING("null")); + else str.AppendLiteral("null"); switch ( op ) { case DIVIDE: - str.Append(NS_LITERAL_STRING(" div ")); + str.AppendLiteral(" div "); break; case MODULUS: - str.Append(NS_LITERAL_STRING(" mod ")); + str.AppendLiteral(" mod "); break; default: - str.Append(NS_LITERAL_STRING(" * ")); + str.AppendLiteral(" * "); break; } if ( rightExpr ) rightExpr->toString(str); - else str.Append(NS_LITERAL_STRING("null")); + else str.AppendLiteral("null"); } #endif diff --git a/content/xslt/src/xpath/txNodeTypeTest.cpp b/content/xslt/src/xpath/txNodeTypeTest.cpp index 48877ef446b..1fa6201009c 100644 --- a/content/xslt/src/xpath/txNodeTypeTest.cpp +++ b/content/xslt/src/xpath/txNodeTypeTest.cpp @@ -106,7 +106,7 @@ txNodeTypeTest::toString(nsAString& aDest) aDest.Append(NS_LITERAL_STRING("text()")); break; case PI_TYPE: - aDest.Append(NS_LITERAL_STRING("processing-instruction(")); + aDest.AppendLiteral("processing-instruction("); if (mNodeName) { nsAutoString str; mNodeName->ToString(str); diff --git a/content/xslt/src/xpath/txPathExpr.cpp b/content/xslt/src/xpath/txPathExpr.cpp index a1fd07d2bec..ef7d58a6d16 100644 --- a/content/xslt/src/xpath/txPathExpr.cpp +++ b/content/xslt/src/xpath/txPathExpr.cpp @@ -234,7 +234,7 @@ PathExpr::toString(nsAString& dest) while ((pxi = (PathExprItem*)iter.next())) { switch (pxi->pathOp) { case DESCENDANT_OP: - dest.Append(NS_LITERAL_STRING("//")); + dest.AppendLiteral("//"); break; case RELATIVE_OP: dest.Append(PRUnichar('/')); diff --git a/content/xslt/src/xpath/txRelationalExpr.cpp b/content/xslt/src/xpath/txRelationalExpr.cpp index b563c934c4d..e4fc1b96b33 100644 --- a/content/xslt/src/xpath/txRelationalExpr.cpp +++ b/content/xslt/src/xpath/txRelationalExpr.cpp @@ -213,19 +213,19 @@ RelationalExpr::toString(nsAString& str) switch (mOp) { case NOT_EQUAL: - str.Append(NS_LITERAL_STRING("!=")); + str.AppendLiteral("!="); break; case LESS_THAN: str.Append(PRUnichar('<')); break; case LESS_OR_EQUAL: - str.Append(NS_LITERAL_STRING("<=")); + str.AppendLiteral("<="); break; case GREATER_THAN : str.Append(PRUnichar('>')); break; case GREATER_OR_EQUAL: - str.Append(NS_LITERAL_STRING(">=")); + str.AppendLiteral(">="); break; default: str.Append(PRUnichar('=')); diff --git a/content/xslt/src/xpath/txUnionExpr.cpp b/content/xslt/src/xpath/txUnionExpr.cpp index 2b044b8a891..7029e1a0c5f 100644 --- a/content/xslt/src/xpath/txUnionExpr.cpp +++ b/content/xslt/src/xpath/txUnionExpr.cpp @@ -135,7 +135,7 @@ UnionExpr::toString(nsAString& dest) while (iter.hasNext()) { //-- set operator if (count > 0) - dest.Append(NS_LITERAL_STRING(" | ")); + dest.AppendLiteral(" | "); ((Expr*)iter.next())->toString(dest); ++count; } diff --git a/content/xslt/src/xslt/txFormatNumberFunctionCall.cpp b/content/xslt/src/xslt/txFormatNumberFunctionCall.cpp index d55fcd035ad..83d12c65e64 100644 --- a/content/xslt/src/xslt/txFormatNumberFunctionCall.cpp +++ b/content/xslt/src/xslt/txFormatNumberFunctionCall.cpp @@ -102,7 +102,7 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext, if (!format) { nsAutoString err(NS_LITERAL_STRING("unknown decimal format")); #ifdef TX_TO_STRING - err.Append(NS_LITERAL_STRING(" for: ")); + err.AppendLiteral(" for: "); toString(err); #endif aContext->receiveError(err, NS_ERROR_XPATH_INVALID_ARG); @@ -177,7 +177,7 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext, else { nsAutoString err(INVALID_PARAM_VALUE); #ifdef TX_TO_STRING - err.Append(NS_LITERAL_STRING(": ")); + err.AppendLiteral(": "); toString(err); #endif aContext->receiveError(err, @@ -191,7 +191,7 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext, else { nsAutoString err(INVALID_PARAM_VALUE); #ifdef TX_TO_STRING - err.Append(NS_LITERAL_STRING(": ")); + err.AppendLiteral(": "); toString(err); #endif aContext->receiveError(err, @@ -279,7 +279,7 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext, groupSize == 0) { nsAutoString err(INVALID_PARAM_VALUE); #ifdef TX_TO_STRING - err.Append(NS_LITERAL_STRING(": ")); + err.AppendLiteral(": "); toString(err); #endif aContext->receiveError(err, NS_ERROR_XPATH_INVALID_ARG); diff --git a/content/xslt/src/xslt/txMozillaXMLOutput.cpp b/content/xslt/src/xslt/txMozillaXMLOutput.cpp index bf6e2a39b39..3cbce6fc780 100644 --- a/content/xslt/src/xslt/txMozillaXMLOutput.cpp +++ b/content/xslt/src/xslt/txMozillaXMLOutput.cpp @@ -585,7 +585,7 @@ void txMozillaXMLOutput::startHTMLElement(nsIDOMElement* aElement, PRBool aXHTML NS_ASSERTION(NS_SUCCEEDED(rv), "Can't set http-equiv on meta"); nsAutoString metacontent; metacontent.Append(mOutputFormat.mMediaType); - metacontent.Append(NS_LITERAL_STRING("; charset=")); + metacontent.AppendLiteral("; charset="); metacontent.Append(mOutputFormat.mEncoding); rv = meta->SetAttribute(NS_LITERAL_STRING("content"), metacontent); @@ -770,7 +770,7 @@ txMozillaXMLOutput::createResultDocument(const nsAString& aName, PRInt32 aNsID, NS_ENSURE_SUCCESS(rv, rv); nsAutoString qName; if (mOutputFormat.mMethod == eHTMLOutput) { - qName.Assign(NS_LITERAL_STRING("html")); + qName.AssignLiteral("html"); } else { qName.Assign(aName); diff --git a/content/xslt/src/xslt/txOutputFormat.cpp b/content/xslt/src/xslt/txOutputFormat.cpp index fb7693e42a2..afedacf6bb5 100644 --- a/content/xslt/src/xslt/txOutputFormat.cpp +++ b/content/xslt/src/xslt/txOutputFormat.cpp @@ -118,10 +118,10 @@ void txOutputFormat::setFromDefaults() case eXMLOutput: { if (mVersion.IsEmpty()) - mVersion.Append(NS_LITERAL_STRING("1.0")); + mVersion.AppendLiteral("1.0"); if (mEncoding.IsEmpty()) - mEncoding.Append(NS_LITERAL_STRING("UTF-8")); + mEncoding.AppendLiteral("UTF-8"); if (mOmitXMLDeclaration == eNotSet) mOmitXMLDeclaration = eFalse; @@ -130,33 +130,33 @@ void txOutputFormat::setFromDefaults() mIndent = eFalse; if (mMediaType.IsEmpty()) - mMediaType.Append(NS_LITERAL_STRING("text/xml")); + mMediaType.AppendLiteral("text/xml"); break; } case eHTMLOutput: { if (mVersion.IsEmpty()) - mVersion.Append(NS_LITERAL_STRING("4.0")); + mVersion.AppendLiteral("4.0"); if (mEncoding.IsEmpty()) - mEncoding.Append(NS_LITERAL_STRING("UTF-8")); + mEncoding.AppendLiteral("UTF-8"); if (mIndent == eNotSet) mIndent = eTrue; if (mMediaType.IsEmpty()) - mMediaType.Append(NS_LITERAL_STRING("text/html")); + mMediaType.AppendLiteral("text/html"); break; } case eTextOutput: { if (mEncoding.IsEmpty()) - mEncoding.Append(NS_LITERAL_STRING("UTF-8")); + mEncoding.AppendLiteral("UTF-8"); if (mMediaType.IsEmpty()) - mMediaType.Append(NS_LITERAL_STRING("text/plain")); + mMediaType.AppendLiteral("text/plain"); break; } diff --git a/content/xslt/src/xslt/txStandaloneStylesheetCompiler.cpp b/content/xslt/src/xslt/txStandaloneStylesheetCompiler.cpp index 96bd830b051..31127f367d3 100644 --- a/content/xslt/src/xslt/txStandaloneStylesheetCompiler.cpp +++ b/content/xslt/src/xslt/txStandaloneStylesheetCompiler.cpp @@ -171,7 +171,7 @@ txDriver::parse(istream& aInputStream, const nsAString& aUri) { mErrorString.Truncate(); if (!aInputStream) { - mErrorString.Append(NS_LITERAL_STRING("unable to parse xml: invalid or unopen stream encountered.")); + mErrorString.AppendLiteral("unable to parse xml: invalid or unopen stream encountered."); return NS_ERROR_FAILURE; } mExpatParser = XML_ParserCreate(nsnull); @@ -318,9 +318,9 @@ txDriver::createErrorString() { XML_Error errCode = XML_GetErrorCode(mExpatParser); mErrorString.AppendWithConversion(XML_ErrorString(errCode)); - mErrorString.Append(NS_LITERAL_STRING(" at line ")); + mErrorString.AppendLiteral(" at line "); mErrorString.AppendInt(XML_GetCurrentLineNumber(mExpatParser)); - mErrorString.Append(NS_LITERAL_STRING(" in ")); + mErrorString.AppendLiteral(" in "); mErrorString.Append((const PRUnichar*)XML_GetBase(mExpatParser)); } diff --git a/content/xslt/src/xslt/txXSLTNumber.cpp b/content/xslt/src/xslt/txXSLTNumber.cpp index efc128e2eae..751b8f06996 100644 --- a/content/xslt/src/xslt/txXSLTNumber.cpp +++ b/content/xslt/src/xslt/txXSLTNumber.cpp @@ -361,7 +361,7 @@ txXSLTNumber::getCounters(Expr* aGroupSize, Expr* aGroupSeparator, groupSeparator, defaultCounter); NS_ENSURE_SUCCESS(rv, rv); - defaultCounter->mSeparator = NS_LITERAL_STRING("."); + defaultCounter->mSeparator.AssignLiteral("."); rv = aCounters.add(defaultCounter); if (NS_FAILED(rv)) { // XXX ErrorReport: out of memory @@ -380,7 +380,7 @@ txXSLTNumber::getCounters(Expr* aGroupSize, Expr* aGroupSeparator, // there is only one formatting token and we're formatting a // value-list longer then one we use the default separator. This // won't be used when formatting the first value anyway. - sepToken = NS_LITERAL_STRING("."); + sepToken.AssignLiteral("."); } else { while (formatPos < formatLen && diff --git a/content/xslt/src/xslt/txXSLTPatterns.cpp b/content/xslt/src/xslt/txXSLTPatterns.cpp index f5f64c65b22..fd014db4ee7 100644 --- a/content/xslt/src/xslt/txXSLTPatterns.cpp +++ b/content/xslt/src/xslt/txXSLTPatterns.cpp @@ -134,13 +134,13 @@ void txUnionPattern::toString(nsAString& aDest) { #ifdef DEBUG - aDest.Append(NS_LITERAL_STRING("txUnionPattern{")); + aDest.AppendLiteral("txUnionPattern{"); #endif txListIterator iter(&mLocPathPatterns); if (iter.hasNext()) ((txPattern*)iter.next())->toString(aDest); while (iter.hasNext()) { - aDest.Append(NS_LITERAL_STRING(" | ")); + aDest.AppendLiteral(" | "); ((txPattern*)iter.next())->toString(aDest); } #ifdef DEBUG @@ -260,7 +260,7 @@ txLocPathPattern::toString(nsAString& aDest) { txListIterator iter(&mSteps); #ifdef DEBUG - aDest.Append(NS_LITERAL_STRING("txLocPathPattern{")); + aDest.AppendLiteral("txLocPathPattern{"); #endif Step* step; step = (Step*)iter.next(); @@ -271,7 +271,7 @@ txLocPathPattern::toString(nsAString& aDest) if (step->isChild) aDest.Append(PRUnichar('/')); else - aDest.Append(NS_LITERAL_STRING("//")); + aDest.AppendLiteral("//"); step->pattern->toString(aDest); } #ifdef DEBUG @@ -305,7 +305,7 @@ void txRootPattern::toString(nsAString& aDest) { #ifdef DEBUG - aDest.Append(NS_LITERAL_STRING("txRootPattern{")); + aDest.AppendLiteral("txRootPattern{"); #endif if (mSerialize) aDest.Append(PRUnichar('/')); @@ -388,9 +388,9 @@ void txIdPattern::toString(nsAString& aDest) { #ifdef DEBUG - aDest.Append(NS_LITERAL_STRING("txIdPattern{")); + aDest.AppendLiteral("txIdPattern{"); #endif - aDest.Append(NS_LITERAL_STRING("id('")); + aDest.AppendLiteral("id('"); PRUint32 k, count = mIds.Count() - 1; for (k = 0; k < count; ++k) { aDest.Append(*mIds[k]); @@ -441,9 +441,9 @@ void txKeyPattern::toString(nsAString& aDest) { #ifdef DEBUG - aDest.Append(NS_LITERAL_STRING("txKeyPattern{")); + aDest.AppendLiteral("txKeyPattern{"); #endif - aDest.Append(NS_LITERAL_STRING("key('")); + aDest.AppendLiteral("key('"); nsAutoString tmp; if (mPrefix) { mPrefix->ToString(tmp); @@ -452,7 +452,7 @@ txKeyPattern::toString(nsAString& aDest) } mName.mLocalName->ToString(tmp); aDest.Append(tmp); - aDest.Append(NS_LITERAL_STRING(", ")); + aDest.AppendLiteral(", "); aDest.Append(mValue); aDest.Append(NS_LITERAL_STRING("')")); #ifdef DEBUG @@ -590,7 +590,7 @@ void txStepPattern::toString(nsAString& aDest) { #ifdef DEBUG - aDest.Append(NS_LITERAL_STRING("txStepPattern{")); + aDest.AppendLiteral("txStepPattern{"); #endif if (mIsAttr) aDest.Append(PRUnichar('@'));