[SSE] Search: not replace when document is changed

This commit is contained in:
JuliaSvinareva 2022-08-23 18:00:34 +03:00
parent 7cb996c360
commit 7e7e72e1f3

View file

@ -271,6 +271,10 @@ define([
}, },
onQueryReplace: function(textSearch, textReplace) { onQueryReplace: function(textSearch, textReplace) {
if (this._state.isContentChanged) {
this.onQuerySearch();
return;
}
this.api.isReplaceAll = false; this.api.isReplaceAll = false;
var options = new Asc.asc_CFindOptions(); var options = new Asc.asc_CFindOptions();
options.asc_setFindWhat(textSearch); options.asc_setFindWhat(textSearch);
@ -289,6 +293,10 @@ define([
}, },
onQueryReplaceAll: function(textSearch, textReplace) { onQueryReplaceAll: function(textSearch, textReplace) {
if (this._state.isContentChanged) {
this.onQuerySearch();
return;
}
this.api.isReplaceAll = true; this.api.isReplaceAll = true;
var options = new Asc.asc_CFindOptions(); var options = new Asc.asc_CFindOptions();
options.asc_setFindWhat(textSearch); options.asc_setFindWhat(textSearch);