nsresult rv = nsComponentManager::CreateInstance(kCTransferableCID, nsnull, NS_GET_IID(nsITransferable), (void**)transferable); if (NS_FAILED(rv)) return rv;   if (transferable) {   if ((mFlags & eEditorPlaintextMask) == 0) { (*transferable)->AddDataFlavor(kJPEGImageMime); (*transferable)->AddDataFlavor(kHTMLMime); (*transferable)->AddDataFlavor(kFileMime); } (*transferable)->AddDataFlavor(kUnicodeMime); }
NS_IMETHODIMP nsHTMLEditor::PrepareTransferable(nsITransferable **transferable){  // Create generic Transferable for getting the data  nsresult rv = nsComponentManager::CreateInstance(kCTransferableCID, nsnull,                                           NS_GET_IID(nsITransferable),                                           (void**)transferable);  if (NS_FAILED(rv))    return rv;  // Get the nsITransferable interface for getting the data from the clipboard  if (transferable)  {    // Create the desired DataFlavor for the type of data    // we want to get out of the transferable    if ((mFlags & eEditorPlaintextMask) == 0)  // This should only happen in html editors, not plaintext    {      (*transferable)->AddDataFlavor(kJPEGImageMime);      (*transferable)->AddDataFlavor(kHTMLMime);      (*transferable)->AddDataFlavor(kFileMime);    }    (*transferable)->AddDataFlavor(kUnicodeMime);  }    return NS_OK;}