$OpenBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell_cpp,v 1.3 2010/08/02 16:05:37 landry Exp $
--- extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig	Thu Jul  1 10:39:11 2010
+++ extensions/spellcheck/hunspell/src/mozHunspell.cpp	Sat Jul 31 11:05:18 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<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);
   }
 
   nsCOMPtr<nsISimpleEnumerator> dictDirs;
