From 7c1a5bcb7ea553a8d3875f0fe7b1b2b9e795d4c8 Mon Sep 17 00:00:00 2001 From: "ducarroz%netscape.com" Date: Wed, 11 Dec 2002 00:14:27 +0000 Subject: [PATCH] Fix for bug 184550. Don't need anymore to insert the document header separatly. That will avoid the performance regression as well. R=cavin, SR=bienvenu --- mailnews/compose/src/nsMsgCompose.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/mailnews/compose/src/nsMsgCompose.cpp b/mailnews/compose/src/nsMsgCompose.cpp index 00d1974d341..45043034f7d 100644 --- a/mailnews/compose/src/nsMsgCompose.cpp +++ b/mailnews/compose/src/nsMsgCompose.cpp @@ -547,22 +547,6 @@ nsMsgCompose::ConvertAndLoadComposeWindow(nsString& aPrefix, PRInt32 start; PRInt32 end; nsAutoString bodyAttributes; - nsAutoString headContent; - - /* Before we can insert the data into editor, we need to remove the tag - content and then insert it back using ReplaceHeadContentsWithHTML */ - start = aBuf.Find("", PR_TRUE); - if (start != kNotFound) - { - start += 6; // move pass the tag - end = aBuf.Find("", PR_TRUE, start); - if (end != kNotFound) - { - const PRUnichar* data = aBuf.get(); - headContent.Adopt(nsCRT::strndup(&data[start], end - start)); - aBuf.Cut(start, end - start); - } - } /* If we have attribute for the body tag, we need to save them in order to add them back later as InsertSource will ignore them. */ @@ -578,8 +562,6 @@ nsMsgCompose::ConvertAndLoadComposeWindow(nsString& aPrefix, } } - if (!headContent.IsEmpty()) - htmlEditor->ReplaceHeadContentsWithHTML(headContent); htmlEditor->InsertHTML(aBuf); m_editor->EndOfDocument();