• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

enchant_checker.h

Go to the documentation of this file.
00001 /* AbiSuite
00002  * Copyright (C) 2003 Dom Lachowicz
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 #ifndef ENCHANT_CHECKER_H
00021 #define ENCHANT_CHECKER_H
00022 
00023 #include "spell_manager.h"
00024 #ifdef _MSC_VER
00025 typedef long ssize_t;
00026 #endif
00027 #include <enchant.h>
00028 
00029 class ABI_EXPORT EnchantChecker : public SpellChecker
00030 {
00031     friend class SpellManager;
00032 
00033 public:
00034 
00035     virtual ~EnchantChecker();
00036 
00037     virtual bool addToCustomDict (const UT_UCSChar *word, size_t len);
00038     virtual void correctWord (const UT_UCSChar *toCorrect, size_t toCorrectLen,
00039                               const UT_UCSChar *correct, size_t correctLen);
00040 
00041     virtual void ignoreWord (const UT_UCSChar *toCorrect, size_t toCorrectLen);
00042     virtual bool isIgnored (const UT_UCSChar * pWord, size_t len) const;
00043 
00044 protected:
00045 
00046     EnchantChecker();
00047 
00048 private:
00049 
00050     bool _requestDictionary (const char * szLang);
00051     SpellChecker::SpellCheckResult _checkWord (const UT_UCSChar * word, size_t len);
00052     UT_GenericVector<UT_UCSChar*> * _suggestWord (const UT_UCSChar * word, size_t len);
00053 
00054     EnchantDict *m_dict;
00055 };
00056 
00057 #endif

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1