From e00199071ec350e824ac8659980fe59622498b12 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Mon, 27 Jun 2022 01:44:32 +0300 Subject: [PATCH] [DE PE mobile] Fix bug 57806 --- .../mobile/src/controller/Search.jsx | 15 ++++++++++++--- .../mobile/src/controller/Search.jsx | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/apps/documenteditor/mobile/src/controller/Search.jsx b/apps/documenteditor/mobile/src/controller/Search.jsx index 4e95b4684..e47467400 100644 --- a/apps/documenteditor/mobile/src/controller/Search.jsx +++ b/apps/documenteditor/mobile/src/controller/Search.jsx @@ -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); } } diff --git a/apps/presentationeditor/mobile/src/controller/Search.jsx b/apps/presentationeditor/mobile/src/controller/Search.jsx index c3c254ac3..069e69893 100644 --- a/apps/presentationeditor/mobile/src/controller/Search.jsx +++ b/apps/presentationeditor/mobile/src/controller/Search.jsx @@ -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); } }