23 #include "tdespell_hspelldict.h"
26 #include <tqtextcodec.h>
28 using namespace KSpell2;
30 HSpellDict::HSpellDict(
const TQString& lang )
33 int int_error = hspell_init( &m_speller, HSPELL_OPT_DEFAULT );
34 if ( int_error == -1 )
35 kdDebug() <<
"HSpellDict::HSpellDict: Init failed" << endl;
37 codec = TQTextCodec::codecForName(
"iso8859-8-i" );
40 HSpellDict::~HSpellDict()
43 hspell_uninit( m_speller );
48 kdDebug() <<
"HSpellDict::check word = " << word <<endl;
50 TQCString wordISO = codec->fromUnicode( word );
52 int correct = hspell_check_word ( m_speller,
58 if( hspell_is_canonic_gimatria( wordISO ) != 0 )
70 hspell_trycorrect( m_speller, codec->fromUnicode( word ), &cl );
71 for( n_sugg = 0; n_sugg < corlist_n( &cl ); n_sugg++){
72 qsug.append( codec->toUnicode( corlist_str( &cl, n_sugg) ) );
79 TQStringList& suggestions )
81 bool c =
check( word );
88 const TQString& good )
91 kdDebug() <<
"HSpellDict::storeReplacement: Sorry, cannot." << endl;
98 kdDebug() <<
"HSpellDict::addToPersonal: Sorry, cannot." << endl;
105 kdDebug() <<
"HSpellDict::addToSession: Sorry, cannot." << endl;