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/Liason.h"
25 using Liason::setMinibuffer;
28 ControlThesaurus::ControlThesaurus(LyXView & lv, Dialogs & d)
29 : ControlDialogBD(lv, d)
33 void ControlThesaurus::showEntry(string const & entry)
40 void ControlThesaurus::replace(string const & newstr)
42 /* FIXME: this is not suitable ! We need to have a "lock"
43 * on a particular charpos in a paragraph that is broken on
46 int const replace_count =
47 lyxfind::LyXReplace(bufferview(), oldstr_, newstr,
48 true, true, true, false, true);
52 if (replace_count == 0)
53 setMinibuffer(&lv_, _("String not found!"));
55 setMinibuffer(&lv_, _("String has been replaced."));
59 Thesaurus::Meanings const & ControlThesaurus::getMeanings(string const & str)
62 meanings_ = thesaurus.lookup(str);