[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: [RFC] Creating a library for supporting KWord's export filters
From:       Nicolas Goutte <nicog () snafu ! de>
Date:       2001-08-30 18:55:40
[Download RAW message or body]

On Wednesday, 29. August 2001 21:24, David Faure wrote:
> On Mercredi 29 Août 2001 21:35, Nicolas Goutte wrote:
> > I would like to create a library to support export filters of KWord.
> >[...]
>
> This sounds like an excellent idea to me.
> Especially adapted to the design behind those filters (with the "callbacks"
> to register upon reading a given element or attribute). Might make it easy
> to centralize code than the usual QDom-based approach.
> Hmm, what's the plan ? Are the callbacks part of the lib (and the lib
> stores the whole data and offers the result in one go - but in that case
> the callbacks are a bit useless IMHO), are they to be provided by the
> specific filter (in which case there won't be much to centralize...),
> or... maybe you plan to have some more high-level callbacks for the
> specific filter ? This might be the best solution.

My idea is to hide the callbacks because I think that they are the weakest 
point in the ASCII export filter system. For a new programmer, the system is 
not easily to understand (especially if he does not know KWord's file format 
yet.) Also some callbacks might have to change in future because of a KWord 
file format change or simplification, so if possible the library should be 
able to hide such changes.

My point of view is that a filter would be a class derived from the main 
class of the library and some virtual methods would be called at main points, 
for example the start of a paragraph (but with the layout already fully 
decoded), for each <FORMAT> (even for the reconstitued ones), for an end of a 
paragraph, for the start of a list or the end of a list.

A few points are still open, like how to pass styles, document information, 
image information and other such high level features.

>
> Just wondering about the technical solution. In any case centralizing this
> is a very good idea, please go ahead.

Have a nice day/evening/night!
_______________________________________________
Koffice-devel mailing list
Koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic