From: Jean-Marc Lasgouttes Date: Tue, 6 Mar 2001 11:05:15 +0000 (+0000) Subject: find&replace fixes X-Git-Tag: 1.6.10~21519 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e121a69c4a938ce9fe158db03082b405a7f3aaff;p=features.git find&replace fixes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1683 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index 0116dc70b0..eb0a1ff721 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2001-03-06 Jean-Marc Lasgouttes + + * lyxfind.C (LyXReplace): do not redefine default argument in + implementation. + (IsStringInText): ditto + (SearchForward): ditto + (SearchBackward): ditto + 2001-03-06 Juergen Vigna * lyxfind.C (IsStringInText): put parentes around expressions. diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 97a52b3a50..e09ef846e4 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2001-03-06 Jean-Marc Lasgouttes + + * FormSearch.C (Replace): remove default argument + (Find): ditto + 2001-03-05 Edwin Leuven * added find/replace dialog: diff --git a/src/frontends/xforms/FormSearch.C b/src/frontends/xforms/FormSearch.C index 03a113b4b3..8cca31c2e9 100644 --- a/src/frontends/xforms/FormSearch.C +++ b/src/frontends/xforms/FormSearch.C @@ -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()); } } -}; +} diff --git a/src/lyxfind.C b/src/lyxfind.C index ae521a65e0..183cb7b3c0 100644 --- a/src/lyxfind.C +++ b/src/lyxfind.C @@ -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();