Fix for bug #79157: Resurrect plain text editor

Moved Citer/Wrap files into core editor list. Ifdef'd out HTML
specific transactions with ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY.

   editor/base/Makefile.in
   editor/base/TransactionFactory.cpp
   editor/base/makefile.win

r=akkana@netscape.com  sr=sfraser@netscape.com
This commit is contained in:
kin%netscape.com 2001-05-11 13:58:31 +00:00
Родитель 2c3595cab7
Коммит 91d049b213
4 изменённых файлов: 28 добавлений и 13 удалений

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

@ -33,6 +33,7 @@ IS_COMPONENT = 1
REQUIRES = xpcom string dom js locale layout uriloader widget txmgr htmlparser necko pref view appshell rdf webshell timer txtsvc intl lwbrk docshell chrome caps appcomps xuldoc gfx2 mozcomps windowwatcher
CPPSRCS = \
nsAOLCiter.cpp \
ChangeAttributeTxn.cpp \
CreateElementTxn.cpp \
DeleteElementTxn.cpp \
@ -54,11 +55,13 @@ CPPSRCS = \
nsEditProperty.cpp \
nsTextEditUtils.cpp \
nsHTMLEditUtils.cpp \
nsInternetCiter.cpp \
nsPlaintextDataTransfer.cpp \
nsPlaintextEditor.cpp \
nsSelectionState.cpp \
nsStyleSheetTxns.cpp \
nsTextEditRules.cpp \
nsWrapUtils.cpp \
PlaceholderTxn.cpp \
SplitElementTxn.cpp \
TransactionFactory.cpp \
@ -73,12 +76,13 @@ ifdef MOZ_BUILD_PLAINTEXT_EDITOR_CORE_ONLY
CPPSRCS += nsTextEditorReg.cpp
DEFINES += -DMOZILLA_PLAINTEXT_EDITOR_ONLY
else
# Building the full blown HTML Editor so add it's source files and objects:
CPPSRCS += nsAOLCiter.cpp \
nsEditorParserObserver.cpp \
CPPSRCS += nsEditorParserObserver.cpp \
nsEditorRegistration.cpp \
nsEditorShell.cpp \
nsEditorShellMouseListener.cpp \
@ -88,10 +92,8 @@ CPPSRCS += nsAOLCiter.cpp \
nsHTMLEditorStyle.cpp \
nsHTMLEditRules.cpp \
nsInterfaceState.cpp \
nsInternetCiter.cpp \
nsTableEditor.cpp \
nsWrapUtils.cpp \
nsWSRunObject.cpp \
nsWSRunObject.cpp \
TextEditorTest.cpp \
TypeInState.cpp \
SetDocTitleTxn.cpp \

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

