Re: MacOSX builtin spellcheck support

From: Dom Lachowicz <domlachowicz_at_yahoo.com>
Date: Fri Oct 08 2004 - 02:06:10 CEST

Hi there,

I'm afraid that I won't be accepting this patch as-is.

What would be really neat is a patch against Enchant,
which is also housed in Abi's CVS.

The patch would be largely the same as the current
one, adapted to support Enchant's interfaces rather
than Abi's.

I'll help you in any way you need in order to get this
done. It's been on my long-term todo list, but only
because I lack access to a Mac.

Thanks and great work,
Dom

--- "R. Payette" <premi@altern.org> wrote:

> It's working pretty good here. Support all languages
> you have installed
> on your system. I've tested it with mixed french,
> english, spanish and
> it work.
>
> I'd like to have comment/feedback about my
> implementation ( someone can
> test this with chinese, japanese, arabic,... ? )
>
> Francis, now that you have fixed the contextual
> menu, would it be very
> hard to have is include the dictionary suggestion ?
>
>
>
>
>
>
> I guess the appleSpell files go in other/spell/cocoa
> The patch for spell manager is there to support a
> new HAVE_APPLESPELL
> build option
>
>

> ATTACHMENT part 2 application/octet-stream
x-unix-mode=0644; name=appleSpell_checker.mm
> /* AbiSuite
> * Copyright (C) 2004 RŽmi Payette
> *
> * This program is free software; you can
> redistribute it and/or
> * modify it under the terms of the GNU General
> Public License
> * as published by the Free Software Foundation;
> either version 2
> * of the License, or (at your option) any later
> version.
> *
> * This program 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 General Public License for more details.
> *
> * You should have received a copy of the GNU
> General Public License
> * along with this program; if not, write to the
> Free Software
> * Foundation, Inc., 59 Temple Place - Suite 330,
> Boston, MA
> * 02111-1307, USA.
> */
>
> #ifndef APPLESPELL_CHECKER_H
> #define APPLESPELL_CHECKER_H
>
> #include "spell_manager.h"
>
> class AppleSpellChecker : public SpellChecker
> {
> friend class SpellManager;
>
> public:
> virtual ~AppleSpellChecker();
>
> virtual bool addToCustomDict (const UT_UCSChar
> *word, size_t len);
>
> virtual void ignoreWord (const UT_UCSChar
> *toCorrect, size_t toCorrectLen);
>
> // ignore word list is handled
> internally by osx in _checkWord
> inline virtual bool isIgnored (const UT_UCSChar *
> pWord, size_t len) const {return false;}
>
> protected:
> AppleSpellChecker();
>
>
> private:
>
> bool _requestDictionary (const char * szLang);
> SpellChecker::SpellCheckResult _checkWord (const
> UT_UCSChar * word, size_t len);
> UT_GenericVector<UT_UCSChar*> * _suggestWord (const
> UT_UCSChar * word, size_t len);
>
> void *m_checker; // Pointer
> to NSSpellChecker.. Void so I don't have to include
> cocoa.h
> int m_tag;
> void *m_lang; // Pointer
> to NSString. Same reason as m_checker
> };
>
> #endif
>

> ATTACHMENT part 4 application/octet-stream
x-unix-mode=0644; name=spell_manager.cpp.diff

                
_______________________________
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now.
http://messenger.yahoo.com
Received on Fri Oct 8 02:05:35 2004

This archive was generated by hypermail 2.1.8 : Fri Oct 08 2004 - 02:05:35 CEST