From 9ab54454e8eb83687e2bd9d2896767651ac1a193 Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Wed, 21 Jul 2004 20:18:39 +0000 Subject: [PATCH] Bug 113243 Get rid of (Compare|Equals)WithConversion r+sr=roc git-svn-id: svn://10.0.0.236/trunk@159612 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsAttrValue.cpp | 2 +- .../extensions/xmlterm/base/mozXMLTermSession.cpp | 12 ++++++------ mozilla/gfx/src/beos/nsDeviceContextSpecB.cpp | 2 +- mozilla/java/dom/jni/org_mozilla_dom_NodeImpl.cpp | 8 ++++---- mozilla/layout/base/nsPresShell.cpp | 4 ++-- mozilla/layout/html/base/src/nsPresShell.cpp | 4 ++-- mozilla/parser/htmlparser/src/nsHTMLEntities.cpp | 2 +- .../search/src/nsInternetSearchService.cpp | 14 +++++++------- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/mozilla/content/base/src/nsAttrValue.cpp b/mozilla/content/base/src/nsAttrValue.cpp index fc87020dbc4..b6d595f7aef 100644 --- a/mozilla/content/base/src/nsAttrValue.cpp +++ b/mozilla/content/base/src/nsAttrValue.cpp @@ -745,7 +745,7 @@ nsAttrValue::ParseEnumValue(const nsAString& aValue, nsAutoString val(aValue); while (aTable->tag) { - if (aCaseSensitive ? val.EqualsWithConversion(aTable->tag) : + if (aCaseSensitive ? val.EqualsASCII(aTable->tag) : val.EqualsIgnoreCase(aTable->tag)) { SetIntValueAndType(aTable->value, eEnum); diff --git a/mozilla/extensions/xmlterm/base/mozXMLTermSession.cpp b/mozilla/extensions/xmlterm/base/mozXMLTermSession.cpp index f85ed55cd28..6c2ca97740d 100644 --- a/mozilla/extensions/xmlterm/base/mozXMLTermSession.cpp +++ b/mozilla/extensions/xmlterm/base/mozXMLTermSession.cpp @@ -878,7 +878,7 @@ NS_IMETHODIMP mozXMLTermSession::ReadAll(mozILineTermAux* lineTermAux, PRInt32 j; for (j=NO_META_COMMAND+1; j divNode, textNode; nsAutoString tagName(NS_LITERAL_STRING("div")); @@ -1892,7 +1892,7 @@ NS_IMETHODIMP mozXMLTermSession::LimitOutputLines(PRBool deleteAllOld) } else { - if (attValue.EqualsWithConversion(sessionElementNames[MIXED_ELEMENT])) { + if (attValue.EqualsASCII(sessionElementNames[MIXED_ELEMENT])) { // Delete single line containing mixed style output deleteNode = 1; decrementedLineCount = 1; @@ -1900,9 +1900,9 @@ NS_IMETHODIMP mozXMLTermSession::LimitOutputLines(PRBool deleteAllOld) XMLT_LOG(mozXMLTermSession::LimitOutputLines,79, ("deleted mixed line\n")); - } else if ( (attValue.EqualsWithConversion(sessionElementNames[STDIN_ELEMENT])) || - (attValue.EqualsWithConversion(sessionElementNames[STDOUT_ELEMENT])) || - (attValue.EqualsWithConversion(sessionElementNames[STDERR_ELEMENT]))) { + } else if ( (attValue.EqualsASCII(sessionElementNames[STDIN_ELEMENT])) || + (attValue.EqualsASCII(sessionElementNames[STDOUT_ELEMENT])) || + (attValue.EqualsASCII(sessionElementNames[STDERR_ELEMENT]))) { // Delete first line from STDIN/STDOUT/STDERR PRE output nsCOMPtr textNode; diff --git a/mozilla/gfx/src/beos/nsDeviceContextSpecB.cpp b/mozilla/gfx/src/beos/nsDeviceContextSpecB.cpp index 124c32a2a98..45ebbe3772d 100644 --- a/mozilla/gfx/src/beos/nsDeviceContextSpecB.cpp +++ b/mozilla/gfx/src/beos/nsDeviceContextSpecB.cpp @@ -257,7 +257,7 @@ NS_IMETHODIMP nsDeviceContextSpecBeOS::Init(nsIPrintSettings* aPS) #ifdef NOT_IMPLEMENTED_YET if (mGlobalNumPrinters) { for(int i = 0; (i < mGlobalNumPrinters) && !mQueue; i++) { - if (!(mGlobalPrinterList->StringAt(i)->CompareWithConversion(mPrData.printer, TRUE, -1))) + if (!(mGlobalPrinterList->StringAt(i)->EqualsIgnoreCase(mPrData.printer))) mQueue = PrnDlg.SetPrinterQueue(i); } } diff --git a/mozilla/java/dom/jni/org_mozilla_dom_NodeImpl.cpp b/mozilla/java/dom/jni/org_mozilla_dom_NodeImpl.cpp index 03a089b3999..d66fdb81349 100644 --- a/mozilla/java/dom/jni/org_mozilla_dom_NodeImpl.cpp +++ b/mozilla/java/dom/jni/org_mozilla_dom_NodeImpl.cpp @@ -690,8 +690,8 @@ JNIEXPORT jstring JNICALL Java_org_mozilla_dom_NodeImpl_getNodeValue nsAutoString typeStr; PRBool isChecked; if (NS_SUCCEEDED(rv = input->GetType(typeStr))) { - if (0 == typeStr.CompareWithConversion("radio", PR_TRUE) || - 0 == typeStr.CompareWithConversion("checkbox", PR_TRUE)) { + if (0 == typeStr.LowerCaseEqualsLiteral("radio", PR_TRUE) || + 0 == typeStr.LowerCaseEqualsLiteral("checkbox", PR_TRUE)) { if (NS_SUCCEEDED(rv = input->GetChecked(&isChecked))) { if (isChecked) { ret.AssignWithConversion("CHECKED"); @@ -1024,8 +1024,8 @@ JNIEXPORT void JNICALL Java_org_mozilla_dom_NodeImpl_setNodeValue nsString val; if (NS_SUCCEEDED(rv = input->GetType(typeStr))) { - if (0 == typeStr.CompareWithConversion("radio", PR_TRUE) || - 0 == typeStr.CompareWithConversion("checkbox", PR_TRUE)) { + if (0 == typeStr.LowerCaseEqualsLiteral("radio", PR_TRUE) || + 0 == typeStr.LowerCaseEqualsLiteral("checkbox", PR_TRUE)) { val = *value; if (0 == val.Length()) { input->SetChecked(PR_FALSE); diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index d84b7ea8583..c015b49fb47 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -7502,7 +7502,7 @@ void ReflowCountMgr::Add(const char * aName, nsReflowReason aType, nsIFrame * aF PL_HashTableAdd(mIndiFrameCounts, key, counter); } // this eliminates extra counts from super classes - if (counter != nsnull && counter->mName.EqualsWithConversion(aName)) { + if (counter != nsnull && counter->mName.EqualsASCII(aName)) { counter->mCount++; counter->mCounter.Add(aType, 1); } @@ -7522,7 +7522,7 @@ void ReflowCountMgr::PaintCount(const char * aName, char * key = new char[16]; sprintf(key, "%p", (void*)aFrame); IndiReflowCounter * counter = (IndiReflowCounter *)PL_HashTableLookup(mIndiFrameCounts, key); - if (counter != nsnull && counter->mName.EqualsWithConversion(aName)) { + if (counter != nsnull && counter->mName.EqualsASCII(aName)) { aRenderingContext->PushState(); nsFont font("Times", NS_FONT_STYLE_NORMAL,NS_FONT_VARIANT_NORMAL, NS_FONT_WEIGHT_NORMAL,0,NSIntPointsToTwips(8)); diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index d84b7ea8583..c015b49fb47 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -7502,7 +7502,7 @@ void ReflowCountMgr::Add(const char * aName, nsReflowReason aType, nsIFrame * aF PL_HashTableAdd(mIndiFrameCounts, key, counter); } // this eliminates extra counts from super classes - if (counter != nsnull && counter->mName.EqualsWithConversion(aName)) { + if (counter != nsnull && counter->mName.EqualsASCII(aName)) { counter->mCount++; counter->mCounter.Add(aType, 1); } @@ -7522,7 +7522,7 @@ void ReflowCountMgr::PaintCount(const char * aName, char * key = new char[16]; sprintf(key, "%p", (void*)aFrame); IndiReflowCounter * counter = (IndiReflowCounter *)PL_HashTableLookup(mIndiFrameCounts, key); - if (counter != nsnull && counter->mName.EqualsWithConversion(aName)) { + if (counter != nsnull && counter->mName.EqualsASCII(aName)) { aRenderingContext->PushState(); nsFont font("Times", NS_FONT_STYLE_NORMAL,NS_FONT_VARIANT_NORMAL, NS_FONT_WEIGHT_NORMAL,0,NSIntPointsToTwips(8)); diff --git a/mozilla/parser/htmlparser/src/nsHTMLEntities.cpp b/mozilla/parser/htmlparser/src/nsHTMLEntities.cpp index fa253820e40..a107fe7ccc7 100644 --- a/mozilla/parser/htmlparser/src/nsHTMLEntities.cpp +++ b/mozilla/parser/htmlparser/src/nsHTMLEntities.cpp @@ -264,7 +264,7 @@ public: NS_ASSERTION(value == gEntityArray[i].mUnicode, "bad unicode value"); entity.AssignWithConversion(nsHTMLEntities::UnicodeToEntity(value)); - NS_ASSERTION(entity.EqualsWithConversion(gEntityArray[i].mStr), "bad entity name"); + NS_ASSERTION(entity.EqualsASCII(gEntityArray[i].mStr), "bad entity name"); } // Make sure we don't find things that aren't there diff --git a/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp b/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp index affe929e101..f156129935e 100755 --- a/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp +++ b/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp @@ -3622,9 +3622,9 @@ InternetSearchDataSource::MapEncoding(const nsString &numericEncoding, if (!numericEncoding.IsEmpty()) { for (PRUint32 i = 0; encodingList[i].numericEncoding != nsnull; i++) { - if (numericEncoding.EqualsWithConversion(encodingList[i].numericEncoding)) + if (numericEncoding.EqualsASCII(encodingList[i].numericEncoding)) { - stringEncoding.AssignWithConversion(encodingList[i].stringEncoding); + stringEncoding.AssignASCII(encodingList[i].stringEncoding); return NS_OK; } } @@ -3935,9 +3935,9 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin // construct post data to send nsAutoString postStr; - postStr.AssignWithConversion(POSTHEADER_PREFIX); + postStr.AssignASCII(POSTHEADER_PREFIX); postStr.AppendInt(input.Length(), 10); - postStr.AppendWithConversion(POSTHEADER_SUFFIX); + postStr.AppendASCII(POSTHEADER_SUFFIX); postStr += input; nsCOMPtr postDataStream; @@ -4050,10 +4050,10 @@ InternetSearchDataSource::SaveEngineInfoIntoGraph(nsIFile *file, nsIFile *icon, if (NS_FAILED(rv)) return rv; nsAutoString searchURL; - searchURL.AssignWithConversion(kEngineProtocol); + searchURL.AssignASCII(kEngineProtocol); char *uriCescaped = nsEscape(filePath.get(), url_Path); if (!uriCescaped) return(NS_ERROR_NULL_POINTER); - searchURL.AppendWithConversion(uriCescaped); + searchURL.AppendASCII(uriCescaped); nsCRT::free(uriCescaped); if ((extensionOffset = searchURL.RFindChar(PRUnichar('.'))) > 0) @@ -4151,7 +4151,7 @@ InternetSearchDataSource::SaveEngineInfoIntoGraph(nsIFile *file, nsIFile *icon, if (catURI) { nsAutoString catList; - catList.AssignWithConversion(kURINC_SearchCategoryPrefix); + catList.AssignASCII(kURINC_SearchCategoryPrefix); catList.AppendWithConversion(catURI); gRDFService->GetUnicodeResource(catList, getter_AddRefs(catRes)); }