2 * \file ControlThesaurus.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "ControlThesaurus.h"
16 #include "funcrequest.h"
23 ControlThesaurus::ControlThesaurus(Dialog & parent)
24 : Dialog::Controller(parent)
28 bool ControlThesaurus::initialiseParams(string const & data)
30 oldstr_ = from_utf8(data);
35 void ControlThesaurus::clearParams()
41 void ControlThesaurus::replace(docstring const & newstr)
43 /* FIXME: this is not suitable ! We need to have a "lock"
44 * on a particular charpos in a paragraph that is broken on
47 docstring const data =
48 replace2string(oldstr_, newstr,
49 true, // case sensitive
53 kernel().dispatch(FuncRequest(LFUN_WORD_REPLACE, data));
57 Thesaurus::Meanings const & ControlThesaurus::getMeanings(docstring const & str)
60 meanings_ = thesaurus.lookup(str);
64 } // namespace frontend