mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Fix bug #8238: correct the forward argument of replace2string() in on_replacePB_clicked().
This commit is contained in:
parent
b55a6454d9
commit
44b3278006
@ -457,8 +457,13 @@ void SpellcheckerWidget::on_replacePB_clicked()
|
|||||||
return;
|
return;
|
||||||
docstring const textfield = qstring_to_ucs4(d->ui.wordED->text());
|
docstring const textfield = qstring_to_ucs4(d->ui.wordED->text());
|
||||||
docstring const replacement = qstring_to_ucs4(d->ui.replaceCO->currentText());
|
docstring const replacement = qstring_to_ucs4(d->ui.replaceCO->currentText());
|
||||||
docstring const datastring = replace2string(replacement, textfield,
|
docstring const datastring =
|
||||||
true, true, false, false);
|
replace2string(replacement, textfield,
|
||||||
|
true, // case sensitive
|
||||||
|
true, // match word
|
||||||
|
false, // all words
|
||||||
|
true, // forward
|
||||||
|
false); // find next
|
||||||
|
|
||||||
LYXERR(Debug::GUI, "Replace (" << replacement << ")");
|
LYXERR(Debug::GUI, "Replace (" << replacement << ")");
|
||||||
dispatch(FuncRequest(LFUN_WORD_REPLACE, datastring));
|
dispatch(FuncRequest(LFUN_WORD_REPLACE, datastring));
|
||||||
@ -474,8 +479,13 @@ void SpellcheckerWidget::on_replaceAllPB_clicked()
|
|||||||
return;
|
return;
|
||||||
docstring const textfield = qstring_to_ucs4(d->ui.wordED->text());
|
docstring const textfield = qstring_to_ucs4(d->ui.wordED->text());
|
||||||
docstring const replacement = qstring_to_ucs4(d->ui.replaceCO->currentText());
|
docstring const replacement = qstring_to_ucs4(d->ui.replaceCO->currentText());
|
||||||
docstring const datastring = replace2string(replacement, textfield,
|
docstring const datastring =
|
||||||
true, true, true, true);
|
replace2string(replacement, textfield,
|
||||||
|
true, // case sensitive
|
||||||
|
true, // match word
|
||||||
|
true, // all words
|
||||||
|
true, // forward
|
||||||
|
false); // find next
|
||||||
|
|
||||||
LYXERR(Debug::GUI, "Replace all (" << replacement << ")");
|
LYXERR(Debug::GUI, "Replace all (" << replacement << ")");
|
||||||
dispatch(FuncRequest(LFUN_WORD_REPLACE, datastring));
|
dispatch(FuncRequest(LFUN_WORD_REPLACE, datastring));
|
||||||
|
@ -783,7 +783,11 @@ void MenuDefinition::expandSpellingSuggestions(BufferView const * bv)
|
|||||||
MenuItem w(MenuItem::Command, toqstr(suggestion),
|
MenuItem w(MenuItem::Command, toqstr(suggestion),
|
||||||
FuncRequest(LFUN_WORD_REPLACE,
|
FuncRequest(LFUN_WORD_REPLACE,
|
||||||
replace2string(suggestion, selection,
|
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)
|
if (i < m)
|
||||||
add(w);
|
add(w);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user