From cbdef0d635ba945ab7ac99e41e8e683c81932128 Mon Sep 17 00:00:00 2001 From: "akkana%netscape.com" Date: Thu, 24 Oct 2002 01:29:37 +0000 Subject: [PATCH] 110949: preserve quote status from Edit Draft. r=ducarroz sr=sspitzer a=dbaron git-svn-id: svn://10.0.0.236/trunk@132426 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/compose/src/nsMsgCompose.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mozilla/mailnews/compose/src/nsMsgCompose.cpp b/mozilla/mailnews/compose/src/nsMsgCompose.cpp index 9ba6e8ba84a..715ebb98aea 100644 --- a/mozilla/mailnews/compose/src/nsMsgCompose.cpp +++ b/mozilla/mailnews/compose/src/nsMsgCompose.cpp @@ -519,6 +519,7 @@ nsMsgCompose::ConvertAndLoadComposeWindow(nsString& aPrefix, // Now, insert it into the editor... nsCOMPtr htmlEditor (do_QueryInterface(m_editor)); nsCOMPtr textEditor (do_QueryInterface(m_editor)); + nsCOMPtr mailEditor (do_QueryInterface(m_editor)); m_editor->BeginTransaction(); if ( (aQuoted) ) { @@ -531,7 +532,6 @@ nsMsgCompose::ConvertAndLoadComposeWindow(nsString& aPrefix, m_editor->EndOfDocument(); } - nsCOMPtr mailEditor (do_QueryInterface(m_editor)); if (!aBuf.IsEmpty() && mailEditor) { if (aHTMLEditor && !mCiteReference.IsEmpty()) @@ -610,7 +610,10 @@ nsMsgCompose::ConvertAndLoadComposeWindow(nsString& aPrefix, { if (!aBuf.IsEmpty()) { - textEditor->InsertText(aBuf); + if (mailEditor) + mailEditor->InsertTextWithQuotations(aBuf); + else + textEditor->InsertText(aBuf); m_editor->EndOfDocument(); }