$OpenBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell_cpp,v 1.5 2012/01/11 02:17:13 nigel Exp $
--- extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig	Fri Dec 16 21:59:09 2011
+++ extensions/spellcheck/hunspell/src/mozHunspell.cpp	Thu Dec 22 00:39:29 2011
@@ -64,6 +64,7 @@
 #include "nsISimpleEnumerator.h"
 #include "nsIDirectoryEnumerator.h"
 #include "nsIFile.h"
+#include "nsILocalFile.h"
 #include "nsDirectoryServiceUtils.h"
 #include "nsDirectoryServiceDefs.h"
 #include "mozISpellI18NManager.h"
@@ -404,6 +405,16 @@ mozHunspell::LoadDictionaryList()
       appDir->AppendNative(NS_LITERAL_CSTRING("dictionaries"));
       LoadDictionariesFromDir(appDir);
     }
+  }
+
+  // try to load the generic mozilla/dictionaries
+  nsCOMPtr<nsIFile> mozillaDir;
+  nsCOMPtr<nsILocalFile> 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);
   }
 
   // find dictionaries from extensions requiring restart
