context: function undo() {	// skip if this is the first word!	var ti = this.currentTextIndex;	var wi = this.currentWordIndex;		if( this.wordWin.totalPreviousWords( ti, wi ) > 0 ) {		this.wordWin.removeFocus( ti, wi );		// go back to the last word index that was acted upon 		do {			// if the current word index is zero then reset the seed			if( this.currentWordIndex == 0 && this.currentTextIndex > 0 ) {				this.currentTextIndex--;				this.currentWordIndex = this.wordWin.totalWords( this.currentTextIndex )-1;				if( this.currentWordIndex < 0 ) this.currentWordIndex = 0;			} else {				if( this.currentWordIndex > 0 ) {					this.currentWordIndex--;				}			}		} while ( 			this.wordWin.totalWords( this.currentTextIndex ) == 0			|| this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromIgnrAll			|| this.wordFlags[this.currentTextIndex][this.currentWordIndex] == this.fromReplAll		); 		var text_idx = this.currentTextIndex;		var idx = this.currentWordIndex;		var preReplSpell = this.wordWin.originalSpellings[text_idx][idx];				// if we got back to the first word then set the Undo button back to disabled		if( this.wordWin.totalPreviousWords( text_idx, idx ) == 0 ) {			this.controlWin.disableUndo();		}			var i, j, origSpell ;		// examine what happened to this current word.		switch( this.wordFlags[text_idx][idx] ) {			// replace all: go through this and all the future occurances of the word 			// and revert them all to the original spelling and clear their flags			case this.replAllFlag :				for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) {					for( j = 0; j < this.wordWin.totalWords( i ); j++ ) {						if(( i == text_idx && j >= idx ) || i > text_idx ) {							origSpell = this.wordWin.originalSpellings[i][j];							if( origSpell == preReplSpell ) {								this._setWordText ( i, j, origSpell, undefined );							}						}					}				}				break;							// ignore all: go through all the future occurances of the word 			// and clear their flags			case this.ignrAllFlag :				for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) {					for( j = 0; j < this.wordWin.totalWords( i ); j++ ) {						if(( i == text_idx && j >= idx ) || i > text_idx ) {							origSpell = this.wordWin.originalSpellings[i][j];							if( origSpell == preReplSpell ) {								this.wordFlags[i][j] = undefined; 							}						}					}				}				break;							// replace: revert the word to its original spelling			case this.replWordFlag :				this._setWordText ( text_idx, idx, preReplSpell, undefined );				break;		}		// For all four cases, clear the wordFlag of this word. re-start the process		this.wordFlags[text_idx][idx] = undefined; 		this._spellcheck();	}}
meta: 1235	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1235/c3e806dd2e80d30e5028083f65e626da8d5acba4/spellChecker.js/clean/reference/library/src/webapp/editor/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js