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"
22 ControlThesaurus::ControlThesaurus(LyXView & lv, Dialogs & d)
23 : ControlDialogBD(lv, d)
27 void ControlThesaurus::showEntry(string const & entry)
34 void ControlThesaurus::replace(string const & newstr)
36 /* FIXME: this is not suitable ! We need to have a "lock"
37 * on a particular charpos in a paragraph that is broken on
40 int const replace_count =
41 lyxfind::LyXReplace(bufferview(), oldstr_, newstr,
42 true, true, true, false, true);
46 if (replace_count == 0)
47 lv_.message(_("String not found!"));
49 lv_.message(_("String has been replaced."));
53 Thesaurus::Meanings const & ControlThesaurus::getMeanings(string const & str)
56 meanings_ = thesaurus.lookup(str);