2 * \file ControlThesaurus.C
3 * Read the file COPYING
7 * Full author contact details are available in file CREDITS
13 #pragma implementation
16 #include "ControlThesaurus.h"
21 #include "frontends/Liason.h"
24 using Liason::setMinibuffer;
27 ControlThesaurus::ControlThesaurus(LyXView & lv, Dialogs & d)
28 : ControlDialogBD(lv, d)
32 void ControlThesaurus::showEntry(string const & entry)
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 lyxfind::LyXReplace(bufferview(), oldstr_, newstr,
47 true, true, true, false, true);
51 if (replace_count == 0)
52 setMinibuffer(&lv_, _("String not found!"));
54 setMinibuffer(&lv_, _("String has been replaced."));
58 Thesaurus::Meanings const & ControlThesaurus::getMeanings(string const & str)
61 meanings_ = thesaurus.lookup(str);