The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 44b327800666f30d2713c6c9e26f275aadfa4b9c
Author: Stephan Witt <[email protected]>
Date:   Fri Jul 27 00:34:17 2012 +0200

    Fix bug #8238: correct the forward argument of replace2string() in 
on_replacePB_clicked().

diff --git a/src/frontends/qt4/GuiSpellchecker.cpp 
b/src/frontends/qt4/GuiSpellchecker.cpp
index e65e223..98eaace 100644
--- a/src/frontends/qt4/GuiSpellchecker.cpp
+++ b/src/frontends/qt4/GuiSpellchecker.cpp
@@ -457,8 +457,13 @@ void SpellcheckerWidget::on_replacePB_clicked()
                return;
        docstring const textfield = qstring_to_ucs4(d->ui.wordED->text());
        docstring const replacement = 
qstring_to_ucs4(d->ui.replaceCO->currentText());
-       docstring const datastring = replace2string(replacement, textfield,
-               true, true, false, false);
+       docstring const datastring = 
+               replace2string(replacement, textfield,
+                       true,   // case sensitive
+                       true,   // match word
+                       false,  // all words
+                       true,   // forward
+                       false); // find next
 
        LYXERR(Debug::GUI, "Replace (" << replacement << ")");
        dispatch(FuncRequest(LFUN_WORD_REPLACE, datastring));
@@ -474,8 +479,13 @@ void SpellcheckerWidget::on_replaceAllPB_clicked()
                return;
        docstring const textfield = qstring_to_ucs4(d->ui.wordED->text());
        docstring const replacement = 
qstring_to_ucs4(d->ui.replaceCO->currentText());
-       docstring const datastring = replace2string(replacement, textfield,
-               true, true, true, true);
+       docstring const datastring =
+               replace2string(replacement, textfield,
+                       true,   // case sensitive
+                       true,   // match word
+                       true,   // all words
+                       true,   // forward
+                       false); // find next
 
        LYXERR(Debug::GUI, "Replace all (" << replacement << ")");
        dispatch(FuncRequest(LFUN_WORD_REPLACE, datastring));
diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp
index 40a4f57..8bea710 100644
--- a/src/frontends/qt4/Menus.cpp
+++ b/src/frontends/qt4/Menus.cpp
@@ -783,7 +783,11 @@ void MenuDefinition::expandSpellingSuggestions(BufferView 
const * bv)
                                        MenuItem w(MenuItem::Command, 
toqstr(suggestion),
                                                FuncRequest(LFUN_WORD_REPLACE,
                                                        
replace2string(suggestion, selection,
-                                                               true, true, 
false, true, false)));
+                                                               true,     // 
case sensitive
+                                                               true,     // 
match word
+                                                               false,    // 
all words
+                                                               true,     // 
forward
+                                                               false))); // 
find next
                                        if (i < m)
                                                add(w);
                                        else

-----------------------------------------------------------------------

Summary of changes:
 src/frontends/qt4/GuiSpellchecker.cpp |   18 ++++++++++++++----
 src/frontends/qt4/Menus.cpp           |    6 +++++-
 2 files changed, 19 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to