Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

mozIPersonalDictionary

This interface represents a personal dictionary.
1.0
28
Introduced
Gecko 1.4.1
Inherits from: nsISupports Last changed in Gecko 1.7

Implemented by: @mozilla.org/spellchecker/personaldictionary;1.  To access this service, use

var personalDictionary = Components.classes["@mozilla.org/spellchecker/personaldictionary;1"]
                                   .getService(Components.interfaces.mozIPersonalDictionary);

Method overview

void addCorrection(in wstring word,in wstring correction, in wstring lang);
void addWord(in wstring word, in wstring lang);
boolean check(in wstring word, in wstring lang);
void endSession();
void getCorrection(in wstring word, [array, size_is(count)] out wstring words, out PRUint32 count);
void ignoreWord(in wstring word);
void load();
void removeCorrection(in wstring word,in wstring correction, in wstring lang);
void removeWord(in wstring word, in wstring lang);
void save();

Attributes

Attribute Type Description
wordList nsIStringEnumerator Get the (lexicographically sorted) list of words. Read only.

Methods

addCorrection()

Adds a misspelling to the list of corrections. Note that this method is not currently implemented. 

void addCorrection(
  in wstring word,
  in wstring correction,
  in wstring lang
);
Parameters
word
The incorrect spelling of the word to add to the list of corrections.
correction
The correct spelling of the word.
lang
The language of the word.

addWord()

Add a word to the personal dictionary.

void addWord(
  in wstring word,
  in wstring lang
);
Parameters
word
The word to add to the dictionary.
lang
The language of the word. Note that this parameter is currently unused.

check()

Checks a Unicode string.

boolean check(
  in wstring word,
  in wstring lang
);
Parameters
word
The word to check.
lang
The language of the word. Note that this parameter is currently ignored.
Return value

true if the word is in either the dictionary or the ignore list, false if it is not in either list.

endSession()

Clears the ignore list.

void endSession();
Parameters

None.

getCorrection()

Gets a list of previous corrections for the word.

void getCorrection(
  in wstring word,
  [array, size_is(count)] out wstring words,
  out PRUint32 count
);
Parameters
word
The word to get the list of corrections for.
words
The list of corrections.
count
The number of corrections in the list.

ignoreWord()

Adds a word to the ignore all list.

void ignoreWord(
  in wstring word
);
Parameters
word
The word to add to the ignore list.

load()

Loads the dictionary.

void load();
Parameters

None.

removeCorrection()

Removes a misspelling from the list of corrections. This removes a single misspelling and correction pair from the list.

void removeCorrection(
  in wstring word,
  in wstring correction,
  in wstring lang
);
Parameters
word
The incorrect spelling of the word to remove from the list of corrections.
correction
The correct spelling of the word.
lang
The language of the word.
Notes

Only an entry matching both word and correction will be removed from the list of corrections.

removeWord()

Removes a word from the personal dictionary.

void removeWord(
  in wstring word,
  in wstring lang
);
Parameters
word
The word to remove.
lang
The language of the word. Note that this parameter is currently ignored.

save()

Saves the dictionary.

void save();
Parameters

None.

Document Tags and Contributors

 Contributors to this page: Sheppy, Neil, trevorh
 Last updated by: Sheppy,