NS_CONST_CAST(char*, resultCStr.get()),
resultCStr.BeginWriting(),
MimeInlineTextHTMLAsPlaintext_parse_eof (MimeObject *obj, PRBool abort_p){  if (obj->closed_p)    return 0;  // This is a hack. We need to call parse_eof() of the super class to flush out any buffered data.  // We can't call it yet for our direct super class, because it would "close" the output   // (write tags such as </pre> and </div>). We'll do that after parsing the buffer.  int status = ((MimeObjectClass*)&MIME_SUPERCLASS)->superclass->parse_eof(obj, abort_p);  if (status < 0)    return status;    MimeInlineTextHTMLAsPlaintext *textHTMLPlain =                                       (MimeInlineTextHTMLAsPlaintext *) obj;  if (!textHTMLPlain || !textHTMLPlain->complete_buffer)  {    return 0;  }  nsString& cb = *(textHTMLPlain->complete_buffer);  nsString asPlaintext;  PRUint32 flags = nsIDocumentEncoder::OutputFormatted    | nsIDocumentEncoder::OutputWrap    | nsIDocumentEncoder::OutputFormatFlowed    | nsIDocumentEncoder::OutputLFLineBreak    | nsIDocumentEncoder::OutputNoScriptContent    | nsIDocumentEncoder::OutputNoFramesContent    | nsIDocumentEncoder::OutputBodyOnly;  HTML2Plaintext(cb, asPlaintext, flags, 80);  nsCAutoString resultCStr = NS_ConvertUCS2toUTF8(asPlaintext);  // TODO parse each line independently  status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_line(                             NS_CONST_CAST(char*, resultCStr.get()),                             resultCStr.Length(),                             obj);  cb.Truncate();  if (status < 0)    return status;  // Second part of the flush hack. Pretend obj wasn't closed yet, so that our super class   // gets a chance to write the closing.  PRBool save_closed_p = obj->closed_p;  obj->closed_p = PR_FALSE;  status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_eof(obj, abort_p);  // Restore closed_p.  obj->closed_p = save_closed_p;  return status;}