Subject: Re: spellchecking under kde 3.2
To: Mark Kirby <mark@coris.org.uk>
From: Mark Davies <mark@mcs.vuw.ac.nz>
List: tech-pkg
Date: 02/20/2004 00:38:48
This is a multipart MIME message.

--==_Exmh_136406740
Content-Type: text/plain; charset=us-ascii

	From:  Mark Davies <mark@mcs.vuw.ac.nz>
	Date:  Thu, 19 Feb 2004 12:08:40 +1300

> I just did a trace of a kwrite invoking the spellchecking and in my case it is 
> certainly firing up an ispell and passing it the contents of the buffer in the 
> form that ispell should expect but ispell doesn't seem to be flagging the 
> errors that it should (does when I run it manually).

Well that turned out to be that if "Consider run-together words as spelling 
errors" was off (the default), ispell considered my _obviously misspelt_ words 
to be correct so kwrite does seem to work.

In the process of looking at this I did replace kdelibs3/patches/patch-cc with 
the attached which I'll probably commit tomorrow once I confirm what effect it 
actually had.

Now looking at kword if I spellcheck individual words it seems to work ok.
Also if I spellcheck selections that DONT span multiple lines it seems to work 
ok.  If the selection spans multiple lines (or the whole document) it quickly 
pops up and then down the dialog box multiple times possibly ending with it up
on some incorrectly spelt word (not necessarily the first or last) or not up 
at all.

cheers
mark



--==_Exmh_136406740
Content-Type: text/plain ; name="patch-cc"; charset=us-ascii
Content-Description: patch-cc
Content-Disposition: attachment; filename="patch-cc"

$NetBSD: patch-cc,v 1.4 2004/02/04 13:58:40 markd Exp $

--- kdeui/ksconfig.cpp.orig	2003-11-30 22:46:51.000000000 +1300
+++ kdeui/ksconfig.cpp
@@ -432,6 +432,8 @@ void KSpellConfig::getAvailDictsIspell (
   // dictionary path
   QFileInfo dir ("/usr/lib/ispell");
   if (!dir.exists() || !dir.isDir())
+    dir.setFile ("@LOCALBASE@/lib");
+  if (!dir.exists() || !dir.isDir())
     dir.setFile ("/usr/local/lib/ispell");
   if (!dir.exists() || !dir.isDir())
     dir.setFile ("/usr/local/share/ispell");
@@ -495,6 +497,8 @@ void KSpellConfig::getAvailDictsAspell (
   // FIXME: use "aspell dump config" to find out the dict-dir
   QFileInfo dir ("/usr/lib/aspell");
   if (!dir.exists() || !dir.isDir())
+    dir.setFile ("@LOCALBASE@/lib");
+  if (!dir.exists() || !dir.isDir())
     dir.setFile ("/usr/local/lib/aspell");
   if (!dir.exists() || !dir.isDir())
     dir.setFile ("/usr/share/aspell");
@@ -559,6 +563,8 @@ KSpellConfig::fillDicts( QComboBox* box,
       // dictionary path
       QFileInfo dir ("/usr/lib/ispell");
       if (!dir.exists() || !dir.isDir())
+        dir.setFile ("@LOCALBASE@/lib");
+      if (!dir.exists() || !dir.isDir())
         dir.setFile ("/usr/local/lib/ispell");
       if (!dir.exists() || !dir.isDir())
         dir.setFile ("/usr/local/share/ispell");
@@ -623,6 +629,8 @@ KSpellConfig::fillDicts( QComboBox* box,
       // FIXME: use "aspell dump config" to find out the dict-dir
       QFileInfo dir ("/usr/lib/aspell");
       if (!dir.exists() || !dir.isDir())
+        dir.setFile ("@LOCALBASE@/lib");
+      if (!dir.exists() || !dir.isDir())
         dir.setFile ("/usr/local/lib/aspell");
       if (!dir.exists() || !dir.isDir())
         dir.setFile ("/usr/share/aspell");

--==_Exmh_136406740--