From bcb564f0075bb834b7cc5a2792f042d9e71b0d6a Mon Sep 17 00:00:00 2001 From: "akkana%netscape.com" Date: Wed, 24 Nov 1999 20:48:59 +0000 Subject: [PATCH] 19610: Change InsertAsQuotation API to return inserted node r=rhp git-svn-id: svn://10.0.0.236/trunk@54423 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsEditorShell.cpp | 13 +++--- mozilla/editor/base/nsHTMLEditor.cpp | 40 ++++++++++++++----- mozilla/editor/base/nsHTMLEditor.h | 7 ++-- mozilla/editor/base/nsHTMLEditorLog.cpp | 17 +++++--- mozilla/editor/base/nsHTMLEditorLog.h | 6 +-- mozilla/editor/composer/src/nsEditorShell.cpp | 13 +++--- mozilla/editor/idl/nsIEditorShell.idl | 5 ++- .../editor/libeditor/html/nsHTMLEditor.cpp | 40 ++++++++++++++----- mozilla/editor/libeditor/html/nsHTMLEditor.h | 7 ++-- .../editor/libeditor/html/nsHTMLEditorLog.cpp | 17 +++++--- .../editor/libeditor/html/nsHTMLEditorLog.h | 6 +-- mozilla/editor/public/nsIEditorMailSupport.h | 6 ++- mozilla/mailnews/compose/src/nsMsgCompose.cpp | 2 +- 13 files changed, 122 insertions(+), 57 deletions(-) diff --git a/mozilla/editor/base/nsEditorShell.cpp b/mozilla/editor/base/nsEditorShell.cpp index 1010a14e772..4a79ce2e650 100644 --- a/mozilla/editor/base/nsEditorShell.cpp +++ b/mozilla/editor/base/nsEditorShell.cpp @@ -2115,7 +2115,8 @@ nsEditorShell::PasteAsCitedQuotation(const PRUnichar *cite) } NS_IMETHODIMP -nsEditorShell::InsertAsQuotation(const PRUnichar *quotedText) +nsEditorShell::InsertAsQuotation(const PRUnichar *quotedText, + nsIDOMNode** aNodeInserted) { nsresult err = NS_NOINTERFACE; @@ -2128,7 +2129,7 @@ nsEditorShell::InsertAsQuotation(const PRUnichar *quotedText) { nsCOMPtr mailEditor = do_QueryInterface(mEditor); if (mailEditor) - err = mailEditor->InsertAsQuotation(aQuotedText); + err = mailEditor->InsertAsQuotation(aQuotedText, aNodeInserted); } break; @@ -2140,7 +2141,9 @@ nsEditorShell::InsertAsQuotation(const PRUnichar *quotedText) } NS_IMETHODIMP -nsEditorShell::InsertAsCitedQuotation(const PRUnichar *quotedText, const PRUnichar *cite) +nsEditorShell::InsertAsCitedQuotation(const PRUnichar *quotedText, + const PRUnichar *cite, + nsIDOMNode** aNodeInserted) { nsresult err = NS_NOINTERFACE; @@ -2152,9 +2155,9 @@ nsEditorShell::InsertAsCitedQuotation(const PRUnichar *quotedText, const PRUnich case ePlainTextEditorType: case eHTMLTextEditorType: { - nsCOMPtr mailEditor = do_QueryInterface(mEditor); + nsCOMPtr mailEditor = do_QueryInterface(mEditor); if (mailEditor) - err = mailEditor->InsertAsQuotation(aQuotedText); + err = mailEditor->InsertAsQuotation(aQuotedText, aNodeInserted); } break; diff --git a/mozilla/editor/base/nsHTMLEditor.cpp b/mozilla/editor/base/nsHTMLEditor.cpp index 7cebf591aed..e3930bb00cf 100644 --- a/mozilla/editor/base/nsHTMLEditor.cpp +++ b/mozilla/editor/base/nsHTMLEditor.cpp @@ -3613,7 +3613,7 @@ NS_IMETHODIMP nsHTMLEditor::PasteAsPlaintextQuotation() textDataObj->ToString ( &text ); stuffToPaste.SetString ( text, len ); nsAutoEditBatch beginBatching(this); - rv = InsertAsPlaintextQuotation(stuffToPaste); + rv = InsertAsPlaintextQuotation(stuffToPaste, 0); } } else if (flavor.Equals(kUnicodeMime)) @@ -3625,7 +3625,7 @@ NS_IMETHODIMP nsHTMLEditor::PasteAsPlaintextQuotation() textDataObj->ToString ( &text ); stuffToPaste.SetString ( text, len / 2 ); nsAutoEditBatch beginBatching(this); - rv = InsertAsPlaintextQuotation(stuffToPaste); + rv = InsertAsPlaintextQuotation(stuffToPaste, 0); } } nsCRT::free(flav); @@ -3634,17 +3634,20 @@ NS_IMETHODIMP nsHTMLEditor::PasteAsPlaintextQuotation() return rv; } -NS_IMETHODIMP nsHTMLEditor::InsertAsQuotation(const nsString& aQuotedText) +NS_IMETHODIMP nsHTMLEditor::InsertAsQuotation(const nsString& aQuotedText, + nsIDOMNode **aNodeInserted) { if (mFlags & eEditorPlaintextMask) - return InsertAsPlaintextQuotation(aQuotedText); + return InsertAsPlaintextQuotation(aQuotedText, aNodeInserted); nsAutoString citation (""); - return InsertAsCitedQuotation(aQuotedText, citation); + return InsertAsCitedQuotation(aQuotedText, citation, aNodeInserted); } // text insert. -NS_IMETHODIMP nsHTMLEditor::InsertAsPlaintextQuotation(const nsString& aQuotedText) +NS_IMETHODIMP +nsHTMLEditor::InsertAsPlaintextQuotation(const nsString& aQuotedText, + nsIDOMNode **aNodeInserted) { // Now we have the text. Cite it appropriately: nsCOMPtr citer; @@ -3693,11 +3696,22 @@ NS_IMETHODIMP nsHTMLEditor::InsertAsPlaintextQuotation(const nsString& aQuotedTe selection->Collapse(preNode, 0); } - return InsertText(quotedStuff); + rv = InsertText(quotedStuff); + if (aNodeInserted) + { + if (NS_SUCCEEDED(rv)) + { + *aNodeInserted = preNode; + NS_IF_ADDREF(*aNodeInserted); + } + } + return rv; } -NS_IMETHODIMP nsHTMLEditor::InsertAsCitedQuotation(const nsString& aQuotedText, - const nsString& aCitation) +NS_IMETHODIMP +nsHTMLEditor::InsertAsCitedQuotation(const nsString& aQuotedText, + const nsString& aCitation, + nsIDOMNode **aNodeInserted) { nsAutoEditBatch beginBatching(this); nsCOMPtr newNode; @@ -3725,6 +3739,14 @@ NS_IMETHODIMP nsHTMLEditor::InsertAsCitedQuotation(const nsString& aQuotedText, } res = InsertHTML(aQuotedText); + if (aNodeInserted) + { + if (NS_SUCCEEDED(res)) + { + *aNodeInserted = newNode; + NS_IF_ADDREF(*aNodeInserted); + } + } return res; } diff --git a/mozilla/editor/base/nsHTMLEditor.h b/mozilla/editor/base/nsHTMLEditor.h index 6807af8be06..36b27309d9e 100644 --- a/mozilla/editor/base/nsHTMLEditor.h +++ b/mozilla/editor/base/nsHTMLEditor.h @@ -143,9 +143,9 @@ public: NS_IMETHOD GetBodyWrapWidth(PRInt32 *aWrapColumn); NS_IMETHOD SetBodyWrapWidth(PRInt32 aWrapColumn); NS_IMETHOD PasteAsQuotation(); - NS_IMETHOD InsertAsQuotation(const nsString& aQuotedText); + NS_IMETHOD InsertAsQuotation(const nsString& aQuotedText, nsIDOMNode **aNodeInserted); NS_IMETHOD PasteAsCitedQuotation(const nsString& aCitation); - NS_IMETHOD InsertAsCitedQuotation(const nsString& aQuotedText, const nsString& aCitation); + NS_IMETHOD InsertAsCitedQuotation(const nsString& aQuotedText, const nsString& aCitation, nsIDOMNode **aNodeInserted); NS_IMETHOD GetEmbeddedObjects(nsISupportsArray** aNodeList); @@ -471,7 +471,8 @@ protected: // Methods for handling plaintext quotations NS_IMETHOD PasteAsPlaintextQuotation(); - NS_IMETHOD InsertAsPlaintextQuotation(const nsString& aQuotedText); + NS_IMETHOD InsertAsPlaintextQuotation(const nsString& aQuotedText, + nsIDOMNode **aNodeInserted); TypeInState *GetTypeInState(); diff --git a/mozilla/editor/base/nsHTMLEditorLog.cpp b/mozilla/editor/base/nsHTMLEditorLog.cpp index f56aabe3802..fd98ad8eaee 100644 --- a/mozilla/editor/base/nsHTMLEditorLog.cpp +++ b/mozilla/editor/base/nsHTMLEditorLog.cpp @@ -405,7 +405,8 @@ nsHTMLEditorLog::PasteAsCitedQuotation(const nsString& aCitation) } NS_IMETHODIMP -nsHTMLEditorLog::InsertAsQuotation(const nsString& aQuotedText) +nsHTMLEditorLog::InsertAsQuotation(const nsString& aQuotedText, + nsIDOMNode **aNodeInserted) { nsAutoHTMLEditorLogLock logLock(this); @@ -418,11 +419,12 @@ nsHTMLEditorLog::InsertAsQuotation(const nsString& aQuotedText) Flush(); } - return nsHTMLEditor::InsertAsQuotation(aQuotedText); + return nsHTMLEditor::InsertAsQuotation(aQuotedText, aNodeInserted); } NS_IMETHODIMP -nsHTMLEditorLog::InsertAsPlaintextQuotation(const nsString& aQuotedText) +nsHTMLEditorLog::InsertAsPlaintextQuotation(const nsString& aQuotedText, + nsIDOMNode **aNodeInserted) { nsAutoHTMLEditorLogLock logLock(this); @@ -435,11 +437,13 @@ nsHTMLEditorLog::InsertAsPlaintextQuotation(const nsString& aQuotedText) Flush(); } - return nsHTMLEditor::InsertAsPlaintextQuotation(aQuotedText); + return nsHTMLEditor::InsertAsPlaintextQuotation(aQuotedText, aNodeInserted); } NS_IMETHODIMP -nsHTMLEditorLog::InsertAsCitedQuotation(const nsString& aQuotedText, const nsString& aCitation) +nsHTMLEditorLog::InsertAsCitedQuotation(const nsString& aQuotedText, + const nsString& aCitation, + nsIDOMNode **aNodeInserted) { nsAutoHTMLEditorLogLock logLock(this); @@ -454,7 +458,8 @@ nsHTMLEditorLog::InsertAsCitedQuotation(const nsString& aQuotedText, const nsStr Flush(); } - return nsHTMLEditor::InsertAsCitedQuotation(aQuotedText, aCitation); + return nsHTMLEditor::InsertAsCitedQuotation(aQuotedText, aCitation, + aNodeInserted); } NS_IMETHODIMP diff --git a/mozilla/editor/base/nsHTMLEditorLog.h b/mozilla/editor/base/nsHTMLEditorLog.h index 5ea54998132..100836149af 100644 --- a/mozilla/editor/base/nsHTMLEditorLog.h +++ b/mozilla/editor/base/nsHTMLEditorLog.h @@ -75,9 +75,9 @@ public: NS_IMETHOD PasteAsQuotation(); NS_IMETHOD PasteAsPlaintextQuotation(); NS_IMETHOD PasteAsCitedQuotation(const nsString& aCitation); - NS_IMETHOD InsertAsQuotation(const nsString& aQuotedText); - NS_IMETHOD InsertAsPlaintextQuotation(const nsString& aQuotedText); - NS_IMETHOD InsertAsCitedQuotation(const nsString& aQuotedText, const nsString& aCitation); + NS_IMETHOD InsertAsQuotation(const nsString& aQuotedText, nsIDOMNode** aNodeInserted); + NS_IMETHOD InsertAsPlaintextQuotation(const nsString& aQuotedText, nsIDOMNode** aNodeInserted); + NS_IMETHOD InsertAsCitedQuotation(const nsString& aQuotedText, const nsString& aCitation, nsIDOMNode** aNodeInserted); NS_IMETHOD ApplyStyleSheet(const nsString& aURL); diff --git a/mozilla/editor/composer/src/nsEditorShell.cpp b/mozilla/editor/composer/src/nsEditorShell.cpp index 1010a14e772..4a79ce2e650 100644 --- a/mozilla/editor/composer/src/nsEditorShell.cpp +++ b/mozilla/editor/composer/src/nsEditorShell.cpp @@ -2115,7 +2115,8 @@ nsEditorShell::PasteAsCitedQuotation(const PRUnichar *cite) } NS_IMETHODIMP -nsEditorShell::InsertAsQuotation(const PRUnichar *quotedText) +nsEditorShell::InsertAsQuotation(const PRUnichar *quotedText, + nsIDOMNode** aNodeInserted) { nsresult err = NS_NOINTERFACE; @@ -2128,7 +2129,7 @@ nsEditorShell::InsertAsQuotation(const PRUnichar *quotedText) { nsCOMPtr mailEditor = do_QueryInterface(mEditor); if (mailEditor) - err = mailEditor->InsertAsQuotation(aQuotedText); + err = mailEditor->InsertAsQuotation(aQuotedText, aNodeInserted); } break; @@ -2140,7 +2141,9 @@ nsEditorShell::InsertAsQuotation(const PRUnichar *quotedText) } NS_IMETHODIMP -nsEditorShell::InsertAsCitedQuotation(const PRUnichar *quotedText, const PRUnichar *cite) +nsEditorShell::InsertAsCitedQuotation(const PRUnichar *quotedText, + const PRUnichar *cite, + nsIDOMNode** aNodeInserted) { nsresult err = NS_NOINTERFACE; @@ -2152,9 +2155,9 @@ nsEditorShell::InsertAsCitedQuotation(const PRUnichar *quotedText, const PRUnich case ePlainTextEditorType: case eHTMLTextEditorType: { - nsCOMPtr mailEditor = do_QueryInterface(mEditor); + nsCOMPtr mailEditor = do_QueryInterface(mEditor); if (mailEditor) - err = mailEditor->InsertAsQuotation(aQuotedText); + err = mailEditor->InsertAsQuotation(aQuotedText, aNodeInserted); } break; diff --git a/mozilla/editor/idl/nsIEditorShell.idl b/mozilla/editor/idl/nsIEditorShell.idl index cd8f1a6b9da..5151c1558c4 100644 --- a/mozilla/editor/idl/nsIEditorShell.idl +++ b/mozilla/editor/idl/nsIEditorShell.idl @@ -141,8 +141,9 @@ interface nsIEditorShell : nsISupports void PasteAsQuotation(); void PasteAsCitedQuotation(in wstring cite); - void InsertAsQuotation(in wstring quotedText); - void InsertAsCitedQuotation(in wstring quotedText, in wstring cite); + void InsertAsQuotation(in wstring quotedText, out nsIDOMNode nodeInserted); + void InsertAsCitedQuotation(in wstring quotedText, in wstring cite, + out nsIDOMNode nodeInserted); void SelectAll(); void DeleteSelection(in PRInt32 action); diff --git a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp index 7cebf591aed..e3930bb00cf 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp @@ -3613,7 +3613,7 @@ NS_IMETHODIMP nsHTMLEditor::PasteAsPlaintextQuotation() textDataObj->ToString ( &text ); stuffToPaste.SetString ( text, len ); nsAutoEditBatch beginBatching(this); - rv = InsertAsPlaintextQuotation(stuffToPaste); + rv = InsertAsPlaintextQuotation(stuffToPaste, 0); } } else if (flavor.Equals(kUnicodeMime)) @@ -3625,7 +3625,7 @@ NS_IMETHODIMP nsHTMLEditor::PasteAsPlaintextQuotation() textDataObj->ToString ( &text ); stuffToPaste.SetString ( text, len / 2 ); nsAutoEditBatch beginBatching(this); - rv = InsertAsPlaintextQuotation(stuffToPaste); + rv = InsertAsPlaintextQuotation(stuffToPaste, 0); } } nsCRT::free(flav); @@ -3634,17 +3634,20 @@ NS_IMETHODIMP nsHTMLEditor::PasteAsPlaintextQuotation() return rv; } -NS_IMETHODIMP nsHTMLEditor::InsertAsQuotation(const nsString& aQuotedText) +NS_IMETHODIMP nsHTMLEditor::InsertAsQuotation(const nsString& aQuotedText, + nsIDOMNode **aNodeInserted) { if (mFlags & eEditorPlaintextMask) - return InsertAsPlaintextQuotation(aQuotedText); + return InsertAsPlaintextQuotation(aQuotedText, aNodeInserted); nsAutoString citation (""); - return InsertAsCitedQuotation(aQuotedText, citation); + return InsertAsCitedQuotation(aQuotedText, citation, aNodeInserted); } // text insert. -NS_IMETHODIMP nsHTMLEditor::InsertAsPlaintextQuotation(const nsString& aQuotedText) +NS_IMETHODIMP +nsHTMLEditor::InsertAsPlaintextQuotation(const nsString& aQuotedText, + nsIDOMNode **aNodeInserted) { // Now we have the text. Cite it appropriately: nsCOMPtr citer; @@ -3693,11 +3696,22 @@ NS_IMETHODIMP nsHTMLEditor::InsertAsPlaintextQuotation(const nsString& aQuotedTe selection->Collapse(preNode, 0); } - return InsertText(quotedStuff); + rv = InsertText(quotedStuff); + if (aNodeInserted) + { + if (NS_SUCCEEDED(rv)) + { + *aNodeInserted = preNode; + NS_IF_ADDREF(*aNodeInserted); + } + } + return rv; } -NS_IMETHODIMP nsHTMLEditor::InsertAsCitedQuotation(const nsString& aQuotedText, - const nsString& aCitation) +NS_IMETHODIMP +nsHTMLEditor::InsertAsCitedQuotation(const nsString& aQuotedText, + const nsString& aCitation, + nsIDOMNode **aNodeInserted) { nsAutoEditBatch beginBatching(this); nsCOMPtr newNode; @@ -3725,6 +3739,14 @@ NS_IMETHODIMP nsHTMLEditor::InsertAsCitedQuotation(const nsString& aQuotedText, } res = InsertHTML(aQuotedText); + if (aNodeInserted) + { + if (NS_SUCCEEDED(res)) + { + *aNodeInserted = newNode; + NS_IF_ADDREF(*aNodeInserted); + } + } return res; } diff --git a/mozilla/editor/libeditor/html/nsHTMLEditor.h b/mozilla/editor/libeditor/html/nsHTMLEditor.h index 6807af8be06..36b27309d9e 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditor.h +++ b/mozilla/editor/libeditor/html/nsHTMLEditor.h @@ -143,9 +143,9 @@ public: NS_IMETHOD GetBodyWrapWidth(PRInt32 *aWrapColumn); NS_IMETHOD SetBodyWrapWidth(PRInt32 aWrapColumn); NS_IMETHOD PasteAsQuotation(); - NS_IMETHOD InsertAsQuotation(const nsString& aQuotedText); + NS_IMETHOD InsertAsQuotation(const nsString& aQuotedText, nsIDOMNode **aNodeInserted); NS_IMETHOD PasteAsCitedQuotation(const nsString& aCitation); - NS_IMETHOD InsertAsCitedQuotation(const nsString& aQuotedText, const nsString& aCitation); + NS_IMETHOD InsertAsCitedQuotation(const nsString& aQuotedText, const nsString& aCitation, nsIDOMNode **aNodeInserted); NS_IMETHOD GetEmbeddedObjects(nsISupportsArray** aNodeList); @@ -471,7 +471,8 @@ protected: // Methods for handling plaintext quotations NS_IMETHOD PasteAsPlaintextQuotation(); - NS_IMETHOD InsertAsPlaintextQuotation(const nsString& aQuotedText); + NS_IMETHOD InsertAsPlaintextQuotation(const nsString& aQuotedText, + nsIDOMNode **aNodeInserted); TypeInState *GetTypeInState(); diff --git a/mozilla/editor/libeditor/html/nsHTMLEditorLog.cpp b/mozilla/editor/libeditor/html/nsHTMLEditorLog.cpp index f56aabe3802..fd98ad8eaee 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditorLog.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditorLog.cpp @@ -405,7 +405,8 @@ nsHTMLEditorLog::PasteAsCitedQuotation(const nsString& aCitation) } NS_IMETHODIMP -nsHTMLEditorLog::InsertAsQuotation(const nsString& aQuotedText) +nsHTMLEditorLog::InsertAsQuotation(const nsString& aQuotedText, + nsIDOMNode **aNodeInserted) { nsAutoHTMLEditorLogLock logLock(this); @@ -418,11 +419,12 @@ nsHTMLEditorLog::InsertAsQuotation(const nsString& aQuotedText) Flush(); } - return nsHTMLEditor::InsertAsQuotation(aQuotedText); + return nsHTMLEditor::InsertAsQuotation(aQuotedText, aNodeInserted); } NS_IMETHODIMP -nsHTMLEditorLog::InsertAsPlaintextQuotation(const nsString& aQuotedText) +nsHTMLEditorLog::InsertAsPlaintextQuotation(const nsString& aQuotedText, + nsIDOMNode **aNodeInserted) { nsAutoHTMLEditorLogLock logLock(this); @@ -435,11 +437,13 @@ nsHTMLEditorLog::InsertAsPlaintextQuotation(const nsString& aQuotedText) Flush(); } - return nsHTMLEditor::InsertAsPlaintextQuotation(aQuotedText); + return nsHTMLEditor::InsertAsPlaintextQuotation(aQuotedText, aNodeInserted); } NS_IMETHODIMP -nsHTMLEditorLog::InsertAsCitedQuotation(const nsString& aQuotedText, const nsString& aCitation) +nsHTMLEditorLog::InsertAsCitedQuotation(const nsString& aQuotedText, + const nsString& aCitation, + nsIDOMNode **aNodeInserted) { nsAutoHTMLEditorLogLock logLock(this); @@ -454,7 +458,8 @@ nsHTMLEditorLog::InsertAsCitedQuotation(const nsString& aQuotedText, const nsStr Flush(); } - return nsHTMLEditor::InsertAsCitedQuotation(aQuotedText, aCitation); + return nsHTMLEditor::InsertAsCitedQuotation(aQuotedText, aCitation, + aNodeInserted); } NS_IMETHODIMP diff --git a/mozilla/editor/libeditor/html/nsHTMLEditorLog.h b/mozilla/editor/libeditor/html/nsHTMLEditorLog.h index 5ea54998132..100836149af 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditorLog.h +++ b/mozilla/editor/libeditor/html/nsHTMLEditorLog.h @@ -75,9 +75,9 @@ public: NS_IMETHOD PasteAsQuotation(); NS_IMETHOD PasteAsPlaintextQuotation(); NS_IMETHOD PasteAsCitedQuotation(const nsString& aCitation); - NS_IMETHOD InsertAsQuotation(const nsString& aQuotedText); - NS_IMETHOD InsertAsPlaintextQuotation(const nsString& aQuotedText); - NS_IMETHOD InsertAsCitedQuotation(const nsString& aQuotedText, const nsString& aCitation); + NS_IMETHOD InsertAsQuotation(const nsString& aQuotedText, nsIDOMNode** aNodeInserted); + NS_IMETHOD InsertAsPlaintextQuotation(const nsString& aQuotedText, nsIDOMNode** aNodeInserted); + NS_IMETHOD InsertAsCitedQuotation(const nsString& aQuotedText, const nsString& aCitation, nsIDOMNode** aNodeInserted); NS_IMETHOD ApplyStyleSheet(const nsString& aURL); diff --git a/mozilla/editor/public/nsIEditorMailSupport.h b/mozilla/editor/public/nsIEditorMailSupport.h index 74ff169a825..cc6e30d2168 100644 --- a/mozilla/editor/public/nsIEditorMailSupport.h +++ b/mozilla/editor/public/nsIEditorMailSupport.h @@ -65,7 +65,8 @@ public: * @param aQuotedText The actual text to be quoted * @param aCitation The "mid" URL of the source message */ - NS_IMETHOD InsertAsQuotation(const nsString& aQuotedText)=0; + NS_IMETHOD InsertAsQuotation(const nsString& aQuotedText, + nsIDOMNode** aNodeInserted)=0; /** * Document me! @@ -78,7 +79,8 @@ public: * */ NS_IMETHOD InsertAsCitedQuotation(const nsString& aQuotedText, - const nsString& aCitation)=0; + const nsString& aCitation, + nsIDOMNode** aNodeInserted)=0; /** * Document me! diff --git a/mozilla/mailnews/compose/src/nsMsgCompose.cpp b/mozilla/mailnews/compose/src/nsMsgCompose.cpp index 823ac0d0518..e2ad7a789cc 100644 --- a/mozilla/mailnews/compose/src/nsMsgCompose.cpp +++ b/mozilla/mailnews/compose/src/nsMsgCompose.cpp @@ -184,7 +184,7 @@ nsresult nsMsgCompose::ConvertAndLoadComposeWindow(nsIEditorShell *aEditorShell, } if (aBuf != "") - aEditorShell->InsertAsQuotation(aBuf.GetUnicode()); + aEditorShell->InsertAsQuotation(aBuf.GetUnicode(), 0); if (aSignature != "") {