nsCOMPtr<nsIDOMSelection> selection;
nsCOMPtr<nsISelection> selection;
NS_IMETHODIMP nsHTMLEditor::InsertBR(nsCOMPtr<nsIDOMNode> *outBRNode){  PRBool bCollapsed;  nsCOMPtr<nsIDOMSelection> selection;  if (!outBRNode) return NS_ERROR_NULL_POINTER;  *outBRNode = nsnull;  nsresult res = GetSelection(getter_AddRefs(selection));  if (NS_FAILED(res)) return res;  res = selection->GetIsCollapsed(&bCollapsed);  if (NS_FAILED(res)) return res;  if (!bCollapsed)  {    res = DeleteSelection(nsIEditor::eNone);    if (NS_FAILED(res)) return res;  }  nsCOMPtr<nsIDOMNode> selNode;  PRInt32 selOffset;  res = GetStartNodeAndOffset(selection, &selNode, &selOffset);  if (NS_FAILED(res)) return res;    res = CreateBR(selNode, selOffset, outBRNode);  if (NS_FAILED(res)) return res;      // position selection in righthand text node// moose  return NS_OK;}