* Thesaurus.cpp: fix synonym collection.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35358 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2010-09-13 16:15:15 +00:00
parent 731db84bfc
commit 0bc5f27959

View File

@ -222,17 +222,17 @@ Thesaurus::Meanings Thesaurus::lookup(docstring const & t, docstring const & lan
// they are needed for the CleanUpAfterLookup routine // they are needed for the CleanUpAfterLookup routine
mentry * pm = pmean; mentry * pm = pmean;
docstring meaning; docstring meaning;
docstring ret;
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
vector<docstring> ret;
meaning = from_iconv_encoding(string(pm->defn), encoding); meaning = from_iconv_encoding(string(pm->defn), encoding);
// remove silly item // remove silly item
if (support::prefixIs(meaning, '-')) if (support::prefixIs(meaning, '-'))
meaning = support::ltrim(meaning, "- "); meaning = support::ltrim(meaning, "- ");
for (int j = 0; j < pm->count; j++) { for (int j = 0; j < pm->count; j++) {
ret = from_iconv_encoding(string(pm->psyns[j]), encoding); ret.push_back(from_iconv_encoding(string(pm->psyns[j]), encoding));
} }
meanings[meaning].push_back(ret); meanings[meaning] = ret;
pm++; ++pm;
} }
// now clean up all allocated memory // now clean up all allocated memory
mythes->CleanUpAfterLookup(&pmean, count); mythes->CleanUpAfterLookup(&pmean, count);