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.
14 #include "ControlThesaurus.h"
19 #include "frontends/LyXView.h"
21 ControlThesaurus::ControlThesaurus(Dialog & parent)
22 : Dialog::Controller(parent)
26 bool ControlThesaurus::initialiseParams(string const & data)
33 void ControlThesaurus::clearParams()
39 void ControlThesaurus::replace(string const & newstr)
41 /* FIXME: this is not suitable ! We need to have a "lock"
42 * on a particular charpos in a paragraph that is broken on
45 int const replace_count =
46 lyx::find::replace(kernel().bufferview(), oldstr_, newstr,
47 true, true, true, false, true);
51 if (replace_count == 0)
52 kernel().lyxview().message(_("String not found!"));
54 kernel().lyxview().message(_("String has been replaced."));
58 Thesaurus::Meanings const &
59 ControlThesaurus::getMeanings(string const & str)
62 meanings_ = thesaurus.lookup(str);