} else {
replaceString = from_utf8(LYX_FR_NULL_STRING);
}
+ FindAndReplaceOptions::SearchScope scope = FindAndReplaceOptions::S_BUFFER;
+ if (CurrentDocument->isChecked())
+ scope = FindAndReplaceOptions::S_BUFFER;
+ else if (MasterDocument->isChecked())
+ scope = FindAndReplaceOptions::S_DOCUMENT;
+ else if (OpenDocuments->isChecked())
+ scope = FindAndReplaceOptions::S_OPEN_BUFFERS;
+ else
+ LASSERT(false, /**/);
LYXERR(Debug::FIND, "FindAndReplaceOptions: "
<< "searchstring=" << searchString
<< ", casesensitiv=" << casesensitive
<< ", ignoreformat=" << ignoreformat
<< ", regexp=" << regexp
<< ", replaceString" << replaceString
- << ", keep_case=" << keep_case);
+ << ", keep_case=" << keep_case
+ << ", scope=" << scope);
FindAndReplaceOptions opt(searchString, casesensitive, matchword, ! backwards,
- expandmacros, ignoreformat, regexp, replaceString, keep_case);
+ expandmacros, ignoreformat, regexp, replaceString, keep_case, scope);
LYXERR(Debug::FIND, "Dispatching LFUN_WORD_FINDADV");
std::ostringstream oss;
oss << opt;
ignoreFormatCB->isChecked(),
replace,
keepCaseCB->isChecked());
- view_.currentMainWorkArea()->redraw();
}
void FindAndReplaceWidget::showEvent(QShowEvent * /* ev */)
{
- replace_work_area_->redraw();
- find_work_area_->setFocus();
view_.setCurrentWorkArea(find_work_area_);
LYXERR(Debug::FIND, "Selecting entire find buffer");
dispatch(FuncRequest(LFUN_BUFFER_BEGIN));
dispatch(FuncRequest(LFUN_BUFFER_END_SELECT));
- find_work_area_->redraw();
find_work_area_->installEventFilter(this);
replace_work_area_->installEventFilter(this);
}