Aspell: execute the command in pipe mode instead of loading the dll for getting suggestions: simpler and no crashes of the whole UI in case of problem

This commit is contained in:
Jean-Francois Dockes
2021-04-23 10:57:55 +02:00
parent 9abaf84be6
commit 7310709e08
10 changed files with 141 additions and 1076 deletions
+2 -5
View File
@@ -1453,14 +1453,11 @@ bool Db::getSpellingSuggestions(const string& word, vector<string>& suggs)
return false;
}
list<string> asuggs;
string reason;
if (!m_aspell->suggest(*this, term, asuggs, reason)) {
LOGERR("Db::getSpellingSuggestions: aspell failed: " << reason <<
"\n");
if (!m_aspell->suggest(*this, term, suggs, reason)) {
LOGERR("Db::getSpellingSuggestions: aspell failed: " << reason << "\n");
return false;
}
suggs = vector<string>(asuggs.begin(), asuggs.end());
#endif
} else {
#ifdef TESTING_XAPIAN_SPELL