summaryrefslogtreecommitdiffstats
path: root/kspell2/plugins/hspell
diff options
context:
space:
mode:
Diffstat (limited to 'kspell2/plugins/hspell')
-rw-r--r--kspell2/plugins/hspell/CMakeLists.txt49
-rw-r--r--kspell2/plugins/hspell/Makefile.am17
-rw-r--r--kspell2/plugins/hspell/kspell_hspell.desktop18
-rw-r--r--kspell2/plugins/hspell/kspell_hspellclient.cpp57
-rw-r--r--kspell2/plugins/hspell/kspell_hspellclient.h60
-rw-r--r--kspell2/plugins/hspell/kspell_hspelldict.cpp107
-rw-r--r--kspell2/plugins/hspell/kspell_hspelldict.h53
7 files changed, 0 insertions, 361 deletions
diff --git a/kspell2/plugins/hspell/CMakeLists.txt b/kspell2/plugins/hspell/CMakeLists.txt
deleted file mode 100644
index 188e92c84..000000000
--- a/kspell2/plugins/hspell/CMakeLists.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-#################################################
-#
-# (C) 2010 Serghei Amelian
-# serghei (DOT) amelian (AT) gmail.com
-#
-# Improvements and feedback are welcome
-#
-# This file is released under GPL >= 2
-#
-#################################################
-
-include_directories(
- ${TQT_INCLUDE_DIRS}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_BINARY_DIR}/tdecore
- ${CMAKE_SOURCE_DIR}/kspell2
- ${CMAKE_SOURCE_DIR}/tdecore
- ${HSPELL_INCLUDE_DIRS}
-)
-
-link_directories(
- ${TQT_LIBRARY_DIRS}
- ${HSPELL_LIBARY_DIRS}
-)
-
-
-##### other data ################################
-
-install( FILES kspell_hspell.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
-
-
-#### kspell_hspell ##############################
-
-### FIXME Not checked because hspell was removed from gentoo few years ago.
-### FIXME The maintainer recommend to use aspell with hebrew dictionary.
-### FIXME Maybe support for hspell will be removed too?
-### FIXME http://bugs.gentoo.org/show_bug.cgi?id=177546
-
-set( target kspell_hspell )
-
-set( ${target}_SRCS
- kspell_hspellclient.cpp kspell_hspelldict.cpp
-)
-
-tde_add_kpart( ${target} AUTOMOC
- SOURCES ${${target}_SRCS}
- LINK kspell2-shared ${HSPELL_LIBRARIES}
- DESTINATION ${PLUGIN_INSTALL_DIR}
-)
diff --git a/kspell2/plugins/hspell/Makefile.am b/kspell2/plugins/hspell/Makefile.am
deleted file mode 100644
index ebc78472a..000000000
--- a/kspell2/plugins/hspell/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-METASOURCES = AUTO
-
-AM_CPPFLAGS = -I$(top_srcdir)/kspell2 -I$(top_srcdir) $(all_includes)
-
-# For the future: examine if condensing the tons of *_LDFLAGS variables
-# into $(all_libraries) isn't better
-AM_LDFLAGS = $(LDFLAGS_AS_NEEDED) $(LDFLAGS_NEW_DTAGS)
-
-kde_module_LTLIBRARIES = kspell_hspell.la
-
-kspell_hspell_la_SOURCES = kspell_hspellclient.cpp kspell_hspelldict.cpp
-
-kspell_hspell_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN)
-kspell_hspell_la_LIBADD = ../../ui/libkspell2.la -lhspell -lz $(LIB_QT) $(LIB_TDECORE)
-
-service_DATA = kspell_hspell.desktop
-servicedir = $(kde_servicesdir)
diff --git a/kspell2/plugins/hspell/kspell_hspell.desktop b/kspell2/plugins/hspell/kspell_hspell.desktop
deleted file mode 100644
index 0194c9ffb..000000000
--- a/kspell2/plugins/hspell/kspell_hspell.desktop
+++ /dev/null
@@ -1,18 +0,0 @@
-[Desktop Entry]
-Type=Service
-ServiceTypes=KSpell/Client
-X-TDE-Library=kspell_hspell
-X-TDE-PluginInfo-Author=Mashrab Kuvatov
-X-TDE-PluginInfo-Email=kmashrab@uni-bremen.de
-X-TDE-PluginInfo-Name=kspell_hspell
-X-TDE-PluginInfo-Version=0.0.1
-X-TDE-PluginInfo-Website=http://www.kde.org
-X-TDE-PluginInfo-Category=Clients
-X-TDE-PluginInfo-Depends=
-X-TDE-PluginInfo-License=LGPL
-X-TDE-PluginInfo-EnabledByDefault=true
-Name=HSpell
-Name[bn]=এইচ-স্পেল
-Name[ne]=एच स्पेल
-Name[sv]=Hspell
-Name[te]=హెచ్ స్పెల్
diff --git a/kspell2/plugins/hspell/kspell_hspellclient.cpp b/kspell2/plugins/hspell/kspell_hspellclient.cpp
deleted file mode 100644
index 716300c20..000000000
--- a/kspell2/plugins/hspell/kspell_hspellclient.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * kspell_hspellclient.cpp
- *
- * Copyright (C) 2003 Zack Rusin <zack@kde.org>
- * Copyright (C) 2005 Mashrab Kuvatov <kmashrab@uni-bremen.de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-#include "kspell_hspellclient.h"
-
-#include "kspell_hspelldict.h"
-
-#include <kgenericfactory.h>
-#include <kdebug.h>
-
-typedef KGenericFactory<HSpellClient> HSpellClientFactory;
-K_EXPORT_COMPONENT_FACTORY( kspell_hspell, HSpellClientFactory( "kspell_hspell" ) )
-
-using namespace KSpell2;
-
-HSpellClient::HSpellClient( TQObject *parent, const char *name, const TQStringList& /* args */ )
- : Client( parent, name )
-{
-}
-
-HSpellClient::~HSpellClient()
-{
-}
-
-Dictionary* HSpellClient::dictionary( const TQString& language )
-{
- HSpellDict *ad = new HSpellDict( language );
- return ad;
-}
-
-TQStringList HSpellClient::languages() const
-{
- TQStringList langs;
- langs.append( "he" );
-
- return langs;
-}
-
-#include "kspell_hspellclient.moc"
diff --git a/kspell2/plugins/hspell/kspell_hspellclient.h b/kspell2/plugins/hspell/kspell_hspellclient.h
deleted file mode 100644
index a26aca227..000000000
--- a/kspell2/plugins/hspell/kspell_hspellclient.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * kspell_hspellclient.h
- *
- * Copyright (C) 2003 Zack Rusin <zack@kde.org>
- * Copyright (C) 2005 Mashrab Kuvatov <kmashrab@uni-bremen.de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-#ifndef KSPELL_HSPELLCLIENT_H
-#define KSPELL_HSPELLCLIENT_H
-
-#include "client.h"
-#include <tqobject.h>
-
-/* libhspell is a C library and it does not have #ifdef __cplusplus */
-extern "C" {
-#include "hspell.h"
-}
-
-namespace KSpell2 {
- class Dictionary;
-}
-using KSpell2::Dictionary;
-
-class HSpellClient : public KSpell2::Client
-{
- Q_OBJECT
-public:
- HSpellClient( TQObject *parent, const char *name, const TQStringList & /* args */ );
- ~HSpellClient();
-
- virtual int reliability() const {
- return 20;
- }
-
- virtual Dictionary* dictionary( const TQString& language );
-
- virtual TQStringList languages() const;
-
- virtual TQString name() const {
- return "HSpell";
- }
-private:
-
-};
-
-#endif
diff --git a/kspell2/plugins/hspell/kspell_hspelldict.cpp b/kspell2/plugins/hspell/kspell_hspelldict.cpp
deleted file mode 100644
index 04f055e86..000000000
--- a/kspell2/plugins/hspell/kspell_hspelldict.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * kspell_hspelldict.cpp
- *
- * Copyright (C) 2003 Zack Rusin <zack@kde.org>
- * Copyright (C) 2005 Mashrab Kuvatov <kmashrab@uni-bremen.de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-#include "kspell_hspelldict.h"
-#include <kdebug.h>
-
-#include <tqtextcodec.h>
-
-using namespace KSpell2;
-
-HSpellDict::HSpellDict( const TQString& lang )
- : Dictionary( lang )
-{
- int int_error = hspell_init( &m_speller, HSPELL_OPT_DEFAULT );
- if ( int_error == -1 )
- kdDebug() << "HSpellDict::HSpellDict: Init failed" << endl;
- /* hspell understans only iso8859-8-i */
- codec = TQTextCodec::codecForName( "iso8859-8-i" );
-}
-
-HSpellDict::~HSpellDict()
-{
- /* It exists in =< hspell-0.8 */
- hspell_uninit( m_speller );
-}
-
-bool HSpellDict::check( const TQString& word )
-{
- kdDebug() << "HSpellDict::check word = " << word <<endl;
- int preflen;
- TQCString wordISO = codec->fromUnicode( word );
- /* returns 1 if the word is correct, 0 otherwise */
- int correct = hspell_check_word ( m_speller,
- wordISO,
- &preflen); //this going to be removed
- //in next hspell releases
- /* I do not really understand what gimatria is */
- if( correct != 1 ){
- if( hspell_is_canonic_gimatria( wordISO ) != 0 )
- correct = 1;
- }
- return correct == 1;
-}
-
-TQStringList HSpellDict::suggest( const TQString& word )
-{
- TQStringList qsug;
- struct corlist cl;
- int n_sugg;
- corlist_init( &cl );
- hspell_trycorrect( m_speller, codec->fromUnicode( word ), &cl );
- for( n_sugg = 0; n_sugg < corlist_n( &cl ); n_sugg++){
- qsug.append( codec->toUnicode( corlist_str( &cl, n_sugg) ) );
- }
- corlist_free( &cl );
- return qsug;
-}
-
-bool HSpellDict::checkAndSuggest( const TQString& word,
- TQStringList& suggestions )
-{
- bool c = check( word );
- if( c )
- suggestions = suggest( word );
- return c;
-}
-
-bool HSpellDict::storeReplacement( const TQString& bad,
- const TQString& good )
-{
- // hspell-0.9 cannot do this
- kdDebug() << "HSpellDict::storeReplacement: Sorry, cannot." << endl;
- return false;
-}
-
-bool HSpellDict::addToPersonal( const TQString& word )
-{
- // hspell-0.9 cannot do this
- kdDebug() << "HSpellDict::addToPersonal: Sorry, cannot." << endl;
- return false;
-}
-
-bool HSpellDict::addToSession( const TQString& word )
-{
- // hspell-0.9 cannot do this
- kdDebug() << "HSpellDict::addToSession: Sorry, cannot." << endl;
- return false;
-}
diff --git a/kspell2/plugins/hspell/kspell_hspelldict.h b/kspell2/plugins/hspell/kspell_hspelldict.h
deleted file mode 100644
index ff0302e4b..000000000
--- a/kspell2/plugins/hspell/kspell_hspelldict.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * kspell_hspelldict.h
- *
- * Copyright (C) 2003 Zack Rusin <zack@kde.org>
- * Copyright (C) 2005 Mashrab Kuvatov <kmashrab@uni-bremen.de>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-#ifndef KSPELL_HSPELLDICT_H
-#define KSPELL_HSPELLDICT_H
-
-#include "dictionary.h"
-/* libhspell is a C library and it does not have #ifdef __cplusplus */
-extern "C" {
-#include "hspell.h"
-}
-
-class HSpellDict : public KSpell2::Dictionary
-{
-public:
- HSpellDict( const TQString& lang );
- ~HSpellDict();
- virtual bool check( const TQString& word );
-
- virtual TQStringList suggest( const TQString& word );
-
- virtual bool checkAndSuggest( const TQString& word,
- TQStringList& suggestions ) ;
-
- virtual bool storeReplacement( const TQString& bad,
- const TQString& good );
-
- virtual bool addToPersonal( const TQString& word );
- virtual bool addToSession( const TQString& word );
-private:
- struct dict_radix *m_speller;
- TQTextCodec *codec;
-};
-
-#endif