mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
First implementation of feature in bug #3696
(missing files in commit, apologies). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31160 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c6a9cd0613
commit
cf62c2d8e4
@ -99,7 +99,8 @@ static docstring buffer_to_latex(Buffer & buffer) {
|
||||
|
||||
void FindAndReplaceWidget::findAndReplace(
|
||||
bool casesensitive, bool matchword, bool backwards,
|
||||
bool expandmacros, bool ignoreformat, bool replace)
|
||||
bool expandmacros, bool ignoreformat, bool replace,
|
||||
bool keep_case)
|
||||
{
|
||||
Buffer & buffer = find_work_area_->bufferView().buffer();
|
||||
docstring searchString;
|
||||
@ -141,17 +142,15 @@ void FindAndReplaceWidget::findAndReplace(
|
||||
<< ", expandmacros=" << expandmacros
|
||||
<< ", ignoreformat=" << ignoreformat
|
||||
<< ", regexp=" << regexp
|
||||
<< ", replaceString" << replaceString);
|
||||
<< ", replaceString" << replaceString
|
||||
<< ", keep_case=" << keep_case);
|
||||
FindAndReplaceOptions opt(searchString, casesensitive, matchword, ! backwards,
|
||||
expandmacros, ignoreformat, regexp, replaceString);
|
||||
expandmacros, ignoreformat, regexp, replaceString, keep_case);
|
||||
LYXERR(Debug::FIND, "Dispatching LFUN_WORD_FINDADV");
|
||||
std::ostringstream oss;
|
||||
oss << opt;
|
||||
LYXERR(Debug::FIND, "Dispatching LFUN_WORD_FINDADV");
|
||||
dispatch(FuncRequest(LFUN_WORD_FINDADV, from_utf8(oss.str())));
|
||||
|
||||
// findAdv(&theApp()->currentView()->currentWorkArea()->bufferView(),
|
||||
// searchString, len, casesensitive, matchword, ! backwards, expandmacros);
|
||||
}
|
||||
|
||||
|
||||
@ -165,7 +164,8 @@ void FindAndReplaceWidget::findAndReplace(bool backwards, bool replace)
|
||||
backwards,
|
||||
expandMacrosCB->isChecked(),
|
||||
ignoreFormatCB->isChecked(),
|
||||
replace);
|
||||
replace,
|
||||
keepCaseCB->isChecked());
|
||||
view_.currentMainWorkArea()->redraw();
|
||||
find_work_area_->setFocus();
|
||||
}
|
||||
|
@ -46,10 +46,11 @@ private:
|
||||
void remember(std::string const & find, QComboBox & combo);
|
||||
void findAndReplace(
|
||||
bool casesensitive, bool matchword, bool backwards,
|
||||
bool expandmacros, bool ignoreformat, bool replace
|
||||
bool expandmacros, bool ignoreformat, bool replace,
|
||||
bool keep_case
|
||||
);
|
||||
void find(docstring const & str, int len, bool casesens,
|
||||
bool words, bool backwards, bool expandmacros);
|
||||
// void find(docstring const & str, int len, bool casesens,
|
||||
// bool words, bool backwards, bool expandmacros);
|
||||
void findAndReplace(bool backwards, bool replace);
|
||||
|
||||
bool eventFilter(QObject *obj, QEvent *event);
|
||||
|
Loading…
Reference in New Issue
Block a user