mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +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(
|
void FindAndReplaceWidget::findAndReplace(
|
||||||
bool casesensitive, bool matchword, bool backwards,
|
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();
|
Buffer & buffer = find_work_area_->bufferView().buffer();
|
||||||
docstring searchString;
|
docstring searchString;
|
||||||
@ -141,17 +142,15 @@ void FindAndReplaceWidget::findAndReplace(
|
|||||||
<< ", expandmacros=" << expandmacros
|
<< ", expandmacros=" << expandmacros
|
||||||
<< ", ignoreformat=" << ignoreformat
|
<< ", ignoreformat=" << ignoreformat
|
||||||
<< ", regexp=" << regexp
|
<< ", regexp=" << regexp
|
||||||
<< ", replaceString" << replaceString);
|
<< ", replaceString" << replaceString
|
||||||
|
<< ", keep_case=" << keep_case);
|
||||||
FindAndReplaceOptions opt(searchString, casesensitive, matchword, ! backwards,
|
FindAndReplaceOptions opt(searchString, casesensitive, matchword, ! backwards,
|
||||||
expandmacros, ignoreformat, regexp, replaceString);
|
expandmacros, ignoreformat, regexp, replaceString, keep_case);
|
||||||
LYXERR(Debug::FIND, "Dispatching LFUN_WORD_FINDADV");
|
LYXERR(Debug::FIND, "Dispatching LFUN_WORD_FINDADV");
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << opt;
|
oss << opt;
|
||||||
LYXERR(Debug::FIND, "Dispatching LFUN_WORD_FINDADV");
|
LYXERR(Debug::FIND, "Dispatching LFUN_WORD_FINDADV");
|
||||||
dispatch(FuncRequest(LFUN_WORD_FINDADV, from_utf8(oss.str())));
|
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,
|
backwards,
|
||||||
expandMacrosCB->isChecked(),
|
expandMacrosCB->isChecked(),
|
||||||
ignoreFormatCB->isChecked(),
|
ignoreFormatCB->isChecked(),
|
||||||
replace);
|
replace,
|
||||||
|
keepCaseCB->isChecked());
|
||||||
view_.currentMainWorkArea()->redraw();
|
view_.currentMainWorkArea()->redraw();
|
||||||
find_work_area_->setFocus();
|
find_work_area_->setFocus();
|
||||||
}
|
}
|
||||||
|
@ -46,10 +46,11 @@ private:
|
|||||||
void remember(std::string const & find, QComboBox & combo);
|
void remember(std::string const & find, QComboBox & combo);
|
||||||
void findAndReplace(
|
void findAndReplace(
|
||||||
bool casesensitive, bool matchword, bool backwards,
|
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,
|
// void find(docstring const & str, int len, bool casesens,
|
||||||
bool words, bool backwards, bool expandmacros);
|
// bool words, bool backwards, bool expandmacros);
|
||||||
void findAndReplace(bool backwards, bool replace);
|
void findAndReplace(bool backwards, bool replace);
|
||||||
|
|
||||||
bool eventFilter(QObject *obj, QEvent *event);
|
bool eventFilter(QObject *obj, QEvent *event);
|
||||||
|
Loading…
Reference in New Issue
Block a user