Bug 775914 - Don't copy nsEditor::OperationID into mozInlineSpellChecker; r=ehsan

This commit is contained in:
Aryeh Gregor 2012-07-22 12:01:25 +03:00
parent cd25ad4136
commit 6f1929b11b
3 changed files with 4 additions and 42 deletions

View File

@ -37,4 +37,5 @@ include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES += \
-I$(topsrcdir)/xpcom/io \
-I$(topsrcdir)/content/base/src \
-I$(topsrcdir)/editor/libeditor/base \
$(NULL)

View File

@ -62,6 +62,7 @@
#include "nsGUIEvent.h"
#include "nsRange.h"
#include "nsContentUtils.h"
#include "nsEditor.h"
// Set to spew messages to the console about what is happening.
//#define DEBUG_INLINESPELL
@ -119,7 +120,7 @@ mozInlineSpellStatus::InitForEditorChange(
getter_AddRefs(mAnchorRange));
NS_ENSURE_SUCCESS(rv, rv);
if (aAction == mozInlineSpellChecker::kOpDeleteSelection) {
if (aAction == nsEditor::kOpDeleteSelection) {
// Deletes are easy, the range is just the current anchor. We set the range
// to check to be empty, FinishInitOnEvent will fill in the range to be
// the current word.
@ -152,7 +153,7 @@ mozInlineSpellStatus::InitForEditorChange(
// On insert save this range: DoSpellCheck optimizes things in this range.
// Otherwise, just leave this NULL.
if (aAction == mozInlineSpellChecker::kOpInsertText)
if (aAction == nsEditor::kOpInsertText)
mCreatedRange = mRange;
// if we were given a range, we need to expand our range to encompass it

View File

@ -157,46 +157,6 @@ private:
// the whole document.
bool mFullSpellCheckScheduled;
// TODO: these should be defined somewhere so that they don't have to be copied
// from editor!
enum OperationID
{
kOpIgnore = -1,
kOpNone = 0,
kOpUndo,
kOpRedo,
kOpInsertNode,
kOpCreateNode,
kOpDeleteNode,
kOpSplitNode,
kOpJoinNode,
kOpDeleteSelection,
kOpInsertBreak = 1000,
kOpInsertText = 1001,
kOpInsertIMEText = 1002,
kOpDeleteText = 1003,
kOpMakeList = 3001,
kOpIndent = 3002,
kOpOutdent = 3003,
kOpAlign = 3004,
kOpMakeBasicBlock = 3005,
kOpRemoveList = 3006,
kOpMakeDefListItem = 3007,
kOpInsertElement = 3008,
kOpInsertQuotation = 3009,
kOpSetTextProperty = 3010,
kOpRemoveTextProperty = 3011,
kOpHTMLPaste = 3012,
kOpLoadHTML = 3013,
kOpResetTextProperties = 3014,
kOpSetAbsolutePosition = 3015,
kOpRemoveAbsolutePosition = 3016,
kOpDecreaseZIndex = 3017,
kOpIncreaseZIndex = 3018
};
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS