Added HunSpell support

This commit is contained in:
Ianos Gnatiuc
2006-04-08 04:30:32 +00:00
parent fef9faee87
commit df425217eb
6 changed files with 38 additions and 30 deletions

View File

@@ -36,7 +36,7 @@
#include <gdirposx.h>
#include <gstrall.h>
#if !defined(GCFG_NO_MYSPELL)
#include <myspell.hxx>
#include <hunspell.hxx>
#endif
#include <gespell.h>
@@ -474,7 +474,7 @@ bool CMYSpellLang::Init(const gdirentry *entry)
bool CMYSpellLang::Load(const char *codeset, const char *)
{
mMSpell = new MySpell(mEngine, mDictionary);
mMSpell = new Hunspell(mEngine, mDictionary);
if (mMSpell)
{
@@ -547,6 +547,14 @@ bool CMYSpellLang::SpellCheck(const char *text)
}
// ------------------------------------------------------------------
bool CMYSpellLang::AddWord(const char *text)
{
return false;
}
// ------------------------------------------------------------------
#endif //#if !defined(GCFG_NO_MYSPELL)

View File

@@ -237,14 +237,14 @@ public:
#if !defined(GCFG_NO_MYSPELL)
class gdirentry;
class MySpell;
class Hunspell;
class CMYSpellLang: public CSpellLang
{
friend class CSpellChecker;
private:
MySpell *mMSpell;
Hunspell *mMSpell;
public:
CMYSpellLang()
@@ -263,7 +263,7 @@ public:
virtual void BuildSuggest(const char *text, CSpellSuggestV &suggest);
virtual bool SpellCheck(const char *text);
virtual bool AddWord(const char *) { return false; }
virtual bool AddWord(const char *);
};
#endif //#if !defined(GCFG_NO_MYSPELL)

View File

@@ -10,7 +10,7 @@
#define HUHCAP 3
#define HUHINITCAP 4
#define MAXSUGGESTION 15
#define MAXSUGGESTION 100
#define MAXSHARPS 5
#ifdef W32