Added HunSpell support
This commit is contained in:
@@ -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)
|
||||
|
@@ -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)
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#define HUHCAP 3
|
||||
#define HUHINITCAP 4
|
||||
|
||||
#define MAXSUGGESTION 15
|
||||
#define MAXSUGGESTION 100
|
||||
#define MAXSHARPS 5
|
||||
|
||||
#ifdef W32
|
||||
|
Reference in New Issue
Block a user