]> git.lyx.org Git - lyx.git/blobdiff - src/WordList.cpp
Fix # 8414: Use the noweb module instead of literate-* article layouts
[lyx.git] / src / WordList.cpp
index 2f8ce2bd524848245933ab5a2dad624235517f20..96b7c35ea798c91a7a2726a0d28c1f61a82b694e 100644 (file)
@@ -30,16 +30,27 @@ namespace lyx {
 ///
 map<Language, WordList *> theGlobalWordList;
 
+
 WordList * theWordList(Language const & lang)
 {
        map<Language, WordList *>::iterator it = theGlobalWordList.find(lang);
        if (it != theGlobalWordList.end())
                return it->second;
        else
-               theGlobalWordList[lang] = new WordList();
+               theGlobalWordList[lang] = new WordList;
        return theGlobalWordList[lang];
 }
 
+
+void WordList::cleanupWordLists()
+{
+       map<Language, WordList *>::const_iterator it = theGlobalWordList.begin();
+       for (; it != theGlobalWordList.end(); ++it)
+               delete it->second;
+       theGlobalWordList.clear();
+}
+
+
 ///
 struct WordList::Impl {
        ///