Commit c17e29c7 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Сделано, чтобы при смене языка слова сразу появлялись варианты в новом словаре (баг 21303).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50795 954022d7-b5bf-4e40-9824-e11837661b57
parent bc6ce022
......@@ -82,6 +82,24 @@ CDocumentSpelling.prototype =
Add_CurPara : function(Id, Para)
{
this.CurPara[Id] = Para;
},
Check_CurParas : function()
{
for ( var Id in this.CheckPara )
{
var Para = this.CheckPara[Id];
Para.Continue_CheckSpelling();
delete this.CheckPara[Id];
}
for ( var Id in this.CurPara )
{
var Para = this.CurPara[Id];
delete this.CurPara[Id];
Para.SpellChecker.Reset_ElementsWithCurPos();
Para.SpellChecker.Check(undefined, true);
}
}
};
......@@ -110,10 +128,11 @@ CParaSpellChecker.prototype =
this.Elements.push( new CParaSpellCheckerElement( StartPos, EndPos, Word, Lang ) );
},
Check : function(ParagraphForceRedraw)
Check : function(ParagraphForceRedraw, _bForceCheckCur)
{
var bForceCheckCur = ( true != _bForceCheckCur ? false : true )
var Paragraph = g_oTableId.Get_ById( this.ParaId );
var bCurrent = Paragraph.Is_ThisElementCurrent();
var bCurrent = ( true === bForceCheckCur ? false : Paragraph.Is_ThisElementCurrent() );
var CurPos = -1;
if ( true === bCurrent && false === Paragraph.Selection.Use )
......
......@@ -3106,6 +3106,8 @@ asc_docs_api.prototype.put_TextPrLang = function(value)
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Paragraph_Add( new ParaTextPr( { Lang : { Val : value } } ) );
this.WordControl.m_oLogicDocument.Spelling.Check_CurParas();
if ( true === this.isMarkerFormat )
this.sync_MarkerFormatCallback( false );
}
......
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