mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix hunspell.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33406 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5c59e8c7cb
commit
94761bb7e5
@ -51,7 +51,7 @@ struct HunspellChecker::Private
|
||||
|
||||
~Private();
|
||||
|
||||
bool haveDictionary(string const & lang) const;
|
||||
bool haveDictionary(string const & lang, string & hpath);
|
||||
Hunspell * addSpeller(string const & lang);
|
||||
Hunspell * speller(string const & lang);
|
||||
/// ignored words
|
||||
@ -95,9 +95,8 @@ bool haveLanguageFiles(string const & hpath)
|
||||
}
|
||||
|
||||
|
||||
bool HunspellChecker::Private::haveDictionary(string const & lang) const
|
||||
bool HunspellChecker::Private::haveDictionary(string const & lang, string & hunspell_path)
|
||||
{
|
||||
string hunspell_path = lyxrc.hunspelldir_path;
|
||||
LYXERR(Debug::FILES, "hunspell path: " << external_path(hunspell_path));
|
||||
if (hunspell_path.empty()) {
|
||||
// FIXME We'd like to issue a better error message here, but there seems
|
||||
@ -134,7 +133,7 @@ Hunspell * HunspellChecker::Private::addSpeller(string const & lang)
|
||||
{
|
||||
string hunspell_path = lyxrc.hunspelldir_path;
|
||||
|
||||
if (!haveDictionary(lang))
|
||||
if (!haveDictionary(lang, hunspell_path))
|
||||
return 0;
|
||||
|
||||
FileName const affix(hunspell_path + ".aff");
|
||||
@ -243,7 +242,8 @@ bool HunspellChecker::hasDictionary(Language const * lang) const
|
||||
{
|
||||
if (!lang)
|
||||
return false;
|
||||
return (d->haveDictionary(lang->code()));
|
||||
string hunspell_path = lyxrc.hunspelldir_path;
|
||||
return (d->haveDictionary(lang->code(), hunspell_path));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user