Fix for bug 107425. We need to force the entry point to the end of the document after we call InsertSource. R=varada, SR=bienvenu, A=asa

git-svn-id: svn://10.0.0.236/trunk@116807 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ducarroz%netscape.com
2002-03-19 00:00:35 +00:00
parent acf69e3baf
commit dbd6de54a3

View File

@@ -477,9 +477,9 @@ NS_IMETHODIMP nsMsgCompose::ConvertAndLoadComposeWindow(nsIEditorShell *aEditorS
TranslateLineEnding(aBuf);
TranslateLineEnding(aSignature);
aEditorShell->GetEditor(getter_AddRefs(editor));
nsresult rv = aEditorShell->GetEditor(getter_AddRefs(editor));
NS_ENSURE_SUCCESS(rv, rv);
if (editor)
editor->EnableUndo(PR_FALSE);
// Ok - now we need to figure out the charset of the aBuf we are going to send
@@ -497,6 +497,7 @@ NS_IMETHODIMP nsMsgCompose::ConvertAndLoadComposeWindow(nsIEditorShell *aEditorS
aEditorShell->InsertSource(aPrefix.get());
else
aEditorShell->InsertText(aPrefix.get());
editor->EndOfDocument();
}
if (!aBuf.IsEmpty())
@@ -510,6 +511,7 @@ NS_IMETHODIMP nsMsgCompose::ConvertAndLoadComposeWindow(nsIEditorShell *aEditorS
else
aEditorShell->InsertAsQuotation(aBuf.get(),
getter_AddRefs(nodeInserted));
editor->EndOfDocument();
}
(void)TagEmbeddedObjects(aEditorShell);
@@ -547,7 +549,11 @@ NS_IMETHODIMP nsMsgCompose::ConvertAndLoadComposeWindow(nsIEditorShell *aEditorS
}
}
{
aEditorShell->InsertSource(aBuf.get());
editor->EndOfDocument();
}
SetBodyAttributes(bodyAttributes);
}
if (!aSignature.IsEmpty())
@@ -556,7 +562,10 @@ NS_IMETHODIMP nsMsgCompose::ConvertAndLoadComposeWindow(nsIEditorShell *aEditorS
else
{
if (!aBuf.IsEmpty())
{
aEditorShell->InsertText(aBuf.get());
editor->EndOfDocument();
}
if (!aSignature.IsEmpty())
aEditorShell->InsertText(aSignature.get());