diff --git a/calendar/base/modules/calExtract.jsm b/calendar/base/modules/calExtract.jsm index 99aec81dcc..819e10eb5b 100644 --- a/calendar/base/modules/calExtract.jsm +++ b/calendar/base/modules/calExtract.jsm @@ -144,10 +144,7 @@ Extractor.prototype = { let spellchecker = Cc["@mozilla.org/spellchecker/engine;1"] .getService(Ci.mozISpellCheckingEngine); - let arr = {}; - let cnt = {}; - spellchecker.getDictionaryList(arr, cnt); - let dicts = arr.value; + let dicts = spellchecker.getDictionaryList(); if (dicts.length == 0) { cal.LOG("[calExtract] There are no dictionaries installed and " + diff --git a/mail/components/compose/content/MsgComposeCommands.js b/mail/components/compose/content/MsgComposeCommands.js index 3de1de3706..850e38f73e 100644 --- a/mail/components/compose/content/MsgComposeCommands.js +++ b/mail/components/compose/content/MsgComposeCommands.js @@ -2348,11 +2348,9 @@ function getValidSpellcheckerDictionary(draftLanguage) { let prefValue = Services.prefs.getCharPref("spellchecker.dictionary"); let spellChecker = Cc["@mozilla.org/spellchecker/engine;1"] .getService(Ci.mozISpellCheckingEngine); - let o1 = {}; - let o2 = {}; - spellChecker.getDictionaryList(o1, o2); - let dictList = o1.value; - let count = o2.value; + + let dictList = spellChecker.getDictionaryList(); + let count = dictList.length; if (count == 0) { // If there are no dictionaries, we can't check the value, so return it. diff --git a/mail/components/preferences/compose.js b/mail/components/preferences/compose.js index e7022bfd07..1aa40ec753 100644 --- a/mail/components/preferences/compose.js +++ b/mail/components/preferences/compose.js @@ -185,16 +185,12 @@ var gComposePane = { initLanguageMenu() { var languageMenuList = document.getElementById("languageMenuList"); this.mSpellChecker = Cc["@mozilla.org/spellchecker/engine;1"].getService(Ci.mozISpellCheckingEngine); - var o1 = {}; - var o2 = {}; // Get the list of dictionaries from // the spellchecker. - this.mSpellChecker.getDictionaryList(o1, o2); - - var dictList = o1.value; - var count = o2.value; + var dictList = this.mSpellChecker.getDictionaryList(); + var count = dictList.length; // if we don't have any dictionaries installed, disable the menu list languageMenuList.disabled = !count; diff --git a/suite/components/nsSuiteGlue.js b/suite/components/nsSuiteGlue.js index 49d89926e1..1deacf7594 100644 --- a/suite/components/nsSuiteGlue.js +++ b/suite/components/nsSuiteGlue.js @@ -1162,9 +1162,7 @@ SuiteGlue.prototype = { var spellChecker = Cc["@mozilla.org/spellchecker/engine;1"] .getService(Ci.mozISpellCheckingEngine); - var o1 = {}; - spellChecker.getDictionaryList(o1, {}); - var dictList = o1.value; + var dictList = spellChecker.getDictionaryList(); // If the preference contains an invalid dictionary, set it to a valid // dictionary, any dictionary will do. if (dictList.length && dictList.indexOf(prefValue) < 0) diff --git a/suite/components/pref/content/pref-spelling.js b/suite/components/pref/content/pref-spelling.js index 6176dc05dc..6c214af3fc 100644 --- a/suite/components/pref/content/pref-spelling.js +++ b/suite/components/pref/content/pref-spelling.js @@ -21,14 +21,9 @@ function InitLanguageMenu() { var spellChecker = Cc["@mozilla.org/spellchecker/engine;1"] .getService(Ci.mozISpellCheckingEngine); - var o1 = {}; - var o2 = {}; - // Get the list of dictionaries from the spellchecker. - spellChecker.getDictionaryList(o1, o2); - - var dictList = o1.value; - var count = o2.value; + var dictList = spellChecker.getDictionaryList(); + var count = dictList.length; // If dictionary count hasn't changed then no need to update the menu. if (gDictCount == count) diff --git a/suite/mailnews/components/compose/content/MsgComposeCommands.js b/suite/mailnews/components/compose/content/MsgComposeCommands.js index e4854bbe6c..e04d925efc 100644 --- a/suite/mailnews/components/compose/content/MsgComposeCommands.js +++ b/suite/mailnews/components/compose/content/MsgComposeCommands.js @@ -2056,14 +2056,9 @@ function InitLanguageMenu() var spellChecker = Cc["@mozilla.org/spellchecker/engine;1"] .getService(mozISpellCheckingEngine); - var o1 = {}; - var o2 = {}; - // Get the list of dictionaries from the spellchecker. - spellChecker.getDictionaryList(o1, o2); - - var dictList = o1.value; - var count = o2.value; + var dictList = spellChecker.getDictionaryList(); + var count = dictList.length; // If dictionary count hasn't changed then no need to update the menu. if (sDictCount == count)