[DE PE mobile] Fix bug 57806

This commit is contained in:
JuliaSvinareva 2022-06-27 01:44:32 +03:00
parent 12002da31f
commit e00199071e
2 changed files with 24 additions and 6 deletions

View file

@ -108,10 +108,13 @@ const Search = withTranslation()(props => {
f7.popover.close('.document-menu.modal-in', false);
if (params.find && params.find.length) {
var options = new AscCommon.CSearchSettings();
options.put_Text(params.find);
options.put_MatchCase(params.caseSensitive);
if (params.highlight) api.asc_selectSearchingResults(true);
api.asc_findText(params.find, params.forward, params.caseSensitive, function (resultCount) {
api.asc_findText(options, params.forward, function (resultCount) {
!resultCount && f7.dialog.alert(null, _t.textNoTextFound);
});
}
@ -127,7 +130,10 @@ const Search = withTranslation()(props => {
const api = Common.EditorApi.get();
if (params.find && params.find.length) {
api.asc_replaceText(params.find, params.replace || '', false, params.caseSensitive, params.highlight);
var options = new AscCommon.CSearchSettings();
options.put_Text(params.find);
options.put_MatchCase(params.caseSensitive);
api.asc_replaceText(options, params.replace || '', false);
}
}
@ -135,7 +141,10 @@ const Search = withTranslation()(props => {
const api = Common.EditorApi.get();
if (params.find && params.find.length) {
api.asc_replaceText(params.find, params.replace || '', true, params.caseSensitive, params.highlight);
var options = new AscCommon.CSearchSettings();
options.put_Text(params.find);
options.put_MatchCase(params.caseSensitive);
api.asc_replaceText(options, params.replace || '', true);
}
}

View file

@ -88,7 +88,10 @@ const Search = withTranslation()(props => {
f7.popover.close('.document-menu.modal-in', false);
if (params.find && params.find.length) {
api.asc_findText(params.find, params.forward, params.caseSensitive, function(resultCount) {
var options = new AscCommon.CSearchSettings();
options.put_Text(params.find);
options.put_MatchCase(params.caseSensitive);
api.asc_findText(options, params.forward, function(resultCount) {
!resultCount && f7.dialog.alert(null, _t.textNoTextFound);
});
@ -105,7 +108,10 @@ const Search = withTranslation()(props => {
const api = Common.EditorApi.get();
if (params.find && params.find.length) {
api.asc_replaceText(params.find, params.replace || '', false, params.caseSensitive);
var options = new AscCommon.CSearchSettings();
options.put_Text(params.find);
options.put_MatchCase(params.caseSensitive);
api.asc_replaceText(options, params.replace || '', false);
}
}
@ -113,7 +119,10 @@ const Search = withTranslation()(props => {
const api = Common.EditorApi.get();
if (params.find && params.find.length) {
api.asc_replaceText(params.find, params.replace || '', true, params.caseSensitive);
var options = new AscCommon.CSearchSettings();
options.put_Text(params.find);
options.put_MatchCase(params.caseSensitive);
api.asc_replaceText(options, params.replace || '', true);
}
}