Added HunSpell support
This commit is contained in:
parent
fef9faee87
commit
df425217eb
@ -77,7 +77,7 @@
|
|||||||
#CPPFLAGS+=-DGCFG_NOSYNCHRONET
|
#CPPFLAGS+=-DGCFG_NOSYNCHRONET
|
||||||
# Uncomment to disable MS Office spellchecker support (win32 only)
|
# Uncomment to disable MS Office spellchecker support (win32 only)
|
||||||
#CPPFLAGS+=-DGCFG_NO_MSSPELL
|
#CPPFLAGS+=-DGCFG_NO_MSSPELL
|
||||||
# Uncomment to disable MySpell spellchecker support (multiplatform)
|
# Uncomment to disable HunSpell spellchecker support (multiplatform)
|
||||||
#CPPFLAGS+=-DGCFG_NO_MYSPELL
|
#CPPFLAGS+=-DGCFG_NO_MYSPELL
|
||||||
# Comment to disable AreaRecycleBin keyword and feature
|
# Comment to disable AreaRecycleBin keyword and feature
|
||||||
CPPFLAGS+=-D__INCLUDE_NEW_KEYWORDS__
|
CPPFLAGS+=-D__INCLUDE_NEW_KEYWORDS__
|
||||||
|
2
Makefile
2
Makefile
@ -7,7 +7,7 @@ include Config.def
|
|||||||
|
|
||||||
LIBS=gall gcfg gmb3 glibc uulib smblib msgidlib
|
LIBS=gall gcfg gmb3 glibc uulib smblib msgidlib
|
||||||
ifneq ($(findstring GCFG_NO_MYSPELL, $(CPPFLAGS)), GCFG_NO_MYSPELL)
|
ifneq ($(findstring GCFG_NO_MYSPELL, $(CPPFLAGS)), GCFG_NO_MYSPELL)
|
||||||
LIBS+=myspell
|
LIBS+=hunspell
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXECUTABLES=golded3 goldnode rddt
|
EXECUTABLES=golded3 goldnode rddt
|
||||||
|
14
golded.mak
14
golded.mak
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
# Uncomment to disable MS Office spellchecker support
|
# Uncomment to disable MS Office spellchecker support
|
||||||
# CPP_EXTRA_FLAGS=$(CPP_EXTRA_FLAGS) /DGCFG_NO_MSSPELL
|
# CPP_EXTRA_FLAGS=$(CPP_EXTRA_FLAGS) /DGCFG_NO_MSSPELL
|
||||||
# Uncomment to disable MySpell spellchecker support
|
# Uncomment to disable HunSpell spellchecker support
|
||||||
# CPP_EXTRA_FLAGS=$(CPP_EXTRA_FLAGS) /DGCFG_NO_MYSPELL
|
# CPP_EXTRA_FLAGS=$(CPP_EXTRA_FLAGS) /DGCFG_NO_MYSPELL
|
||||||
|
|
||||||
|
|
||||||
@ -384,13 +384,13 @@ LNK_OBJS= \
|
|||||||
$(OBJ_DIR)\geview.obj \
|
$(OBJ_DIR)\geview.obj \
|
||||||
$(OBJ_DIR)\gmarea.obj \
|
$(OBJ_DIR)\gmarea.obj \
|
||||||
$(OBJ_DIR)\golded3.obj \
|
$(OBJ_DIR)\golded3.obj \
|
||||||
$(OBJ_DIR)\myspell.obj \
|
$(OBJ_DIR)\affentry.obj \
|
||||||
$(OBJ_DIR)\suggest.obj \
|
|
||||||
$(OBJ_DIR)\hashmgr.obj \
|
|
||||||
$(OBJ_DIR)\dictmgr.obj \
|
|
||||||
$(OBJ_DIR)\csutil.obj \
|
|
||||||
$(OBJ_DIR)\affixmgr.obj \
|
$(OBJ_DIR)\affixmgr.obj \
|
||||||
$(OBJ_DIR)\affentry.obj
|
$(OBJ_DIR)\csutil.obj \
|
||||||
|
$(OBJ_DIR)\dictmgr.obj \
|
||||||
|
$(OBJ_DIR)\hashmgr.obj \
|
||||||
|
$(OBJ_DIR)\hunspell.obj \
|
||||||
|
$(OBJ_DIR)\suggmgr.obj
|
||||||
|
|
||||||
GOLDED_OBJS=$(OBJ_DIR)\gemain.obj
|
GOLDED_OBJS=$(OBJ_DIR)\gemain.obj
|
||||||
RDDT_OBJS=$(OBJ_DIR)\rddt.obj
|
RDDT_OBJS=$(OBJ_DIR)\rddt.obj
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include <gdirposx.h>
|
#include <gdirposx.h>
|
||||||
#include <gstrall.h>
|
#include <gstrall.h>
|
||||||
#if !defined(GCFG_NO_MYSPELL)
|
#if !defined(GCFG_NO_MYSPELL)
|
||||||
#include <myspell.hxx>
|
#include <hunspell.hxx>
|
||||||
#endif
|
#endif
|
||||||
#include <gespell.h>
|
#include <gespell.h>
|
||||||
|
|
||||||
@ -474,7 +474,7 @@ bool CMYSpellLang::Init(const gdirentry *entry)
|
|||||||
|
|
||||||
bool CMYSpellLang::Load(const char *codeset, const char *)
|
bool CMYSpellLang::Load(const char *codeset, const char *)
|
||||||
{
|
{
|
||||||
mMSpell = new MySpell(mEngine, mDictionary);
|
mMSpell = new Hunspell(mEngine, mDictionary);
|
||||||
|
|
||||||
if (mMSpell)
|
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)
|
#endif //#if !defined(GCFG_NO_MYSPELL)
|
||||||
|
@ -237,14 +237,14 @@ public:
|
|||||||
#if !defined(GCFG_NO_MYSPELL)
|
#if !defined(GCFG_NO_MYSPELL)
|
||||||
|
|
||||||
class gdirentry;
|
class gdirentry;
|
||||||
class MySpell;
|
class Hunspell;
|
||||||
|
|
||||||
class CMYSpellLang: public CSpellLang
|
class CMYSpellLang: public CSpellLang
|
||||||
{
|
{
|
||||||
friend class CSpellChecker;
|
friend class CSpellChecker;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MySpell *mMSpell;
|
Hunspell *mMSpell;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMYSpellLang()
|
CMYSpellLang()
|
||||||
@ -263,7 +263,7 @@ public:
|
|||||||
virtual void BuildSuggest(const char *text, CSpellSuggestV &suggest);
|
virtual void BuildSuggest(const char *text, CSpellSuggestV &suggest);
|
||||||
|
|
||||||
virtual bool SpellCheck(const char *text);
|
virtual bool SpellCheck(const char *text);
|
||||||
virtual bool AddWord(const char *) { return false; }
|
virtual bool AddWord(const char *);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //#if !defined(GCFG_NO_MYSPELL)
|
#endif //#if !defined(GCFG_NO_MYSPELL)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#define HUHCAP 3
|
#define HUHCAP 3
|
||||||
#define HUHINITCAP 4
|
#define HUHINITCAP 4
|
||||||
|
|
||||||
#define MAXSUGGESTION 15
|
#define MAXSUGGESTION 100
|
||||||
#define MAXSHARPS 5
|
#define MAXSHARPS 5
|
||||||
|
|
||||||
#ifdef W32
|
#ifdef W32
|
||||||
|
Reference in New Issue
Block a user