} else { if (NS_CONTENT_ATTR_HAS_VALUE != valueResult) { aValues[0] = "on"; } else { aValues[0] = value; } aNames[0] = name; aNumValues = 1; } NS_RELEASE(checkBox);
} else { if (NS_CONTENT_ATTR_HAS_VALUE != valueResult) { aValues[0] = "on"; } else { aValues[0] = value; } aNames[0] = name; aNumValues = 1;
nsCheckboxControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,                                       nsString* aValues, nsString* aNames){  nsAutoString name;  nsresult nameResult = GetName(&name);  if ((aMaxNumValues <= 0) || (NS_CONTENT_ATTR_HAS_VALUE != nameResult)) {    return PR_FALSE;  }  PRBool result = PR_TRUE;  nsAutoString value;  nsresult valueResult = GetValue(&value);  nsICheckButton* checkBox = nsnull;  if ((nsnull != mWidget) &&       (NS_OK == mWidget->QueryInterface(kICheckButtonIID,(void**)&checkBox))) {    PRBool state = PR_FALSE;    checkBox->GetState(state);    if (PR_TRUE != state) {      result = PR_FALSE;    } else {      if (NS_CONTENT_ATTR_HAS_VALUE != valueResult) {        aValues[0] = "on";      } else {        aValues[0] = value;      }      aNames[0] = name;      aNumValues = 1;    }    NS_RELEASE(checkBox);  }  return result;}