]> git.lyx.org Git - features.git/commitdiff
find&replace fixes
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 6 Mar 2001 11:05:15 +0000 (11:05 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 6 Mar 2001 11:05:15 +0000 (11:05 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1683 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormSearch.C
src/lyxfind.C

index 0116dc70b08a06b03c9fe19a9a9d76460969dcd4..eb0a1ff7213ca7517e072bf36908ae5cdd33051a 100644 (file)
@@ -1,3 +1,11 @@
+2001-03-06  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * lyxfind.C (LyXReplace): do not redefine default argument in
+       implementation. 
+       (IsStringInText): ditto
+       (SearchForward): ditto
+       (SearchBackward): ditto
+
 2001-03-06  Juergen Vigna  <jug@sad.it>
 
        * lyxfind.C (IsStringInText): put parentes around expressions.
index 97a52b3a50781d5d17fbc67220bc938bd414e922..e09ef846e4d21bdd73889f776868d9e9212475a0 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-06  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * FormSearch.C (Replace): remove default argument
+       (Find): ditto
+
 2001-03-05  Edwin Leuven  <leuven@fee.uva.nl>
 
        * added find/replace dialog:
index 03a113b4b3e8e2596a9c5c21d7fcbf347319ed62..8cca31c2e95805a0e45479d562ba2933fe40e569 100644 (file)
@@ -88,7 +88,7 @@ bool FormSearch::input(FL_OBJECT * obj, long)
    return 0;
 }
 
-void FormSearch::Find(bool const next = true)
+void FormSearch::Find(bool const next)
 {
    bool found = LyXFind(lv_->view(),
                        fl_get_input(dialog_->input_search),
@@ -98,10 +98,10 @@ void FormSearch::Find(bool const next = true)
    
    if (!found)
      setMinibuffer(lv_, _("String not found!"));
- };
+}
 
 
-void FormSearch::Replace(bool const all = false)
+void FormSearch::Replace(bool const all)
 {
    int replace_count = LyXReplace(lv_->view(),
                                  fl_get_input(dialog_->input_search),
@@ -122,6 +122,6 @@ void FormSearch::Replace(bool const all = false)
         setMinibuffer(lv_, str.c_str());
       }
    }
-};
+}
 
 
index ae521a65e079c33bf1b431dc5de32bcfa8e1b66a..183cb7b3c04967e2cac8220a71ad4deed4e567e0 100644 (file)
@@ -20,7 +20,7 @@ int LyXReplace(BufferView * bv,
                bool const & casesens,
                bool const & matchwrd,
                bool const & forward,
-               bool const & replaceall=false)
+               bool const & replaceall)
 {
    int replace_count = 0;
  
@@ -110,8 +110,8 @@ bool LyXFind(BufferView * bv,
 
 // returns true if the specified string is at the specified position
 bool IsStringInText(LyXParagraph * par, LyXParagraph::size_type pos,
-                   string const & str, bool const & cs = true,
-                   bool const & mw = false)
+                   string const & str, bool const & cs,
+                   bool const & mw)
 {
        if (!par)
                return false;
@@ -142,7 +142,7 @@ bool IsStringInText(LyXParagraph * par, LyXParagraph::size_type pos,
 // if the string can be found: return true and set the cursor to
 // the new position, cs = casesensitive, mw = matchword
 bool SearchForward(BufferView * bv, string const & str,
-                  bool const & cs = true, bool const & mw = false)
+                  bool const & cs, bool const & mw)
 {
        LyXParagraph * par = bv->text->cursor.par();
        LyXParagraph::size_type pos = bv->text->cursor.pos();
@@ -168,7 +168,7 @@ bool SearchForward(BufferView * bv, string const & str,
 // if the string can be found: return true and set the cursor to
 // the new position, cs = casesensitive, mw = matchword
 bool SearchBackward(BufferView * bv, string const & str,
-                   bool const & cs = true, bool const & mw = false)
+                   bool const & cs, bool const & mw)
 {
        LyXParagraph * par = bv->text->cursor.par();
        LyXParagraph::size_type pos = bv->text->cursor.pos();