FindAdv: Use global declaration for findOne() to be usefull for unit tests

cherry-pick from unit-test-adoption/dff4779b06b, author: Yuriy Skalko <yuriy.skalko@gmail.com>
This commit is contained in:
Kornel Benko 2021-02-14 09:08:23 +01:00
parent 5297862855
commit 48528d0ff0
2 changed files with 9 additions and 1 deletions

View File

@ -262,10 +262,12 @@ bool searchAllowed(docstring const & str)
return true;
}
} // namespace
bool findOne(BufferView * bv, docstring const & searchstr,
bool case_sens, bool whole, bool forward,
bool find_del = true, bool check_wrap = false)
bool find_del, bool check_wrap)
{
if (!searchAllowed(searchstr))
return false;
@ -313,6 +315,8 @@ bool findOne(BufferView * bv, docstring const & searchstr,
}
namespace {
int replaceAll(BufferView * bv,
docstring const & searchstr, docstring const & replacestr,
bool case_sens, bool whole)

View File

@ -63,6 +63,10 @@ docstring const replace2string(docstring const & replace,
*/
bool lyxfind(BufferView * bv, FuncRequest const & ev);
bool findOne(BufferView * bv, docstring const & searchstr,
bool case_sens, bool whole, bool forward,
bool find_del = true, bool check_wrap = false);
/** Parse the string encoding of the replace request that is found in
* \c ev.argument and act on it.
* The string is encoded by \c replace2string.