2 * \file ControlThesaurus.C
3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
12 #pragma implementation
15 #include "ControlThesaurus.h"
20 #include "frontends/Liason.h"
23 using Liason::setMinibuffer;
26 ControlThesaurus::ControlThesaurus(LyXView & lv, Dialogs & d)
27 : ControlDialogBD(lv, d)
31 void ControlThesaurus::showEntry(string const & entry)
38 void ControlThesaurus::replace(string const & newstr)
40 /* FIXME: this is not suitable ! We need to have a "lock"
41 * on a particular charpos in a paragraph that is broken on
44 int const replace_count =
45 lyxfind::LyXReplace(bufferview(), oldstr_, newstr,
46 true, true, true, false, true);
50 if (replace_count == 0)
51 setMinibuffer(&lv_, _("String not found!"));
53 setMinibuffer(&lv_, _("String has been replaced."));
57 Thesaurus::Meanings const & ControlThesaurus::getMeanings(string const & str)
60 meanings_ = thesaurus.lookup(str);