mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-14 15:05:56 +00:00
5f96595b44
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8323 a592a061-630c-0410-9148-cb99ea01b6c8
53 lines
1.2 KiB
C
53 lines
1.2 KiB
C
/**
|
|
* \file ControlSearch.C
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Angus Leeming
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#include "ControlSearch.h"
|
|
|
|
#include "funcrequest.h"
|
|
#include "lyxfind.h"
|
|
|
|
#include "frontends/LyXView.h"
|
|
|
|
using std::string;
|
|
|
|
|
|
/* The ControlSeach class is now in a fit state to derive from
|
|
Dialog::Controller
|
|
*/
|
|
ControlSearch::ControlSearch(LyXView & lv, Dialogs & d)
|
|
: ControlDialogBD(lv, d)
|
|
{}
|
|
|
|
|
|
void ControlSearch::find(string const & search,
|
|
bool casesensitive, bool matchword, bool forward)
|
|
{
|
|
string const data =
|
|
lyx::find::find2string(search,
|
|
casesensitive, matchword, forward);
|
|
FuncRequest const fr(bufferview(), LFUN_WORD_FIND, data);
|
|
lv_.dispatch(fr);
|
|
}
|
|
|
|
|
|
void ControlSearch::replace(string const & search, string const & replace,
|
|
bool casesensitive, bool matchword,
|
|
bool forward, bool all)
|
|
{
|
|
string const data =
|
|
lyx::find::replace2string(search, replace,
|
|
casesensitive, matchword,
|
|
all, forward);
|
|
FuncRequest const fr(bufferview(), LFUN_WORD_REPLACE, data);
|
|
lv_.dispatch(fr);
|
|
}
|