зеркало из https://github.com/mozilla/pjs.git
Bug 391039 - "Change the contract id used by the spell checker engine" [p=RyanVM r+sr=mscott a1.9=schrep]
This commit is contained in:
Родитель
99c0719dc7
Коммит
47b5677975
|
@ -586,7 +586,7 @@ function ExitSpellChecker()
|
|||
var curLang = gSpellChecker.GetCurrentDictionary();
|
||||
gSpellChecker.UninitSpellChecker();
|
||||
if ("@mozilla.org/spellchecker;1" in Components.classes) {
|
||||
var spellChecker = Components.classes["@mozilla.org/spellchecker/hunspell;1"]
|
||||
var spellChecker = Components.classes["@mozilla.org/spellchecker/engine;1"]
|
||||
.getService(Components.interfaces.mozISpellCheckingEngine);
|
||||
spellChecker.dictionary = curLang;
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
#include "nsInterfaceHashtable.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
#define MOZ_HUNSPELL_CONTRACTID "@mozilla.org/spellchecker/hunspell;1"
|
||||
#define MOZ_HUNSPELL_CONTRACTID "@mozilla.org/spellchecker/engine;1"
|
||||
#define MOZ_HUNSPELL_CID \
|
||||
/* 56c778e4-1bee-45f3-a689-886692a97fe7 */ \
|
||||
{ 0x56c778e4, 0x1bee, 0x45f3, \
|
||||
|
|
|
@ -46,9 +46,9 @@
|
|||
#include "nsString.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
||||
// use the same contract id as the MySpell spelchecker so we get picked up
|
||||
// Use the same contract ID as the Hunspell spellchecker so we get picked up
|
||||
// instead on Mac OS X but we have our own CID.
|
||||
#define MOZ_OSXSPELL_CONTRACTID "@mozilla.org/spellchecker/hunspell;1"
|
||||
#define MOZ_OSXSPELL_CONTRACTID "@mozilla.org/spellchecker/engine;1"
|
||||
#define MOZ_OSXSPELL_CID \
|
||||
{ /* BAABBAF4-71C3-47F4-A576-E75469E485E2 */ \
|
||||
0xBAABBAF4, 0x71C3, 0x47F4, \
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
|
@ -14,8 +13,7 @@
|
|||
*
|
||||
* The Original Code is Mozilla Spellchecker Component.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* David Einstein.
|
||||
* The Initial Developer of the Original Code is David Einstein.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2001
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
|
@ -45,7 +43,7 @@
|
|||
|
||||
#define UNREASONABLE_WORD_LENGTH 64
|
||||
|
||||
#define DEFAULT_SPELL_CHECKER "@mozilla.org/spellchecker/hunspell;1"
|
||||
#define DEFAULT_SPELL_CHECKER "@mozilla.org/spellchecker/engine;1"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(mozSpellChecker, nsISpellChecker)
|
||||
|
||||
|
|
|
@ -2155,7 +2155,7 @@ function InitLanguageMenu()
|
|||
if (!languageMenuList)
|
||||
return;
|
||||
|
||||
var spellChecker = Components.classes['@mozilla.org/spellchecker/hunspell;1']
|
||||
var spellChecker = Components.classes['@mozilla.org/spellchecker/engine;1']
|
||||
.getService(mozISpellCheckingEngine);
|
||||
var o1 = {};
|
||||
var o2 = {};
|
||||
|
@ -2252,7 +2252,7 @@ function ChangeLanguage(event)
|
|||
// We need to change the dictionary language and if we are using inline spell check,
|
||||
// recheck the message
|
||||
|
||||
var spellChecker = Components.classes['@mozilla.org/spellchecker/hunspell;1']
|
||||
var spellChecker = Components.classes['@mozilla.org/spellchecker/engine;1']
|
||||
.getService(mozISpellCheckingEngine);
|
||||
if (spellChecker.dictionary != event.target.value)
|
||||
{
|
||||
|
|
|
@ -300,7 +300,7 @@ var gComposePane = {
|
|||
initLanguageMenu: function ()
|
||||
{
|
||||
var languageMenuList = document.getElementById("languageMenuList");
|
||||
this.mSpellChecker = Components.classes['@mozilla.org/spellchecker/hunspell;1'].getService(Components.interfaces.mozISpellCheckingEngine);
|
||||
this.mSpellChecker = Components.classes['@mozilla.org/spellchecker/engine;1'].getService(Components.interfaces.mozISpellCheckingEngine);
|
||||
var o1 = {};
|
||||
var o2 = {};
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ function PopulateFonts() {
|
|||
}
|
||||
|
||||
function InitLanguageMenu() {
|
||||
var spellChecker = Components.classes["@mozilla.org/spellchecker/hunspell;1"]
|
||||
var spellChecker = Components.classes["@mozilla.org/spellchecker/engine;1"]
|
||||
.getService(Components.interfaces.mozISpellCheckingEngine);
|
||||
|
||||
var o1 = {};
|
||||
|
|
|
@ -2108,7 +2108,7 @@ function InitLanguageMenu()
|
|||
if (!languageMenuList)
|
||||
return;
|
||||
|
||||
var spellChecker = Components.classes["@mozilla.org/spellchecker/hunspell;1"]
|
||||
var spellChecker = Components.classes["@mozilla.org/spellchecker/engine;1"]
|
||||
.getService(mozISpellCheckingEngine);
|
||||
var o1 = {};
|
||||
var o2 = {};
|
||||
|
@ -2203,7 +2203,7 @@ function ChangeLanguage(event)
|
|||
// We need to change the dictionary language and if we are using inline spell check,
|
||||
// recheck the message
|
||||
|
||||
var spellChecker = Components.classes["@mozilla.org/spellchecker/hunspell;1"]
|
||||
var spellChecker = Components.classes["@mozilla.org/spellchecker/engine;1"]
|
||||
.getService(mozISpellCheckingEngine);
|
||||
if (spellChecker.dictionary != event.target.value)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче