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

Добавлен парамерт в событие OnReplaceAll.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49040 954022d7-b5bf-4e40-9824-e11837661b57
parent 0a5eb032
...@@ -227,11 +227,12 @@ CDocument.prototype.Search_Replace = function(NewStr, bAll, Id) ...@@ -227,11 +227,12 @@ CDocument.prototype.Search_Replace = function(NewStr, bAll, Id)
CheckParagraphs.push( this.SearchEngine.Elements[Id] ); CheckParagraphs.push( this.SearchEngine.Elements[Id] );
} }
var AllCount = this.SearchEngine.Count;
if ( false === this.Document_Is_SelectionLocked( changestype_None, { Type : changestype_2_ElementsArray_and_Type, Elements : CheckParagraphs, CheckType : changestype_Paragraph_Content } ) ) if ( false === this.Document_Is_SelectionLocked( changestype_None, { Type : changestype_2_ElementsArray_and_Type, Elements : CheckParagraphs, CheckType : changestype_Paragraph_Content } ) )
{ {
History.Create_NewPoint(); History.Create_NewPoint();
var AllCount = this.SearchEngine.Count;
if ( true === bAll ) if ( true === bAll )
this.SearchEngine.Replace_All( NewStr ); this.SearchEngine.Replace_All( NewStr );
else else
...@@ -246,12 +247,12 @@ CDocument.prototype.Search_Replace = function(NewStr, bAll, Id) ...@@ -246,12 +247,12 @@ CDocument.prototype.Search_Replace = function(NewStr, bAll, Id)
bResult = true; bResult = true;
if ( true === bAll ) if ( true === bAll )
editor.sync_ReplaceAllCallback(AllCount); editor.sync_ReplaceAllCallback(AllCount, AllCount);
} }
else else
{ {
if ( true === bAll ) if ( true === bAll )
editor.sync_ReplaceAllCallback(0); editor.sync_ReplaceAllCallback(0, AllCount);
} }
this.Document_UpdateInterfaceState(); this.Document_UpdateInterfaceState();
......
...@@ -2803,9 +2803,9 @@ asc_docs_api.prototype.asc_isSelectSearchingResults = function() ...@@ -2803,9 +2803,9 @@ asc_docs_api.prototype.asc_isSelectSearchingResults = function()
return this.WordControl.m_oLogicDocument.Search_Get_Selection(); return this.WordControl.m_oLogicDocument.Search_Get_Selection();
} }
asc_docs_api.prototype.sync_ReplaceAllCallback = function(Count) asc_docs_api.prototype.sync_ReplaceAllCallback = function(ReplaceCount, OverallCount)
{ {
this.asc_fireCallback("asc_onReplaceAll", Count); this.asc_fireCallback("asc_onReplaceAll", ReplaceCount, OverallCount);
} }
asc_docs_api.prototype.sync_SearchEndCallback = function() asc_docs_api.prototype.sync_SearchEndCallback = function()
......
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