Commit 5803f73e authored by Alexander.Trofimov's avatar Alexander.Trofimov

spellCheck Error

parent 0f7e154c
......@@ -342,7 +342,7 @@ CParaSpellChecker.prototype =
{
if (true === editor.WordControl.m_oLogicDocument.Spelling.Add_WaitingParagraph(this.Paragraph, this.RecalcId, usrWords, usrLang))
{
spellCheck(editor, {"type" : "spell", "ParagraphId" : this.ParaId, "RecalcId" : this.RecalcId, "ElementId" : 0, "usrWords" : usrWords, "usrLang" : usrLang });
editor.spellCheck({"type" : "spell", "ParagraphId" : this.ParaId, "RecalcId" : this.RecalcId, "ElementId" : 0, "usrWords" : usrWords, "usrLang" : usrLang });
}
else
{
......@@ -477,7 +477,7 @@ CParaSpellChecker.prototype =
if (null === Variants && false === editor.WordControl.m_oLogicDocument.Spelling.Check_WaitingParagraph(this.Paragraph))
{
spellCheck(editor, {"type": "suggest", "ParagraphId": this.ParaId, "RecalcId" : this.RecalcId, "ElementId" : FoundIndex, "usrWords" : [Word], "usrLang" : [FoundElement.Lang] });
editor.spellCheck({"type": "suggest", "ParagraphId": this.ParaId, "RecalcId" : this.RecalcId, "ElementId" : FoundIndex, "usrWords" : [Word], "usrLang" : [FoundElement.Lang] });
}
}
......
......@@ -6390,16 +6390,16 @@ asc_docs_api.prototype.asc_getAnchorPosition = function()
return new AscCommon.asc_CRect(AnchorPos.X0, AnchorPos.Y, AnchorPos.X1 - AnchorPos.X0, 0);
};
function spellCheck (editor, rdata) {
asc_docs_api.prototype.spellCheck = function (rdata) {
//console.log("start - " + rdata);
// ToDo проверка на подключение
switch (rdata.type) {
case "spell":
case "suggest":
editor.SpellCheckApi.spellCheck(JSON.stringify(rdata));
this.SpellCheckApi.spellCheck(JSON.stringify(rdata));
break;
}
}
};
window["asc_nativeOnSpellCheck"] = function (response)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment