commit 48528d0ff09e51895d9fffdd34d7a24b45f906be
Author: Kornel Benko <[email protected]>
Date:   Sun Feb 14 09:08:23 2021 +0100

    FindAdv: Use global declaration for findOne() to be usefull for unit tests
    
    cherry-pick from unit-test-adoption/dff4779b06b, author: Yuriy Skalko 
<[email protected]>
---
 src/lyxfind.cpp |    6 +++++-
 src/lyxfind.h   |    4 ++++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 759d637..61176b9 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -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)
diff --git a/src/lyxfind.h b/src/lyxfind.h
index f7c458e..20427e8 100644
--- a/src/lyxfind.h
+++ b/src/lyxfind.h
@@ -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.
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to