*outCmdEnabled = PR_FALSE; nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon); if (editor && EditingHTML(editor)) { nsCOMPtr<nsIHTMLEditor> htmlEditor = do_QueryInterface(editor); if (htmlEditor) { PRBool canIndent, canOutdent; htmlEditor->GetIndentState(&canIndent, &canOutdent);  *outCmdEnabled = canOutdent; } }
NS_ENSURE_ARG_POINTER(outCmdEnabled); nsCOMPtr<nsIHTMLEditor> editor = do_QueryInterface(refCon); *outCmdEnabled = (editor != nsnull);
nsOutdentCommand::IsCommandEnabled(const char * aCommandName, nsISupports *refCon, PRBool *outCmdEnabled){  *outCmdEnabled = PR_FALSE;  nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);  if (editor && EditingHTML(editor))  {    nsCOMPtr<nsIHTMLEditor> htmlEditor = do_QueryInterface(editor);    if (htmlEditor)    {      PRBool canIndent, canOutdent;      htmlEditor->GetIndentState(&canIndent, &canOutdent);            *outCmdEnabled = canOutdent;    }  }    return NS_OK;}