move the nsICmdLineHandler responsibilties from nsHTMLEditorLog to nsEditorService. r=sfraser

This commit is contained in:
sspitzer%netscape.com 2000-02-16 03:14:20 +00:00
Родитель 992a5ea3c3
Коммит bcc483c2cf
12 изменённых файлов: 26 добавлений и 36 удалений

Просмотреть файл

@ -32,6 +32,7 @@ IS_COMPONENT = 1
CPPSRCS = \
nsEditor.cpp \
nsEditorService.cpp \
nsEditorController.cpp \
nsEditorCommands.cpp \
nsEditorUtils.cpp \

Просмотреть файл

@ -27,6 +27,7 @@ LIBRARY_NAME=ender
CPPSRCS = \
nsEditor.cpp \
nsEditorService.cpp \
nsEditorController.cpp \
nsEditorCommands.cpp \
nsEditorUtils.cpp \

Просмотреть файл

@ -26,7 +26,7 @@
#include "nsEditorShell.h" // for the CID
#include "nsEditor.h" // for gInstanceCount
#include "nsEditorController.h" //CID
#include "nsEditorService.h"
////////////////////////////////////////////////////////////////////////
// Define the contructor function for the objects
@ -36,6 +36,7 @@
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorShell)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorController)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorService)
#ifdef ENABLE_EDITOR_API_LOG
#include "nsHTMLEditorLog.h"
@ -52,9 +53,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLEditor)
static nsModuleComponentInfo components[] = {
#ifdef ENABLE_EDITOR_API_LOG
{ "HTML Editor", NS_HTMLEDITOR_CID,
"component://netscape/editor/htmleditor", nsHTMLEditorLogConstructor,
nsHTMLEditorLog::RegisterProc,
nsHTMLEditorLog::UnregisterProc, },
"component://netscape/editor/htmleditor", nsHTMLEditorLogConstructor, },
#else
{ "HTML Editor", NS_HTMLEDITOR_CID,
"component://netscape/editor/htmleditor", nsHTMLEditorConstructor, },
@ -65,6 +64,10 @@ static nsModuleComponentInfo components[] = {
"component://netscape/editor/editorshell", nsEditorShellConstructor, },
{ "Editor Shell Spell Checker", NS_EDITORSHELL_CID,
"component://netscape/editor/editorspellcheck", nsEditorShellConstructor, },
{ "Editor Service", NS_EDITORSERVICE_CID,
"component://netscape/editor/editorservice", nsEditorServiceConstructor,
nsEditorService::RegisterProc,
nsEditorService::UnregisterProc, },
};
////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -33,7 +33,6 @@
#include "nsIDOMRange.h"
#include "nsHTMLEditorLog.h"
#include "nsCOMPtr.h"
#include "nsICmdLineHandler.h"
#include "nsEditorTxnLog.h"
@ -68,11 +67,6 @@ nsHTMLEditorLog::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(NS_GET_IID(nsICmdLineHandler))) {
*aInstancePtr = (void*)(nsICmdLineHandler*)this;
NS_ADDREF_THIS();
return NS_OK;
}
return nsHTMLEditor::QueryInterface(aIID, aInstancePtr);
}
@ -1399,5 +1393,3 @@ function EditorSetSelectionFromOffsets(selRanges)
}
#endif
CMDLINEHANDLER_IMPL(nsHTMLEditorLog,"-edit","general.startup.editor","chrome://editor/content/","Start with editor","component://netscape/editor/htmleditor","Editor Cmd Line Handler", PR_TRUE,"about:blank", PR_TRUE)

Просмотреть файл

