nsCOMPtr<nsIDOMSelection> selection;
nsCOMPtr<nsISelection> selection;
nsHTMLEditor::Align(const nsString& aAlignType){  nsAutoEditBatch beginBatching(this);  nsCOMPtr<nsIDOMNode> node;  PRBool cancel= PR_FALSE;    // Find out if the selection is collapsed:  nsCOMPtr<nsIDOMSelection> selection;  nsresult res = GetSelection(getter_AddRefs(selection));  if (NS_FAILED(res)) return res;  if (!selection) return NS_ERROR_NULL_POINTER;  nsTextRulesInfo ruleInfo(nsHTMLEditRules::kAlign);  ruleInfo.alignType = &aAlignType;  res = mRules->WillDoAction(selection, &ruleInfo, &cancel);  return res;}