status = MimeObject_write(obj, openingDiv,openingDiv.Length(), PR_FALSE);
status = MimeObject_write(obj, NS_CONST_CAST(char*, openingDiv.get()), openingDiv.Length(), PR_FALSE);
MimeInlineTextPlain_parse_begin (MimeObject *obj){  int status = 0;  PRBool quoting = ( obj->options    && ( obj->options->format_out == nsMimeOutput::nsMimeMessageQuoting ||         obj->options->format_out == nsMimeOutput::nsMimeMessageBodyQuoting       )       );  // The output will be inserted in the composer as quotation  PRBool plainHTML = quoting || (obj->options &&       obj->options->format_out == nsMimeOutput::nsMimeMessageSaveAs);       // Just good(tm) HTML. No reliance on CSS.  status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_begin(obj);  if (status < 0) return status;  if (!obj->output_p) return 0;  if (obj->options &&	  obj->options->write_html_p &&	  obj->options->output_fn)	{      MimeInlineTextPlain *text = (MimeInlineTextPlain *) obj;      text->mCiteLevel = 0;      // Get the prefs      // Quoting      text->mBlockquoting = PR_TRUE; // mail.quoteasblock      // Viewing      text->mQuotedSizeSetting = 0;   // mail.quoted_size      text->mQuotedStyleSetting = 0;  // mail.quoted_style      text->mCitationColor = nsnull;  // mail.citation_color      PRBool graphicalQuote = PR_TRUE; // mail.quoted_graphical      nsIPref *prefs = GetPrefServiceManager(obj->options);      if (prefs)      {        prefs->GetIntPref("mail.quoted_size", &(text->mQuotedSizeSetting));        prefs->GetIntPref("mail.quoted_style", &(text->mQuotedStyleSetting));        prefs->CopyCharPref("mail.citation_color", &(text->mCitationColor));        prefs->GetBoolPref("mail.quoted_graphical", &graphicalQuote);        prefs->GetBoolPref("mail.quoteasblock", &(text->mBlockquoting));      }      // Get font      // only used for viewing (!plainHTML)      nsCAutoString fontstyle;      if (nsMimeOutput::nsMimeMessageBodyDisplay == obj->options->format_out ||          nsMimeOutput::nsMimeMessagePrintOutput == obj->options->format_out)      {        /* Use a langugage sensitive default font           (otherwise unicode font will be used since the data is UTF-8). */        char fontName[128];     // default font name        PRInt32 fontSize;       // default font size        PRInt32 fontSizePercentage;   // size percentage        nsresult rv = GetMailNewsFont(obj,                           !obj->options->variable_width_plaintext_p,                           fontName, 128, &fontSize, &fontSizePercentage);        if (NS_SUCCEEDED(rv))        {          fontstyle = "font-family: ";          fontstyle += fontName;          fontstyle += "; font-size: ";          fontstyle.AppendInt(fontSize);          fontstyle += "px;";        }        else        {          if (!obj->options->variable_width_plaintext_p)            fontstyle = "font-family: -moz-fixed";        }      }      else  // DELETEME: makes sense?      {        if (!obj->options->variable_width_plaintext_p)          fontstyle = "font-family: -moz-fixed";      }      // Opening <div>. We currently have to add formatting here. :-(      nsCAutoString openingDiv;      if (!quoting)           /* 4.x' editor can't break <div>s (e.g. to interleave comments).              We'll add the class to the <blockquote type=cite> later. */      {        openingDiv = "<div class=\"moz-text-plain\"";        if (!plainHTML)        {          if (obj->options->wrap_long_lines_p)            openingDiv += " wrap=true";          else            openingDiv += " wrap=false";          if (graphicalQuote)            openingDiv += " graphical-quote=true";          else            openingDiv += " graphical-quote=false";          if (!fontstyle.IsEmpty())          {            openingDiv += " style=\"";            openingDiv += fontstyle;            openingDiv += '\"';          }        }        openingDiv += "><pre wrap>";      }      else        openingDiv = "<pre wrap>";	  status = MimeObject_write(obj, openingDiv,openingDiv.Length(), PR_FALSE);	  if (status < 0) return status;	  /* text/plain objects always have separators before and after them.		 Note that this is not the case for text/enriched objects. */	  status = MimeObject_write_separator(obj);	  if (status < 0) return status;	}  return 0;}