@ -35,7 +35,10 @@
#include "JoinElementTxn.h"
#include "nsStyleSheetTxns.h"
#include "IMETextTxn.h"
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
#include "SetDocTitleTxn.h"
#endif // MOZILLA_PLAINTEXT_EDITOR_ONLY
TransactionFactory::TransactionFactory()
{
@ -76,8 +79,10 @@ TransactionFactory::GetNewTransaction(REFNSIID aTxnType, EditTxn **aResult)
*aResult = new AddStyleSheetTxn();
else if (aTxnType.Equals(RemoveStyleSheetTxn::GetCID()))
*aResult = new RemoveStyleSheetTxn();
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
else if (aTxnType.Equals(SetDocTitleTxn::GetCID()))
*aResult = new SetDocTitleTxn();
#endif // MOZILLA_PLAINTEXT_EDITOR_ONLY
else if (aTxnType.Equals(PlaceholderTxn::GetCID()))
*aResult = new PlaceholderTxn();
else

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

@ -32,6 +32,7 @@ LIBRARY_NAME=editor
# Editor Core Source Files and Objects:
CPPSRCS = \
nsAOLCiter.cpp \
ChangeAttributeTxn.cpp \
CreateElementTxn.cpp \
DeleteElementTxn.cpp \
@ -51,19 +52,22 @@ CPPSRCS = \
nsEditorEventListeners.cpp \
nsEditorUtils.cpp \
nsEditProperty.cpp \
nsTextEditUtils.cpp \
nsInternetCiter.cpp \
nsHTMLEditUtils.cpp \
nsPlaintextDataTransfer.cpp \
nsPlaintextEditor.cpp \
nsSelectionState.cpp \
nsStyleSheetTxns.cpp \
nsTextEditRules.cpp \
nsTextEditUtils.cpp \
nsWrapUtils.cpp \
PlaceholderTxn.cpp \
SplitElementTxn.cpp \
TransactionFactory.cpp \
$(NULL)
CPP_OBJS = \
.\$(OBJDIR)\nsAOLCiter.obj \
.\$(OBJDIR)\ChangeAttributeTxn.obj \
.\$(OBJDIR)\CreateElementTxn.obj \
.\$(OBJDIR)\DeleteElementTxn.obj \
@ -83,16 +87,18 @@ CPP_OBJS = \
.\$(OBJDIR)\nsEditor.obj \
.\$(OBJDIR)\nsEditorUtils.obj \
.\$(OBJDIR)\nsEditProperty.obj \
.\$(OBJDIR)\nsTextEditUtils.obj \
.\$(OBJDIR)\nsHTMLEditUtils.obj \
.\$(OBJDIR)\nsInternetCiter.obj \
.\$(OBJDIR)\nsPlaintextDataTransfer.obj \
.\$(OBJDIR)\nsPlaintextEditor.obj \
.\$(OBJDIR)\nsSelectionState.obj \
.\$(OBJDIR)\nsStyleSheetTxns.obj \
.\$(OBJDIR)\nsTextEditRules.obj \
.\$(OBJDIR)\nsTextEditUtils.obj \
.\$(OBJDIR)\PlaceholderTxn.obj \
.\$(OBJDIR)\SplitElementTxn.obj \
.\$(OBJDIR)\TransactionFactory.obj \
.\$(OBJDIR)\nsWrapUtils.obj \
$(NULL)
!if defined(MOZ_BUILD_PLAINTEXT_EDITOR_CORE_ONLY)
@ -107,12 +113,14 @@ CPPSRCS = $(CPPSRCS) \
CPP_OBJS = $(CPP_OBJS) \
.\$(OBJDIR)\nsTextEditorReg.obj \
$(NULL)
DEFINES = -DMOZILLA_PLAINTEXT_EDITOR_ONLY $(DEFINES)
!else
# Building the full blown HTML Editor so add it's source files and objects:
CPPSRCS = $(CPPSRCS) \
nsAOLCiter.cpp \
nsEditorParserObserver.cpp \
nsEditorRegistration.cpp \
nsEditorService.cpp \
@ -123,9 +131,7 @@ CPPSRCS = $(CPPSRCS) \
nsHTMLEditorStyle.cpp \
nsHTMLEditRules.cpp \
nsInterfaceState.cpp \
nsInternetCiter.cpp \
nsTableEditor.cpp \
nsWrapUtils.cpp \
nsWSRunObject.cpp \
TextEditorTest.cpp \
TypeInState.cpp \
@ -133,7 +139,6 @@ CPPSRCS = $(CPPSRCS) \
$(NULL)
CPP_OBJS = $(CPP_OBJS) \
.\$(OBJDIR)\nsAOLCiter.obj \
.\$(OBJDIR)\nsEditorParserObserver.obj \
.\$(OBJDIR)\nsEditorRegistration.obj \
.\$(OBJDIR)\nsEditorService.obj \
@ -144,9 +149,7 @@ CPP_OBJS = $(CPP_OBJS) \
.\$(OBJDIR)\nsHTMLEditorStyle.obj \
.\$(OBJDIR)\nsHTMLEditRules.obj \
.\$(OBJDIR)\nsInterfaceState.obj \
.\$(OBJDIR)\nsInternetCiter.obj \
.\$(OBJDIR)\nsTableEditor.obj \
.\$(OBJDIR)\nsWrapUtils.obj \
.\$(OBJDIR)\nsWSRunObject.obj \
.\$(OBJDIR)\TextEditorTest.obj \
.\$(OBJDIR)\TypeInState.obj \

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

@ -35,7 +35,10 @@
#include "JoinElementTxn.h"
#include "nsStyleSheetTxns.h"
#include "IMETextTxn.h"
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
#include "SetDocTitleTxn.h"
#endif // MOZILLA_PLAINTEXT_EDITOR_ONLY
TransactionFactory::TransactionFactory()
{
@ -76,8 +79,10 @@ TransactionFactory::GetNewTransaction(REFNSIID aTxnType, EditTxn **aResult)
*aResult = new AddStyleSheetTxn();
else if (aTxnType.Equals(RemoveStyleSheetTxn::GetCID()))
*aResult = new RemoveStyleSheetTxn();
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
else if (aTxnType.Equals(SetDocTitleTxn::GetCID()))
*aResult = new SetDocTitleTxn();
#endif // MOZILLA_PLAINTEXT_EDITOR_ONLY
else if (aTxnType.Equals(PlaceholderTxn::GetCID()))
*aResult = new PlaceholderTxn();
else