@ -27,7 +27,6 @@
#include "nsIEditorLogging.h"
#include "nsIFileSpec.h"
#include "nsCOMPtr.h"
#include "nsICmdLineHandler.h"
class nsEditorTxnLog;
@ -35,8 +34,7 @@ class nsEditorTxnLog;
*
*/
class nsHTMLEditorLog : public nsHTMLEditor,
public nsIEditorLogging,
public nsICmdLineHandler
public nsIEditorLogging
{
private:
@ -50,9 +48,6 @@ public:
// Interfaces for AddRef, Release, and QueryInterface.
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSICMDLINEHANDLER
CMDLINEHANDLER_REGISTERPROC_DECLS
nsHTMLEditorLog();
virtual ~nsHTMLEditorLog();

Просмотреть файл

@ -23,3 +23,4 @@
nsIEditorShell.idl
nsIEditorSpellCheck.idl
nsIDocumentStateListener.idl
nsIEditorService.idl

Просмотреть файл

@ -32,6 +32,7 @@ XPIDLSRCS = \
nsIEditorShell.idl \
nsIEditorSpellCheck.idl \
nsIDocumentStateListener.idl \
nsIEditorService.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -30,6 +30,7 @@ XPIDL_MODULE=editor
XPIDLSRCS = .\nsIEditorShell.idl \
.\nsIEditorSpellCheck.idl \
.\nsIDocumentStateListener.idl \
.\nsIEditorService.idl \
$(NULL)
include <$(DEPTH)\config\rules.mak>

Просмотреть файл

@ -26,7 +26,7 @@
#include "nsEditorShell.h" // for the CID
#include "nsEditor.h" // for gInstanceCount
#include "nsEditorController.h" //CID
#include "nsEditorService.h"
////////////////////////////////////////////////////////////////////////
// Define the contructor function for the objects
@ -36,6 +36,7 @@
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorShell)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorController)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorService)
#ifdef ENABLE_EDITOR_API_LOG
#include "nsHTMLEditorLog.h"
@ -52,9 +53,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLEditor)
static nsModuleComponentInfo components[] = {
#ifdef ENABLE_EDITOR_API_LOG
{ "HTML Editor", NS_HTMLEDITOR_CID,
"component://netscape/editor/htmleditor", nsHTMLEditorLogConstructor,
nsHTMLEditorLog::RegisterProc,
nsHTMLEditorLog::UnregisterProc, },
"component://netscape/editor/htmleditor", nsHTMLEditorLogConstructor, },
#else
{ "HTML Editor", NS_HTMLEDITOR_CID,
"component://netscape/editor/htmleditor", nsHTMLEditorConstructor, },
@ -65,6 +64,10 @@ static nsModuleComponentInfo components[] = {
"component://netscape/editor/editorshell", nsEditorShellConstructor, },
{ "Editor Shell Spell Checker", NS_EDITORSHELL_CID,
"component://netscape/editor/editorspellcheck", nsEditorShellConstructor, },
{ "Editor Service", NS_EDITORSERVICE_CID,
"component://netscape/editor/editorservice", nsEditorServiceConstructor,
nsEditorService::RegisterProc,
nsEditorService::UnregisterProc, },
};
////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -33,7 +33,6 @@
#include "nsIDOMRange.h"
#include "nsHTMLEditorLog.h"
#include "nsCOMPtr.h"
#include "nsICmdLineHandler.h"
#include "nsEditorTxnLog.h"
@ -68,11 +67,6 @@ nsHTMLEditorLog::QueryInterface(REFNSIID aIID, void** aInstancePtr)
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(NS_GET_IID(nsICmdLineHandler))) {
*aInstancePtr = (void*)(nsICmdLineHandler*)this;
NS_ADDREF_THIS();
return NS_OK;
}
return nsHTMLEditor::QueryInterface(aIID, aInstancePtr);
}
@ -1399,5 +1393,3 @@ function EditorSetSelectionFromOffsets(selRanges)
}
#endif
CMDLINEHANDLER_IMPL(nsHTMLEditorLog,"-edit","general.startup.editor","chrome://editor/content/","Start with editor","component://netscape/editor/htmleditor","Editor Cmd Line Handler", PR_TRUE,"about:blank", PR_TRUE)

Просмотреть файл

@ -27,7 +27,6 @@
#include "nsIEditorLogging.h"
#include "nsIFileSpec.h"
#include "nsCOMPtr.h"
#include "nsICmdLineHandler.h"
class nsEditorTxnLog;
@ -35,8 +34,7 @@ class nsEditorTxnLog;
*
*/
class nsHTMLEditorLog : public nsHTMLEditor,
public nsIEditorLogging,
public nsICmdLineHandler
public nsIEditorLogging
{
private:
@ -50,9 +48,6 @@ public:
// Interfaces for AddRef, Release, and QueryInterface.
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSICMDLINEHANDLER
CMDLINEHANDLER_REGISTERPROC_DECLS
nsHTMLEditorLog();
virtual ~nsHTMLEditorLog();

Просмотреть файл

@ -10,6 +10,11 @@
0xed0244e0, 0xc144, 0x11d2, \
{ 0x8f, 0x4c, 0x0, 0x60, 0x08, 0x15, 0x9b, 0x0c } }
#define NS_EDITORSERVICE_CID \
{/* {91ea5158-1dd2-11b2-939c-cfe895090b1b}*/ \
0x91ea5158, 0x1dd2, 0x11b2, \
{ 0x93, 0x9c, 0xcf, 0xe8, 0x95, 0x09, 0x0b, 0x1b} }
#endif //NSEDITORCID_H___