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 #pragma implementation
17 #include "ControlThesaurus.h"
22 #include "frontends/LyXView.h"
25 ControlThesaurus::ControlThesaurus(LyXView & lv, Dialogs & d)
26 : ControlDialogBD(lv, d)
30 void ControlThesaurus::showEntry(string const & entry)
37 void ControlThesaurus::replace(string const & newstr)
39 /* FIXME: this is not suitable ! We need to have a "lock"
40 * on a particular charpos in a paragraph that is broken on
43 int const replace_count =
44 lyxfind::LyXReplace(bufferview(), oldstr_, newstr,
45 true, true, true, false, true);
49 if (replace_count == 0)
50 lv_.message(_("String not found!"));
52 lv_.message(_("String has been replaced."));
56 Thesaurus::Meanings const & ControlThesaurus::getMeanings(string const & str)
59 meanings_ = thesaurus.lookup(str);