diff --git a/editor/base/Makefile.in b/editor/base/Makefile.in index 1f65cb5ba347..31982fba66ec 100644 --- a/editor/base/Makefile.in +++ b/editor/base/Makefile.in @@ -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 \ diff --git a/editor/base/TransactionFactory.cpp b/editor/base/TransactionFactory.cpp index 42198a6d1d50..f3064c215d9f 100644 --- a/editor/base/TransactionFactory.cpp +++ b/editor/base/TransactionFactory.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 diff --git a/editor/base/makefile.win b/editor/base/makefile.win index 006b30c4728d..1f700fbbf106 100644 --- a/editor/base/makefile.win +++ b/editor/base/makefile.win @@ -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 \ diff --git a/editor/libeditor/base/TransactionFactory.cpp b/editor/libeditor/base/TransactionFactory.cpp index 42198a6d1d50..f3064c215d9f 100644 --- a/editor/libeditor/base/TransactionFactory.cpp +++ b/editor/libeditor/base/TransactionFactory.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