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"
25 ControlThesaurus::ControlThesaurus(Dialog & parent)
26 : Dialog::Controller(parent)
30 bool ControlThesaurus::initialiseParams(string const & data)
37 void ControlThesaurus::clearParams()
43 void ControlThesaurus::replace(string const & newstr)
45 /* FIXME: this is not suitable ! We need to have a "lock"
46 * on a particular charpos in a paragraph that is broken on
49 int const replace_count =
50 lyx::find::replace(kernel().bufferview(), oldstr_, newstr,
51 true /*cs*/, true /*mw*/, true /*fw*/);
55 if (replace_count == 0)
56 kernel().lyxview().message(_("String not found!"));
58 kernel().lyxview().message(_("String has been replaced."));
62 Thesaurus::Meanings const &
63 ControlThesaurus::getMeanings(string const & str)
66 meanings_ = thesaurus.lookup(str);