clipboard->GetData(trans, aSelectionType);
clipboard->GetData(trans);
NS_IMETHODIMP nsHTMLEditor::PasteAsPlaintextQuotation(PRInt32 aSelectionType){  // Get Clipboard Service  nsresult rv;  nsCOMPtr<nsIClipboard> clipboard(do_GetService(kCClipboardCID, &rv));  if (NS_FAILED(rv)) return rv;  // Create generic Transferable for getting the data  nsCOMPtr<nsITransferable> trans;  rv = nsComponentManager::CreateInstance(kCTransferableCID, nsnull,                                           NS_GET_IID(nsITransferable),                                           (void**) getter_AddRefs(trans));  if (NS_SUCCEEDED(rv) && trans)  {    // We only handle plaintext pastes here    trans->AddDataFlavor(kUnicodeMime);    // Get the Data from the clipboard    clipboard->GetData(trans, aSelectionType);    // Now we ask the transferable for the data    // it still owns the data, we just have a pointer to it.    // If it can't support a "text" output of the data the call will fail    nsCOMPtr<nsISupports> genericDataObj;    PRUint32 len = 0;    char* flav = 0;    rv = trans->GetAnyTransferData(&flav, getter_AddRefs(genericDataObj),                                   &len);    if (NS_FAILED(rv))    {#ifdef DEBUG_akkana      printf("PasteAsPlaintextQuotation: GetAnyTransferData failed, %d\n", rv);#endif      return rv;    }#ifdef DEBUG_clipboard    printf("Got flavor [%s]\n", flav);#endif    nsAutoString flavor; flavor.AssignWithConversion(flav);    nsAutoString stuffToPaste;    if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime)))    {      nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) );      if (textDataObj && len > 0)      {        PRUnichar* text = nsnull;        textDataObj->ToString ( &text );        stuffToPaste.Assign ( text, len / 2 );        nsAutoEditBatch beginBatching(this);        rv = InsertAsPlaintextQuotation(stuffToPaste, 0);        if (text)          nsMemory::Free(text);      }    }    nsCRT::free(flav);  }  return rv;}