nsCAutoString openingDiv("<div class=text-flowed"); if (!plainHTML && !fontstyle.IsEmpty())
if (!quoting)
MimeInlineTextPlainFlowed_parse_begin (MimeObject *obj){  int status = ((MimeObjectClass*)&MIME_SUPERCLASS)->parse_begin(obj);  if (status < 0) return status;  status =  MimeObject_write(obj, "", 0, PR_TRUE); /* force out any separators... */  if(status<0) return status;  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 (only for prefs).  // Setup the data structure that is connected to the actual document  // Saved in a linked list in case this is called with several documents  // at the same time.  /* This memory is freed when parse_eof is called. So it better be! */  struct MimeInlineTextPlainFlowedExData *exdata =    (MimeInlineTextPlainFlowedExData *)PR_MALLOC(sizeof(struct MimeInlineTextPlainFlowedExData));  if(!exdata) return MIME_OUT_OF_MEMORY;  MimeInlineTextPlainFlowed *text = (MimeInlineTextPlainFlowed *) obj;  // Link it up.  exdata->next = MimeInlineTextPlainFlowedExDataList;  MimeInlineTextPlainFlowedExDataList = exdata;  // Initialize data  exdata->ownerobj = obj;  exdata->inflow = PR_FALSE;  exdata->quotelevel = 0;  exdata->isSig = PR_FALSE;  // Get Prefs for viewing  exdata->fixedwidthfont = PR_FALSE;  //  Quotes  text->mQuotedSizeSetting = 0;   // mail.quoted_size  text->mQuotedStyleSetting = 0;  // mail.quoted_style  text->mCitationColor = nsnull;  // mail.citation_color    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));    nsresult rv = prefs->GetBoolPref( "mail.fixed_width_messages",         &(exdata->fixedwidthfont)  );  // Check at least the success of one    NS_ASSERTION(NS_SUCCEEDED(rv),         "failed to get the mail.fixed_width_messages pref");   }  // 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    nsresult rv = GetMailNewsFont(obj, exdata->fixedwidthfont,                                  fontName, 128, &fontSize);    if (NS_SUCCEEDED(rv))    {      fontstyle = "font-family: ";      fontstyle += fontName;      fontstyle += "; font-size: ";      fontstyle.AppendInt(fontSize);      fontstyle += "px;";    }    else    {      if (exdata->fixedwidthfont)        fontstyle = "font-family: -moz-fixed";    }  }  else  // DELETEME: makes sense?  {    if (exdata->fixedwidthfont)      fontstyle = "font-family: -moz-fixed";  }  // Opening <div>. We currently have to add formatting here. :-(  nsCAutoString openingDiv("<div class=text-flowed");  if (!plainHTML && !fontstyle.IsEmpty())  {    openingDiv += " style=\"";    openingDiv += fontstyle;    openingDiv += '\"';  }  openingDiv += "><tt>";  status = MimeObject_write(obj, openingDiv,openingDiv.Length(), PR_FALSE);  if (status < 0) return status;  return 0;}