From 7c4a361bb03a58faec6cfe3c32ad9820442df447 Mon Sep 17 00:00:00 2001 From: "sfraser%netscape.com" Date: Fri, 11 Jun 1999 18:57:33 +0000 Subject: [PATCH] Various minor changes to synch with others git-svn-id: svn://10.0.0.236/trunk@34809 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsEditorShell.cpp | 13 ++++++------- mozilla/editor/base/nsEditorShell.h | 2 +- mozilla/editor/composer/src/nsEditorShell.cpp | 13 ++++++------- mozilla/editor/composer/src/nsEditorShell.h | 2 +- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/mozilla/editor/base/nsEditorShell.cpp b/mozilla/editor/base/nsEditorShell.cpp index 205cfecae8d..a69700a51de 100644 --- a/mozilla/editor/base/nsEditorShell.cpp +++ b/mozilla/editor/base/nsEditorShell.cpp @@ -26,7 +26,7 @@ #include "prprf.h" #include "nsIComponentManager.h" //#include "nsAppCores.h" -//#include "nsAppCoresCIDs.h" +#include "nsAppCoresCIDs.h" #include "nsIDOMAppCoresManager.h" #include "nsIScriptContext.h" @@ -785,7 +785,6 @@ done: #else -#if 0 // This code is to ensure that the editor's pseudo-onload handler is always called. static NS_DEFINE_CID(kToolkitCoreCID, NS_TOOLKITCORE_CID); @@ -807,7 +806,7 @@ done: if (nsnull != toolkit) { nsServiceManager::ReleaseService(kToolkitCoreCID, toolkit); } -#endif + #endif return rv; @@ -1820,19 +1819,19 @@ nsEditorShell::CreateElementWithDefaults(const PRUnichar *tagName, nsIDOMElement NS_IMETHODIMP -nsEditorShell::InsertElement(nsIDOMElement *element, PRBool deleteSelection, nsIDOMElement **_retval) +nsEditorShell::InsertElement(nsIDOMElement *element, PRBool deleteSelection) { - if (!element || !_retval) + if (!element) return NS_ERROR_NULL_POINTER; nsresult result = NS_NOINTERFACE; - switch (mEditorType) + switch (mEditorType) { case eHTMLTextEditorType: { nsCOMPtr htmlEditor = do_QueryInterface(mEditor); if (htmlEditor) - result = htmlEditor->InsertElement(element, deleteSelection, _retval); + result = htmlEditor->InsertElement(element, deleteSelection); } break; default: diff --git a/mozilla/editor/base/nsEditorShell.h b/mozilla/editor/base/nsEditorShell.h index d377d811628..b4e29ee2f8e 100644 --- a/mozilla/editor/base/nsEditorShell.h +++ b/mozilla/editor/base/nsEditorShell.h @@ -135,7 +135,7 @@ class nsEditorShell : public nsIEditorShell, /* nsIDOMElement GetSelectedElement (in wstring tagName); */ NS_IMETHOD GetSelectedElement(const PRUnichar *tagName, nsIDOMElement **_retval); NS_IMETHOD CreateElementWithDefaults(const PRUnichar *tagName, nsIDOMElement **_retval); - NS_IMETHOD InsertElement(nsIDOMElement *element, PRBool deleteSelection, nsIDOMElement **_retval); + NS_IMETHOD InsertElement(nsIDOMElement *element, PRBool deleteSelection); NS_IMETHOD InsertLinkAroundSelection(nsIDOMElement *anchorElement); NS_IMETHOD SelectElement(nsIDOMElement *element); NS_IMETHOD SetSelectionAfterElement(nsIDOMElement *element); diff --git a/mozilla/editor/composer/src/nsEditorShell.cpp b/mozilla/editor/composer/src/nsEditorShell.cpp index 205cfecae8d..a69700a51de 100644 --- a/mozilla/editor/composer/src/nsEditorShell.cpp +++ b/mozilla/editor/composer/src/nsEditorShell.cpp @@ -26,7 +26,7 @@ #include "prprf.h" #include "nsIComponentManager.h" //#include "nsAppCores.h" -//#include "nsAppCoresCIDs.h" +#include "nsAppCoresCIDs.h" #include "nsIDOMAppCoresManager.h" #include "nsIScriptContext.h" @@ -785,7 +785,6 @@ done: #else -#if 0 // This code is to ensure that the editor's pseudo-onload handler is always called. static NS_DEFINE_CID(kToolkitCoreCID, NS_TOOLKITCORE_CID); @@ -807,7 +806,7 @@ done: if (nsnull != toolkit) { nsServiceManager::ReleaseService(kToolkitCoreCID, toolkit); } -#endif + #endif return rv; @@ -1820,19 +1819,19 @@ nsEditorShell::CreateElementWithDefaults(const PRUnichar *tagName, nsIDOMElement NS_IMETHODIMP -nsEditorShell::InsertElement(nsIDOMElement *element, PRBool deleteSelection, nsIDOMElement **_retval) +nsEditorShell::InsertElement(nsIDOMElement *element, PRBool deleteSelection) { - if (!element || !_retval) + if (!element) return NS_ERROR_NULL_POINTER; nsresult result = NS_NOINTERFACE; - switch (mEditorType) + switch (mEditorType) { case eHTMLTextEditorType: { nsCOMPtr htmlEditor = do_QueryInterface(mEditor); if (htmlEditor) - result = htmlEditor->InsertElement(element, deleteSelection, _retval); + result = htmlEditor->InsertElement(element, deleteSelection); } break; default: diff --git a/mozilla/editor/composer/src/nsEditorShell.h b/mozilla/editor/composer/src/nsEditorShell.h index d377d811628..b4e29ee2f8e 100644 --- a/mozilla/editor/composer/src/nsEditorShell.h +++ b/mozilla/editor/composer/src/nsEditorShell.h @@ -135,7 +135,7 @@ class nsEditorShell : public nsIEditorShell, /* nsIDOMElement GetSelectedElement (in wstring tagName); */ NS_IMETHOD GetSelectedElement(const PRUnichar *tagName, nsIDOMElement **_retval); NS_IMETHOD CreateElementWithDefaults(const PRUnichar *tagName, nsIDOMElement **_retval); - NS_IMETHOD InsertElement(nsIDOMElement *element, PRBool deleteSelection, nsIDOMElement **_retval); + NS_IMETHOD InsertElement(nsIDOMElement *element, PRBool deleteSelection); NS_IMETHOD InsertLinkAroundSelection(nsIDOMElement *anchorElement); NS_IMETHOD SelectElement(nsIDOMElement *element); NS_IMETHOD SetSelectionAfterElement(nsIDOMElement *element);