$OpenBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell_cpp,v 1.4 2010/07/22 21:42:13 landry Exp $ --- extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig Tue Jul 13 21:10:13 2010 +++ extensions/spellcheck/hunspell/src/mozHunspell.cpp Wed Jul 21 09:54:44 2010 @@ -63,6 +63,7 @@ #include "nsISimpleEnumerator.h" #include "nsIDirectoryEnumerator.h" #include "nsIFile.h" +#include "nsILocalFile.h" #include "nsDirectoryServiceUtils.h" #include "nsDirectoryServiceDefs.h" #include "mozISpellI18NManager.h" @@ -342,6 +343,16 @@ mozHunspell::LoadDictionaryList() appDir->AppendNative(NS_LITERAL_CSTRING("dictionaries")); LoadDictionariesFromDir(appDir); } + } + + // try to load the generic mozilla/dictionaries + nsCOMPtr mozillaDir; + nsCOMPtr localFile; + rv = NS_NewNativeLocalFile(nsDependentCString( + "${LOCALBASE}/share/mozilla-dicts"), PR_TRUE, getter_AddRefs(localFile)); + if (localFile && NS_SUCCEEDED(rv)) { + localFile->QueryInterface(NS_GET_IID(nsIFile), getter_AddRefs(mozillaDir)); + LoadDictionariesFromDir(mozillaDir); } nsCOMPtr dictDirs;