-------------------------------------------------------------------------------
-                                                                             -
-   Filter API HOWTO   -   last changed on 991031                             -
-                                                                             -
-------------------------------------------------------------------------------

The filter-API is very simple, so there is no "real" documentation. Please have
a look at koffice/filters/kword/ascii/asciiimport* if you want to write an
import filter, at koffice/filters/kword/ascii/asciiexport* if you want to write
an export filter. (and s/import/export below :)

Basically you have to...
... create a "factory" class for your filter. This factory is needed to load
    the filter (technically the filter is a shared lib which is dlopened on
    demand). You only have to change all the names in asciiimport_factory.cc
    and asciiimport_factory.h (i.e. all the "ASCII", "Ascii", and "ascii"
    stuff has to be replaced by "YOURFILTER", "YourFilter", and "yourfilter" :)
... derive your "main-filter-class" from KoFilter. Look at asciiimport.cc and
    asciiimport.h how this is done. Don't forget that you have to include or
    link the moc file. Otherwise the filter won't work! (the classname is
    needed during "incarnation" - all this info is stored in those nifty
    little moc files :) ).
... add your classes (files) to convert the file (for an example have a look at
    the export filter in koffice/filters/kword/html/). Remember: This is a
    "normal" library - so do whatever you can do with libraries :)
... adjust the *.desktop file. (Note: You'll have to rename the file!) In the
    file you'll have to change the "Name", "Comment", "Export", 
    "ExportDescription", "Import", "ImportDescription", "X-KDE-Library", and
    probably the "Icon" and "MiniIcon" fields.
... adapt the Makefile.am by renaming/adding files to meet your needs.
... execute make -f Makefile.cvs in the top dir (koffice/) and ./configure the
    whole stuff again. If it compiles you've won :) . Install and test it...

If you encounter any problems feel free to ask me! To check your sources into
CVS just send me the (compressed) files. If you want to change your sources in
CVS, please send me the diffs against the current snapshot.
To get a CVS account you'll have to ask David Faure or Stephan Kulow...but I
have to say that they are quite thrifty (and IMHO this is good!).

Werner, <wtrobin@carinthia.com>
