return CopyStringToClipboard(srcText);
nsCOMPtr<nsIClipboardHelper> clipboard(do_GetService("@mozilla.org/widget/clipboardhelper;1", &rv)); NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_TRUE(clipboard, NS_ERROR_FAILURE);   return clipboard->CopyString(srcText);
NS_IMETHODIMP PresShell::DoCopyImageLocation(nsIDOMNode* aNode){#ifdef DEBUG_dr  printf("dr :: PresShell::DoCopyImageLocation\n");#endif  NS_ENSURE_ARG_POINTER(aNode);  nsresult rv;  // are we an image?  nsCOMPtr<nsIDOMHTMLImageElement> img(do_QueryInterface(aNode, &rv));  NS_ENSURE_SUCCESS(rv, rv);  if (img) {    // if so, copy the location:    nsAutoString srcText;    rv = img->GetSrc(srcText);    NS_ENSURE_SUCCESS(rv, rv);    return CopyStringToClipboard(srcText);  }  // if no image, fail.  return NS_ERROR_FAILURE;}