TextContainer text_;
typedef set<docstring> Words;
- typedef map<Language, Words> LangWordsMap;
+ typedef map<string, Words> LangWordsMap;
///
LangWordsMap words_;
///
if (cit == d->fontlist_.end())
return;
Language const * lang = cit->font().language();
- d->words_[*lang].insert(word);
+ d->words_[lang->lang()].insert(word);
}
}
}
CompletionList const * Text::createCompletionList(Cursor const & cur) const
{
- WordList const * list = theWordList(*cur.getFont().language());
+ WordList const * list = theWordList(cur.getFont().language()->lang());
return new TextCompletionList(cur, list);
}
#include "WordList.h"
-#include "Language.h"
-
#include "support/convert.h"
#include "support/debug.h"
#include "support/docstring.h"
-#include "support/weighted_btree.h"
-
#include "support/lassert.h"
+#include "support/weighted_btree.h"
#include <map>
namespace lyx {
///
-map<Language, WordList *> theGlobalWordList;
+typedef map<string, WordList *> GlobalWordList;
+GlobalWordList theGlobalWordList;
-WordList * theWordList(Language const & lang)
+WordList * theWordList(string const & lang)
{
- map<Language, WordList *>::iterator it = theGlobalWordList.find(lang);
+ GlobalWordList::iterator it = theGlobalWordList.find(lang);
if (it != theGlobalWordList.end())
return it->second;
else
void WordList::cleanupWordLists()
{
- map<Language, WordList *>::const_iterator it = theGlobalWordList.begin();
+ GlobalWordList::const_iterator it = theGlobalWordList.begin();
for (; it != theGlobalWordList.end(); ++it)
delete it->second;
theGlobalWordList.clear();
#include "support/docstring.h"
-#include "Language.h"
-
namespace lyx {
class WordList {
Impl * d;
};
-WordList * theWordList(Language const & lang);
+WordList * theWordList(std::string const & lang);
} // namespace lyx
- Fix a problem when PATH changes and python command is relative (bug 8950).
+- Reduce memory use with large documents.
* DOCUMENTATION AND LOCALIZATION