From 60ab82953c20f79bc000ba5de5e0446212dadedd Mon Sep 17 00:00:00 2001 From: Ianos Gnatiuc Date: Sat, 11 Mar 2006 19:24:51 +0000 Subject: [PATCH] Fixed some bugs --- goldlib/gall/gdefs.h | 2 +- goldlib/gall/gespell.cpp | 12 +++++++----- goldlib/gall/gespell.h | 7 ++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/goldlib/gall/gdefs.h b/goldlib/gall/gdefs.h index 366e2c2..31aec59 100644 --- a/goldlib/gall/gdefs.h +++ b/goldlib/gall/gdefs.h @@ -107,7 +107,7 @@ #define GCFG_NO_MSSPELL #endif -#if !defined(GCFG_NO_MSSPELL) && !defined(GCFG_NO_MYSPELL) +#if !defined(GCFG_NO_MSSPELL) || !defined(GCFG_NO_MYSPELL) #define GCFG_SPELL_INCLUDED #endif diff --git a/goldlib/gall/gespell.cpp b/goldlib/gall/gespell.cpp index 94bf399..8594c49 100644 --- a/goldlib/gall/gespell.cpp +++ b/goldlib/gall/gespell.cpp @@ -572,6 +572,11 @@ bool CMYSpellLang::SpellSuggest(const char *text, bool more) } +// ------------------------------------------------------------------ + +#endif //#if !defined(GCFG_NO_MYSPELL) + + // ------------------------------------------------------------------ CSpellChecker::CSpellChecker() @@ -582,11 +587,6 @@ CSpellChecker::CSpellChecker() } -// ------------------------------------------------------------------ - -#endif //#if !defined(GCFG_NO_MYSPELL) - - // ------------------------------------------------------------------ bool CSpellChecker::Init(const char *codeset, const char *dicPath) @@ -723,9 +723,11 @@ CSpellSuggestV &CSpellChecker::Suggest() // ------------------------------------------------------------------ +#if !defined(GCFG_NO_MSSPELL) #undef CHECK_ERROR #undef CHECK_NULL #undef CHECK_SEC +#endif // ------------------------------------------------------------------ diff --git a/goldlib/gall/gespell.h b/goldlib/gall/gespell.h index 0ceb126..c49f18b 100644 --- a/goldlib/gall/gespell.h +++ b/goldlib/gall/gespell.h @@ -221,7 +221,9 @@ public: #endif //#if !defined(GCFG_NO_MSSPELL) + #if !defined(GCFG_NO_MYSPELL) + class gdirentry; class MySpell; @@ -259,8 +261,6 @@ typedef std::vector CSpellLangV; class CSpellChecker { private: - int mDicType; - bool mInited; char mText[1024]; @@ -270,9 +270,6 @@ private: CSpellLangV mLangs; CSpellSuggestV mSuggest; -private: - void MSAddLanguage(HKEY hKey, const char *name); - public: CSpellChecker(); ~CSpellChecker() { Close(); }