+ return have_dict ;
+}
+
+
+AspellConfig * AspellChecker::Private::getConfig(string const & lang, string const & variety)
+{
+ AspellConfig * config = new_aspell_config();
+ bool have_dict = false;
+ string const sysdir = lyx::support::package().system_support().absFileName() ;
+ string const userdir = lyx::support::package().user_support().absFileName() ;
+
+ LYXERR(Debug::FILES, "aspell user dir: " << userdir);
+ have_dict = checkAspellData(config, userdir, dataDirectory(), dictDirectory(), lang, variety);
+ if (!have_dict) {
+ LYXERR(Debug::FILES, "aspell sysdir dir: " << sysdir);
+ have_dict = checkAspellData(config, sysdir, dataDirectory(), dictDirectory(), lang, variety);
+ }
+ if (!have_dict) {
+ // check for package data of OS installation
+ have_dict = checkAspellData(config, osPackageBase(), osPackageDataDirectory(), osPackageDictDirectory(), lang, variety);
+ }