return NS_ERROR_NOT_IMPLEMENTED;
PRBool allowPlugins; rv = aParams->GetBooleanValue("plugins", &allowPlugins); if (NS_SUCCEEDED(rv)) { nsCOMPtr<nsISupports> container; rv = presContext->GetContainer(getter_AddRefs(container)); if (NS_FAILED(rv)) return rv; if (!container) return NS_ERROR_FAILURE;  nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(container, &rv)); if (NS_FAILED(rv)) return rv; if (!docShell) return NS_ERROR_FAILURE;  rv = docShell->SetAllowPlugins(allowPlugins); if (NS_FAILED(rv)) return rv; }  return NS_OK;
nsSetDocumentStateCommand::DoCommandParams(const char *aCommandName,                                           nsICommandParams *aParams,                                           nsISupports *refCon){  nsCOMPtr<nsIEditor> editor = do_QueryInterface(refCon);  if (!editor)     return NS_ERROR_INVALID_ARG;  if (!nsCRT::strcmp(aCommandName, "cmd_setDocumentModified"))  {    NS_ENSURE_ARG_POINTER(aParams);    PRBool modified;     nsresult rv = aParams->GetBooleanValue(STATE_ATTRIBUTE, &modified);    // Should we fail if this param wasn't set?    // I'm not sure we should be that strict    if (NS_FAILED(rv))      return rv;    if (modified)      return editor->IncrementModificationCount(1);    else       return editor->ResetModificationCount();  }  else if (!nsCRT::strcmp(aCommandName, "cmd_setDocumentReadOnly"))  {    NS_ENSURE_ARG_POINTER(aParams);    PRBool isReadOnly;     nsresult rvRO = aParams->GetBooleanValue(STATE_ATTRIBUTE, &isReadOnly);    if (NS_FAILED(rvRO))      return rvRO;    PRUint32 flags;    editor->GetFlags(&flags);    if (isReadOnly)      flags |= nsIPlaintextEditor::eEditorReadonlyMask;    else      flags &= ~(nsIPlaintextEditor::eEditorReadonlyMask);    return editor->SetFlags(flags);  }  else if (!nsCRT::strcmp(aCommandName, "cmd_setDocumentUseCSS"))  {    NS_ENSURE_ARG_POINTER(aParams);    nsCOMPtr<nsIHTMLEditor> htmleditor = do_QueryInterface(refCon);    if (!htmleditor)       return NS_ERROR_INVALID_ARG;    PRBool desireCSS;    nsresult rvCSS = aParams->GetBooleanValue(STATE_ATTRIBUTE, &desireCSS);    if (NS_FAILED(rvCSS))      return rvCSS;    return htmleditor->SetIsCSSEnabled(desireCSS);  }  return NS_ERROR_NOT_IMPLEMENTED;}