Building and Running VAOS with spellchecker support

These notes are currently just for developers who build VAOS from CVS. The setup/installation instructions need to be moved once a binary VAOS with spellchecker support is available.

Building VAOS

There are a number of new files in core/va32. The project files for VC6 and for VS2005 have been updated to include these files.

The files are:

acronymlist.cpp, acronymlist.h Provides handling for the acronym list file
autocorrectdialog.cpp, autocorrectdialog.h Editor for the AutoCorrect dictionary
editspellchecker.cpp, editspellchecker.h Main spellchecker module to check Windows edit controls
editwindowbuffermanager.cpp, editwindowbuffermanager.h Class to manage the text buffer of a Windows edit control
spellchecker.cpp, spellchecker.h Interface to the external DLL that provides the core spellchecker functionality
spelldialog.cpp, spelldialog.h Manages the dialog box displayed During a spellcheck
spelloptionsdialog.cpp, spelloptionsdialog.h Provides support for editing spellchecker options for the current document
spelldllconfig.cpp, spelldllconfig.h added 2007-08-12 for config changes

In addition, the existing files vaspell.cpp and vaspell.h are no longer just stubs.

To build VAOS with spellchecker support you must define the preprocessor symbol VAESP in the va32 project. You can build VA32 without spellchecker support by omitting this symbol definition.

Building the DLL

The spellchecker functionality depends on an external DLL that provides dictionary checking. The interface to the DLL is designed to be pluggable, so that different spellcheckers can be supported on different systems, but there is currently only one DLL available – for GNU ASpell.

The ASpell interface isprovided by a new DLL project in .../VA6/Extras/vasp_asp. This is a simple MFC DLL project providing a wrapper around the ASpell DLL. Project files are available for both VC6 and VS2005.

NOTE that to build vasp_asp.dll you will need the file aspell.h from the GNU ASpell project. I have not put that file into our CVS repository for fear of breaching the ASpell licence (LGPL, which I don't think should be a problem, but I'm being careful). You can get aspell.h from a number of places, including here.

vasp_asp requires the the preprocessor symbol VAESP to be defined in the project file.

Installing ASpell

To use the spellchecker you have to install ASpell itself. The current released version for Win32 can be found here.

Read the ASpell documentation ... note, in particular, that ASpell's default configuration is controlled by the aspell.conf file, and by the .aspell.conf file in the user's home directory. By default the personal dictionary file will be placed in %home% (if defined). VA overrides some of this, in particular it sets encoding to iso8859-1 as VA works in that character set page internally (actually Windows 1252, but 8859-1 is the closest).

You will also need at least one dictionary pack. Various languages are available here – including English. Note that the English dictionary covers British English (with -ise endings only, unfortunately), American and Canadian English, they can be selected withing VA as en_GB, en_US and en_CA.

I've also played around with Italian and shown that it is possible to have two message editors open simultaneously with their spellcheckers set to different languages.

Note, that the aspell dictionary setup program does not remove the TmpInstall directory. So, if you install a second dictionary from the same directory it will bark about the existing TmpInstall directory. Remove it!

What's there and what's not there

I have, as yet, not written any code to preserve language (or other) settings when a document is saved to the outbox and re-edited, nor to make a particular language the default for a given folder. We discussed these some time ago, I just haven't written any code for it yet.

The "auto-correct while you type" function is implemented (using the same code as in VA5) and Tools | Options | Spell provides editing for the autocorrect dictionary (using new code, but it should be bug-compatible with VA5).

Note that the new spellchecker has an option to ignore "words" that are in the VA acronym list. I've pulled the old acronym-lookup code out of tpbrowse.cpp and rewritten it as a class that is used both by the spellchecker and in tpbrowse.

There is some discussion of the design of the spellchecker subsystem here

– Daniel.

devinfo/spellcheckerbuild.txt · Last modified: 01.01.2008 19:12 by kai
Recent changes RSS feed Driven by DokuWiki