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

List:       koffice-devel
Subject:    Re: [RFC] filter redesign
From:       Eva Brucherseifer <eva () kde ! org>
Date:       2001-09-13 14:59:02
[Download RAW message or body]


Hi Nicolas,

sorry for my late answer, I was kind of absent the last days.

>
> Sure, that is called style in KWord and class in CSS but I was trying to
> make a library for KWord export filters before finsih it. But however, I
> have the feeling that nobody cares anymore that I write this library when I
> read this thread.

I am sorry, that you think this way, that was not my intention. I think you 
already did a great work, esp. regarding all the details one has to care 
about. If I would try to make a filter for kspread as good as yours, I think, 
it wouldn't come close to yours in a long time. Also we should have common 
look&feel for dialogs and give the same options to the user. This is also 
important for embedded objects.

So far your filter seems to head towards a kword filter only. That is why I 
started to think about how to share work. And the result is the design, that 
I proposed, and that Zander was able to explain much better than me (Thank 
you for helping ;-). I didn't want to overrun you, that is why I proposed the 
whole thing here first.

Your is not so different from what I was proposing. You already have a 
hierarchy which very much is the builder side. All the "getXXX" functions are 
functions that are part of a builder. 
What Mr. Gamma called the director in his book, is in your function 
ClassExportFilterBase::filter(...) and all the "ProcessXXX" functions that 
are not part of any class. 

Now imagine, that you create an own class for this "director part". It would 
basically do what the filter and the process function does. Then you move all 
html specific things in the getXXX methods you already have. Maybe some extra 
methods might be usefull then for additional or more general tasks. The 
"ClassExportFilterBase" and the subclasses would be the builder classes then.
They contain a refernece to the QTextStream for the output. It must be build 
in the director, because the director knows about the output file name. The 
function getHTML() I proposed is not necessary, if you write to a QTextStream 
directly. It is also possible to have the instance of QTextStream in the 
director and you would pass it by refernce to each getXXX function then, so 
that the function can write, what it has to write. Well, that is a question 
of taste then. 
The classes of libexport look very general (are they)? And can maybe used for 
the other koffice parts as well. KWEFBaseClass with the above mentioned 
changes would then be the abstract base class for a number of builder classes.

I hope I understood your design right. There is not much class/method 
documentation and I didn't read the whole code. So please correct me, if I 
understood anything wrong.

Hopefully you understand, I rather want to enlarge the field, where your work 
can be used than to reduce it. Sorry again, if you felt that way.

I really would like to see full html and latex export filters for kspread and 
kformula, and maybe also for kpresenter. The html show is already quite 
useful, but in some occasions one needs a real html filter. And the latex 
export for kspread would be wonderful, because in my work, we do experiments 
and write reports in latex. So why not have data in kspread sheets and export 
them to data? Usually we also make CDs for companies with the material we 
worked on. That is where I need the html - not only for kword!

What about latex? Robert JACOLIN is the maintainer, right? As far as I 
understand it, the filter looks like an interpreter - a tree that is build up 
first and that is traversed then to produce the output. Is that right? Mmh, I 
don't see a straight forward method to reuse things in a kspread latex export 
:-( Robert - what do you think?

That was another long mail, although I should type... typist's neuritis :-(

Greetings,
eva



>
> Have a nice day/evening/night!
> _______________________________________________
> Koffice-devel mailing list
> Koffice-devel@mail.kde.org
> http://mail.kde.org/mailman/listinfo/koffice-devel
_______________________________________________
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