replace EqualsWithConversion by EqualsLiteral where possible
bug 248687 r+sr=roc git-svn-id: svn://10.0.0.236/trunk@158517 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2038c9b01d
commit
cfaea7482d
@ -491,7 +491,7 @@ nsXMLContentSink::CreateElement(const PRUnichar** aAtts, PRUint32 aAttsCount,
|
||||
if (mParser) {
|
||||
mParser->GetCommand(cmd);
|
||||
}
|
||||
if (cmd.EqualsWithConversion(kLoadAsData)) {
|
||||
if (cmd.EqualsASCII(kLoadAsData)) {
|
||||
// XXXbz Should this be done to all elements, not just XHTML ones?
|
||||
// We don't have any non-XHTML image loading things yet, but....
|
||||
nsCOMPtr<nsIImageLoadingContent> imgLoader(do_QueryInterface(content));
|
||||
@ -625,7 +625,7 @@ nsXMLContentSink::ProcessStyleLink(nsIContent* aElement,
|
||||
|
||||
nsAutoString cmd;
|
||||
if (mParser) mParser->GetCommand(cmd);
|
||||
if (cmd.EqualsWithConversion(kLoadAsData))
|
||||
if (cmd.EqualsASCII(kLoadAsData))
|
||||
return NS_OK; // Do not load stylesheets when loading as data
|
||||
|
||||
NS_ConvertUTF16toUTF8 type(aType);
|
||||
|
||||
@ -1173,7 +1173,7 @@ XULSortServiceImpl::SortContainer(nsIContent *container, sortPtr sortInfo,
|
||||
if (NS_SUCCEEDED(rv = contentSortInfoArray[loop]->content->GetAttr(kNameSpaceID_RDF,
|
||||
nsXULAtoms::type, type)) && (rv == NS_CONTENT_ATTR_HAS_VALUE))
|
||||
{
|
||||
if (type.EqualsWithConversion(kURINC_BookmarkSeparator)) {
|
||||
if (type.EqualsASCII(kURINC_BookmarkSeparator)) {
|
||||
if (loop > startIndex + 1) {
|
||||
if (merelyInvertFlag)
|
||||
InvertSortInfo(&contentSortInfoArray[startIndex], loop-startIndex);
|
||||
|
||||
@ -61,7 +61,7 @@ NS_IMETHODIMP mozSpellI18NManager::GetUtil(const PRUnichar *aLanguage, mozISpell
|
||||
*_retval = NULL;
|
||||
nsAutoString lang;
|
||||
lang.Assign(aLanguage);
|
||||
if(lang.EqualsWithConversion("en")){
|
||||
if(lang.EqualsLiteral("en")){
|
||||
*_retval = new mozEnglishWordUtils;
|
||||
}
|
||||
else{
|
||||
|
||||
@ -1981,8 +1981,8 @@ nsTypeAheadFind::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn)
|
||||
browserElement->GetLocalName(tagName);
|
||||
browserElement->GetAttribute(NS_LITERAL_STRING("type"), test);
|
||||
browserElement->GetAttribute(NS_LITERAL_STRING("autofind"), autoFind);
|
||||
if (tagName.EqualsWithConversion("editor") ||
|
||||
autoFind.EqualsWithConversion("false")) {
|
||||
if (tagName.EqualsLiteral("editor") ||
|
||||
autoFind.EqualsLiteral("false")) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1968,7 +1968,7 @@ SI_LoadSignonData() {
|
||||
if (NS_FAILED(si_ReadLine(strm, format))) {
|
||||
return -1;
|
||||
}
|
||||
if (!format.EqualsWithConversion(HEADER_VERSION)) {
|
||||
if (!format.EqualsLiteral(HEADER_VERSION)) {
|
||||
/* something's wrong */
|
||||
return -1;
|
||||
}
|
||||
@ -2596,9 +2596,9 @@ si_RestoreOldSignonDataFromBrowser
|
||||
data = NS_STATIC_CAST(si_SignonDataStruct*, user->signonData_list.ElementAt(i));
|
||||
nsAutoString decrypted;
|
||||
if (NS_SUCCEEDED(si_Decrypt(data->value, decrypted))) {
|
||||
if(data->name.EqualsWithConversion(USERNAMEFIELD)) {
|
||||
if(data->name.EqualsLiteral(USERNAMEFIELD)) {
|
||||
username = decrypted;
|
||||
} else if(data->name.EqualsWithConversion(PASSWORDFIELD)) {
|
||||
} else if(data->name.EqualsLiteral(PASSWORDFIELD)) {
|
||||
password = decrypted;
|
||||
}
|
||||
}
|
||||
|
||||
@ -800,7 +800,7 @@ NS_IMETHODIMP mozXMLTerminal::Paste()
|
||||
XMLT_LOG(mozXMLTerminal::Paste,20,("flavour=%s\n", temCStr));
|
||||
nsMemory::Free(temCStr);
|
||||
|
||||
if (flavor.EqualsWithConversion(kHTMLMime) || flavor.EqualsWithConversion(kUnicodeMime)) {
|
||||
if (flavor.EqualsLiteral(kHTMLMime) || flavor.EqualsLiteral(kUnicodeMime)) {
|
||||
nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
|
||||
if (textDataObj && objLen > 0) {
|
||||
PRUnichar* text = nsnull;
|
||||
|
||||
@ -68,47 +68,47 @@ static NS_DEFINE_IID(kCPrinterEnumerator, NS_PRINTER_ENUMERATOR_CID);
|
||||
NS_IMPL_ISUPPORTS2(nsPrintOptions, nsIPrintOptions, nsIPrintSettingsService)
|
||||
|
||||
// Pref Constants
|
||||
const char kMarginTop[] = "print_margin_top";
|
||||
const char kMarginLeft[] = "print_margin_left";
|
||||
const char kMarginBottom[] = "print_margin_bottom";
|
||||
const char kMarginRight[] = "print_margin_right";
|
||||
static const char kMarginTop[] = "print_margin_top";
|
||||
static const char kMarginLeft[] = "print_margin_left";
|
||||
static const char kMarginBottom[] = "print_margin_bottom";
|
||||
static const char kMarginRight[] = "print_margin_right";
|
||||
|
||||
// Prefs for Print Options
|
||||
const char kPrintEvenPages[] = "print_evenpages";
|
||||
const char kPrintOddPages[] = "print_oddpages";
|
||||
const char kPrintHeaderStrLeft[] = "print_headerleft";
|
||||
const char kPrintHeaderStrCenter[] = "print_headercenter";
|
||||
const char kPrintHeaderStrRight[] = "print_headerright";
|
||||
const char kPrintFooterStrLeft[] = "print_footerleft";
|
||||
const char kPrintFooterStrCenter[] = "print_footercenter";
|
||||
const char kPrintFooterStrRight[] = "print_footerright";
|
||||
static const char kPrintEvenPages[] = "print_evenpages";
|
||||
static const char kPrintOddPages[] = "print_oddpages";
|
||||
static const char kPrintHeaderStrLeft[] = "print_headerleft";
|
||||
static const char kPrintHeaderStrCenter[] = "print_headercenter";
|
||||
static const char kPrintHeaderStrRight[] = "print_headerright";
|
||||
static const char kPrintFooterStrLeft[] = "print_footerleft";
|
||||
static const char kPrintFooterStrCenter[] = "print_footercenter";
|
||||
static const char kPrintFooterStrRight[] = "print_footerright";
|
||||
|
||||
// Additional Prefs
|
||||
const char kPrintPaperSize[] = "print_paper_size"; // this has been deprecated
|
||||
static const char kPrintPaperSize[] = "print_paper_size"; // this has been deprecated
|
||||
|
||||
const char kPrintReversed[] = "print_reversed";
|
||||
const char kPrintInColor[] = "print_in_color";
|
||||
const char kPrintPaperName[] = "print_paper_name";
|
||||
const char kPrintPlexName[] = "print_plex_name";
|
||||
const char kPrintPaperSizeType[] = "print_paper_size_type";
|
||||
const char kPrintPaperData[] = "print_paper_data";
|
||||
const char kPrintPaperSizeUnit[] = "print_paper_size_unit";
|
||||
const char kPrintPaperWidth[] = "print_paper_width";
|
||||
const char kPrintPaperHeight[] = "print_paper_height";
|
||||
const char kPrintOrientation[] = "print_orientation";
|
||||
const char kPrintCommand[] = "print_command";
|
||||
const char kPrinterName[] = "print_printer";
|
||||
const char kPrintToFile[] = "print_to_file";
|
||||
const char kPrintToFileName[] = "print_to_filename";
|
||||
const char kPrintPageDelay[] = "print_pagedelay";
|
||||
const char kPrintBGColors[] = "print_bgcolor";
|
||||
const char kPrintBGImages[] = "print_bgimages";
|
||||
const char kPrintShrinkToFit[] = "print_shrink_to_fit";
|
||||
const char kPrintScaling[] = "print_scaling";
|
||||
static const char kPrintReversed[] = "print_reversed";
|
||||
static const char kPrintInColor[] = "print_in_color";
|
||||
static const char kPrintPaperName[] = "print_paper_name";
|
||||
static const char kPrintPlexName[] = "print_plex_name";
|
||||
static const char kPrintPaperSizeType[] = "print_paper_size_type";
|
||||
static const char kPrintPaperData[] = "print_paper_data";
|
||||
static const char kPrintPaperSizeUnit[] = "print_paper_size_unit";
|
||||
static const char kPrintPaperWidth[] = "print_paper_width";
|
||||
static const char kPrintPaperHeight[] = "print_paper_height";
|
||||
static const char kPrintOrientation[] = "print_orientation";
|
||||
static const char kPrintCommand[] = "print_command";
|
||||
static const char kPrinterName[] = "print_printer";
|
||||
static const char kPrintToFile[] = "print_to_file";
|
||||
static const char kPrintToFileName[] = "print_to_filename";
|
||||
static const char kPrintPageDelay[] = "print_pagedelay";
|
||||
static const char kPrintBGColors[] = "print_bgcolor";
|
||||
static const char kPrintBGImages[] = "print_bgimages";
|
||||
static const char kPrintShrinkToFit[] = "print_shrink_to_fit";
|
||||
static const char kPrintScaling[] = "print_scaling";
|
||||
|
||||
const char kJustLeft[] = "left";
|
||||
const char kJustCenter[] = "center";
|
||||
const char kJustRight[] = "right";
|
||||
static const char kJustLeft[] = "left";
|
||||
static const char kJustCenter[] = "center";
|
||||
static const char kJustRight[] = "right";
|
||||
|
||||
static NS_DEFINE_IID(kPrinterEnumeratorCID, NS_PRINTER_ENUMERATOR_CID);
|
||||
|
||||
@ -1192,10 +1192,10 @@ void nsPrintOptions::ReadJustification(const char * aPrefId,
|
||||
aJust = aInitValue;
|
||||
nsAutoString justStr;
|
||||
if (NS_SUCCEEDED(ReadPrefString(aPrefId, justStr))) {
|
||||
if (justStr.EqualsWithConversion(kJustRight)) {
|
||||
if (justStr.EqualsASCII(kJustRight)) {
|
||||
aJust = nsIPrintSettings::kJustRight;
|
||||
|
||||
} else if (justStr.EqualsWithConversion(kJustCenter)) {
|
||||
} else if (justStr.EqualsASCII(kJustCenter)) {
|
||||
aJust = nsIPrintSettings::kJustCenter;
|
||||
|
||||
} else {
|
||||
|
||||
@ -1070,7 +1070,7 @@ nsBaseWidget::debug_GetCachedBoolPref(const char * aPrefName)
|
||||
|
||||
for (PRUint32 i = 0; i < debug_NumPrefValues; i++)
|
||||
{
|
||||
if (NS_ConvertASCIItoUCS2(debug_PrefValues[i].name).EqualsWithConversion(aPrefName))
|
||||
if (strcmp(debug_PrefValues[i].name, aPrefName) == 0)
|
||||
{
|
||||
return debug_PrefValues[i].value;
|
||||
}
|
||||
@ -1085,7 +1085,7 @@ static void debug_SetCachedBoolPref(const char * aPrefName,PRBool aValue)
|
||||
|
||||
for (PRUint32 i = 0; i < debug_NumPrefValues; i++)
|
||||
{
|
||||
if (NS_ConvertASCIItoUCS2(debug_PrefValues[i].name).EqualsWithConversion(aPrefName))
|
||||
if (strcmp(debug_PrefValues[i].name, aPrefName) == 0)
|
||||
{
|
||||
debug_PrefValues[i].value = aValue;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user