mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 22:35:43 +00:00
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:
parent
2c3595cab7
commit
91d049b213
@ -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
|
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 = \
|
CPPSRCS = \
|
||||||
|
nsAOLCiter.cpp \
|
||||||
ChangeAttributeTxn.cpp \
|
ChangeAttributeTxn.cpp \
|
||||||
CreateElementTxn.cpp \
|
CreateElementTxn.cpp \
|
||||||
DeleteElementTxn.cpp \
|
DeleteElementTxn.cpp \
|
||||||
@ -54,11 +55,13 @@ CPPSRCS = \
|
|||||||
nsEditProperty.cpp \
|
nsEditProperty.cpp \
|
||||||
nsTextEditUtils.cpp \
|
nsTextEditUtils.cpp \
|
||||||
nsHTMLEditUtils.cpp \
|
nsHTMLEditUtils.cpp \
|
||||||
|
nsInternetCiter.cpp \
|
||||||
nsPlaintextDataTransfer.cpp \
|
nsPlaintextDataTransfer.cpp \
|
||||||
nsPlaintextEditor.cpp \
|
nsPlaintextEditor.cpp \
|
||||||
nsSelectionState.cpp \
|
nsSelectionState.cpp \
|
||||||
nsStyleSheetTxns.cpp \
|
nsStyleSheetTxns.cpp \
|
||||||
nsTextEditRules.cpp \
|
nsTextEditRules.cpp \
|
||||||
|
nsWrapUtils.cpp \
|
||||||
PlaceholderTxn.cpp \
|
PlaceholderTxn.cpp \
|
||||||
SplitElementTxn.cpp \
|
SplitElementTxn.cpp \
|
||||||
TransactionFactory.cpp \
|
TransactionFactory.cpp \
|
||||||
@ -73,12 +76,13 @@ ifdef MOZ_BUILD_PLAINTEXT_EDITOR_CORE_ONLY
|
|||||||
|
|
||||||
CPPSRCS += nsTextEditorReg.cpp
|
CPPSRCS += nsTextEditorReg.cpp
|
||||||
|
|
||||||
|
DEFINES += -DMOZILLA_PLAINTEXT_EDITOR_ONLY
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
# Building the full blown HTML Editor so add it's source files and objects:
|
# Building the full blown HTML Editor so add it's source files and objects:
|
||||||
|
|
||||||
CPPSRCS += nsAOLCiter.cpp \
|
CPPSRCS += nsEditorParserObserver.cpp \
|
||||||
nsEditorParserObserver.cpp \
|
|
||||||
nsEditorRegistration.cpp \
|
nsEditorRegistration.cpp \
|
||||||
nsEditorShell.cpp \
|
nsEditorShell.cpp \
|
||||||
nsEditorShellMouseListener.cpp \
|
nsEditorShellMouseListener.cpp \
|
||||||
@ -88,10 +92,8 @@ CPPSRCS += nsAOLCiter.cpp \
|
|||||||
nsHTMLEditorStyle.cpp \
|
nsHTMLEditorStyle.cpp \
|
||||||
nsHTMLEditRules.cpp \
|
nsHTMLEditRules.cpp \
|
||||||
nsInterfaceState.cpp \
|
nsInterfaceState.cpp \
|
||||||
nsInternetCiter.cpp \
|
|
||||||
nsTableEditor.cpp \
|
nsTableEditor.cpp \
|
||||||
nsWrapUtils.cpp \
|
nsWSRunObject.cpp \
|
||||||
nsWSRunObject.cpp \
|
|
||||||
TextEditorTest.cpp \
|
TextEditorTest.cpp \
|
||||||
TypeInState.cpp \
|
TypeInState.cpp \
|
||||||
SetDocTitleTxn.cpp \
|
SetDocTitleTxn.cpp \
|
||||||
|
@ -35,7 +35,10 @@
|
|||||||
#include "JoinElementTxn.h"
|
#include "JoinElementTxn.h"
|
||||||
#include "nsStyleSheetTxns.h"
|
#include "nsStyleSheetTxns.h"
|
||||||
#include "IMETextTxn.h"
|
#include "IMETextTxn.h"
|
||||||
|
|
||||||
|
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
|
||||||
#include "SetDocTitleTxn.h"
|
#include "SetDocTitleTxn.h"
|
||||||
|
#endif // MOZILLA_PLAINTEXT_EDITOR_ONLY
|
||||||
|
|
||||||
TransactionFactory::TransactionFactory()
|
TransactionFactory::TransactionFactory()
|
||||||
{
|
{
|
||||||
@ -76,8 +79,10 @@ TransactionFactory::GetNewTransaction(REFNSIID aTxnType, EditTxn **aResult)
|
|||||||
*aResult = new AddStyleSheetTxn();
|
*aResult = new AddStyleSheetTxn();
|
||||||
else if (aTxnType.Equals(RemoveStyleSheetTxn::GetCID()))
|
else if (aTxnType.Equals(RemoveStyleSheetTxn::GetCID()))
|
||||||
*aResult = new RemoveStyleSheetTxn();
|
*aResult = new RemoveStyleSheetTxn();
|
||||||
|
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
|
||||||
else if (aTxnType.Equals(SetDocTitleTxn::GetCID()))
|
else if (aTxnType.Equals(SetDocTitleTxn::GetCID()))
|
||||||
*aResult = new SetDocTitleTxn();
|
*aResult = new SetDocTitleTxn();
|
||||||
|
#endif // MOZILLA_PLAINTEXT_EDITOR_ONLY
|
||||||
else if (aTxnType.Equals(PlaceholderTxn::GetCID()))
|
else if (aTxnType.Equals(PlaceholderTxn::GetCID()))
|
||||||
*aResult = new PlaceholderTxn();
|
*aResult = new PlaceholderTxn();
|
||||||
else
|
else
|
||||||
|
@ -32,6 +32,7 @@ LIBRARY_NAME=editor
|
|||||||
# Editor Core Source Files and Objects:
|
# Editor Core Source Files and Objects:
|
||||||
|
|
||||||
CPPSRCS = \
|
CPPSRCS = \
|
||||||
|
nsAOLCiter.cpp \
|
||||||
ChangeAttributeTxn.cpp \
|
ChangeAttributeTxn.cpp \
|
||||||
CreateElementTxn.cpp \
|
CreateElementTxn.cpp \
|
||||||
DeleteElementTxn.cpp \
|
DeleteElementTxn.cpp \
|
||||||
@ -51,19 +52,22 @@ CPPSRCS = \
|
|||||||
nsEditorEventListeners.cpp \
|
nsEditorEventListeners.cpp \
|
||||||
nsEditorUtils.cpp \
|
nsEditorUtils.cpp \
|
||||||
nsEditProperty.cpp \
|
nsEditProperty.cpp \
|
||||||
nsTextEditUtils.cpp \
|
nsInternetCiter.cpp \
|
||||||
nsHTMLEditUtils.cpp \
|
nsHTMLEditUtils.cpp \
|
||||||
nsPlaintextDataTransfer.cpp \
|
nsPlaintextDataTransfer.cpp \
|
||||||
nsPlaintextEditor.cpp \
|
nsPlaintextEditor.cpp \
|
||||||
nsSelectionState.cpp \
|
nsSelectionState.cpp \
|
||||||
nsStyleSheetTxns.cpp \
|
nsStyleSheetTxns.cpp \
|
||||||
nsTextEditRules.cpp \
|
nsTextEditRules.cpp \
|
||||||
|
nsTextEditUtils.cpp \
|
||||||
|
nsWrapUtils.cpp \
|
||||||
PlaceholderTxn.cpp \
|
PlaceholderTxn.cpp \
|
||||||
SplitElementTxn.cpp \
|
SplitElementTxn.cpp \
|
||||||
TransactionFactory.cpp \
|
TransactionFactory.cpp \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
CPP_OBJS = \
|
CPP_OBJS = \
|
||||||
|
.\$(OBJDIR)\nsAOLCiter.obj \
|
||||||
.\$(OBJDIR)\ChangeAttributeTxn.obj \
|
.\$(OBJDIR)\ChangeAttributeTxn.obj \
|
||||||
.\$(OBJDIR)\CreateElementTxn.obj \
|
.\$(OBJDIR)\CreateElementTxn.obj \
|
||||||
.\$(OBJDIR)\DeleteElementTxn.obj \
|
.\$(OBJDIR)\DeleteElementTxn.obj \
|
||||||
@ -83,16 +87,18 @@ CPP_OBJS = \
|
|||||||
.\$(OBJDIR)\nsEditor.obj \
|
.\$(OBJDIR)\nsEditor.obj \
|
||||||
.\$(OBJDIR)\nsEditorUtils.obj \
|
.\$(OBJDIR)\nsEditorUtils.obj \
|
||||||
.\$(OBJDIR)\nsEditProperty.obj \
|
.\$(OBJDIR)\nsEditProperty.obj \
|
||||||
.\$(OBJDIR)\nsTextEditUtils.obj \
|
|
||||||
.\$(OBJDIR)\nsHTMLEditUtils.obj \
|
.\$(OBJDIR)\nsHTMLEditUtils.obj \
|
||||||
|
.\$(OBJDIR)\nsInternetCiter.obj \
|
||||||
.\$(OBJDIR)\nsPlaintextDataTransfer.obj \
|
.\$(OBJDIR)\nsPlaintextDataTransfer.obj \
|
||||||
.\$(OBJDIR)\nsPlaintextEditor.obj \
|
.\$(OBJDIR)\nsPlaintextEditor.obj \
|
||||||
.\$(OBJDIR)\nsSelectionState.obj \
|
.\$(OBJDIR)\nsSelectionState.obj \
|
||||||
.\$(OBJDIR)\nsStyleSheetTxns.obj \
|
.\$(OBJDIR)\nsStyleSheetTxns.obj \
|
||||||
.\$(OBJDIR)\nsTextEditRules.obj \
|
.\$(OBJDIR)\nsTextEditRules.obj \
|
||||||
|
.\$(OBJDIR)\nsTextEditUtils.obj \
|
||||||
.\$(OBJDIR)\PlaceholderTxn.obj \
|
.\$(OBJDIR)\PlaceholderTxn.obj \
|
||||||
.\$(OBJDIR)\SplitElementTxn.obj \
|
.\$(OBJDIR)\SplitElementTxn.obj \
|
||||||
.\$(OBJDIR)\TransactionFactory.obj \
|
.\$(OBJDIR)\TransactionFactory.obj \
|
||||||
|
.\$(OBJDIR)\nsWrapUtils.obj \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
!if defined(MOZ_BUILD_PLAINTEXT_EDITOR_CORE_ONLY)
|
!if defined(MOZ_BUILD_PLAINTEXT_EDITOR_CORE_ONLY)
|
||||||
@ -107,12 +113,14 @@ CPPSRCS = $(CPPSRCS) \
|
|||||||
CPP_OBJS = $(CPP_OBJS) \
|
CPP_OBJS = $(CPP_OBJS) \
|
||||||
.\$(OBJDIR)\nsTextEditorReg.obj \
|
.\$(OBJDIR)\nsTextEditorReg.obj \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
DEFINES = -DMOZILLA_PLAINTEXT_EDITOR_ONLY $(DEFINES)
|
||||||
|
|
||||||
!else
|
!else
|
||||||
|
|
||||||
# Building the full blown HTML Editor so add it's source files and objects:
|
# Building the full blown HTML Editor so add it's source files and objects:
|
||||||
|
|
||||||
CPPSRCS = $(CPPSRCS) \
|
CPPSRCS = $(CPPSRCS) \
|
||||||
nsAOLCiter.cpp \
|
|
||||||
nsEditorParserObserver.cpp \
|
nsEditorParserObserver.cpp \
|
||||||
nsEditorRegistration.cpp \
|
nsEditorRegistration.cpp \
|
||||||
nsEditorService.cpp \
|
nsEditorService.cpp \
|
||||||
@ -123,9 +131,7 @@ CPPSRCS = $(CPPSRCS) \
|
|||||||
nsHTMLEditorStyle.cpp \
|
nsHTMLEditorStyle.cpp \
|
||||||
nsHTMLEditRules.cpp \
|
nsHTMLEditRules.cpp \
|
||||||
nsInterfaceState.cpp \
|
nsInterfaceState.cpp \
|
||||||
nsInternetCiter.cpp \
|
|
||||||
nsTableEditor.cpp \
|
nsTableEditor.cpp \
|
||||||
nsWrapUtils.cpp \
|
|
||||||
nsWSRunObject.cpp \
|
nsWSRunObject.cpp \
|
||||||
TextEditorTest.cpp \
|
TextEditorTest.cpp \
|
||||||
TypeInState.cpp \
|
TypeInState.cpp \
|
||||||
@ -133,7 +139,6 @@ CPPSRCS = $(CPPSRCS) \
|
|||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
CPP_OBJS = $(CPP_OBJS) \
|
CPP_OBJS = $(CPP_OBJS) \
|
||||||
.\$(OBJDIR)\nsAOLCiter.obj \
|
|
||||||
.\$(OBJDIR)\nsEditorParserObserver.obj \
|
.\$(OBJDIR)\nsEditorParserObserver.obj \
|
||||||
.\$(OBJDIR)\nsEditorRegistration.obj \
|
.\$(OBJDIR)\nsEditorRegistration.obj \
|
||||||
.\$(OBJDIR)\nsEditorService.obj \
|
.\$(OBJDIR)\nsEditorService.obj \
|
||||||
@ -144,9 +149,7 @@ CPP_OBJS = $(CPP_OBJS) \
|
|||||||
.\$(OBJDIR)\nsHTMLEditorStyle.obj \
|
.\$(OBJDIR)\nsHTMLEditorStyle.obj \
|
||||||
.\$(OBJDIR)\nsHTMLEditRules.obj \
|
.\$(OBJDIR)\nsHTMLEditRules.obj \
|
||||||
.\$(OBJDIR)\nsInterfaceState.obj \
|
.\$(OBJDIR)\nsInterfaceState.obj \
|
||||||
.\$(OBJDIR)\nsInternetCiter.obj \
|
|
||||||
.\$(OBJDIR)\nsTableEditor.obj \
|
.\$(OBJDIR)\nsTableEditor.obj \
|
||||||
.\$(OBJDIR)\nsWrapUtils.obj \
|
|
||||||
.\$(OBJDIR)\nsWSRunObject.obj \
|
.\$(OBJDIR)\nsWSRunObject.obj \
|
||||||
.\$(OBJDIR)\TextEditorTest.obj \
|
.\$(OBJDIR)\TextEditorTest.obj \
|
||||||
.\$(OBJDIR)\TypeInState.obj \
|
.\$(OBJDIR)\TypeInState.obj \
|
||||||
|
@ -35,7 +35,10 @@
|
|||||||
#include "JoinElementTxn.h"
|
#include "JoinElementTxn.h"
|
||||||
#include "nsStyleSheetTxns.h"
|
#include "nsStyleSheetTxns.h"
|
||||||
#include "IMETextTxn.h"
|
#include "IMETextTxn.h"
|
||||||
|
|
||||||
|
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
|
||||||
#include "SetDocTitleTxn.h"
|
#include "SetDocTitleTxn.h"
|
||||||
|
#endif // MOZILLA_PLAINTEXT_EDITOR_ONLY
|
||||||
|
|
||||||
TransactionFactory::TransactionFactory()
|
TransactionFactory::TransactionFactory()
|
||||||
{
|
{
|
||||||
@ -76,8 +79,10 @@ TransactionFactory::GetNewTransaction(REFNSIID aTxnType, EditTxn **aResult)
|
|||||||
*aResult = new AddStyleSheetTxn();
|
*aResult = new AddStyleSheetTxn();
|
||||||
else if (aTxnType.Equals(RemoveStyleSheetTxn::GetCID()))
|
else if (aTxnType.Equals(RemoveStyleSheetTxn::GetCID()))
|
||||||
*aResult = new RemoveStyleSheetTxn();
|
*aResult = new RemoveStyleSheetTxn();
|
||||||
|
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
|
||||||
else if (aTxnType.Equals(SetDocTitleTxn::GetCID()))
|
else if (aTxnType.Equals(SetDocTitleTxn::GetCID()))
|
||||||
*aResult = new SetDocTitleTxn();
|
*aResult = new SetDocTitleTxn();
|
||||||
|
#endif // MOZILLA_PLAINTEXT_EDITOR_ONLY
|
||||||
else if (aTxnType.Equals(PlaceholderTxn::GetCID()))
|
else if (aTxnType.Equals(PlaceholderTxn::GetCID()))
|
||||||
*aResult = new PlaceholderTxn();
|
*aResult = new PlaceholderTxn();
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user