Subject: Re: wvExporter Draft API
From: Dom Lachowicz (email@example.com)
Date: Wed Sep 27 2000 - 17:46:52 CDT
>Could you explain some more about the style of API you intend to replace
>these with? From the stuff you're doing with fonts, it looks like you're
>thinking of adding lots of little function calls for each formatting
>primitive. However, I'm not sure what this gains us.
It doesn't gain *you* anything really, except easier coding. Read on...
>Currently, our Word importer does expose those "nasty word structures", so
>in a quick scan of less than 900 lines of code, it's pretty easy to locate,
>say, the mapping between:
> AbiWord Word example
> ------- ---- -------
> c props CHP font-weight:bold vs. chp->fBold
> p props PAP text-align vs. pap->jc
> section props SEP page-margin-left vs. sep->dxaLeft
>This means that the API between wv and our importer can be comparatively
>narrow, and it doesn't need to evolve for each and every additional
>we want to import -- we just interpret another portion of the structure and
>map it to the relevant property.
Sounds good. The importer needs work though. It's on my todo list. Basically
it crashes too often and doesn't handle all of the properties correctly. The
mishandling of properties is partly wv's fault. The crashes are mostly on
Abi's side though.
>I guess I was expecting export via wv to allow us to do pretty much the
>thing, only in reverse. (Insert big hand wave here.)
Totally possible. I was thinking about encapsulating as much of the
ugly-undersides as possible, but that's fine too.
>There's clearly plenty of Word-specific and OLE-specific crud that I'd be
>more than happy to encapsulate inside wv. (For example, if we don't need
>mess with FIBs on import, we may not need direct access to them on export
>either.) However, I suspect that it might be simpler to go ahead and allow
>our exporter to just directly set the relevant portions of some structures
>and pass them en masse, instead of introducing a whole layer of APIs to do
>the same job.
Ok, sounds good.
>I don't know exactly what the calling sequence should be, since we're
>probably better off letting wv instantiate and manage those structures, but
>the idea would be that we pass all the relevant properties en masse by
>filling out the appropriate word structure. Thus, the job of the wv
>exporter would be to produce and assemble those structures in the right
>sequence to generate a valid word document.
>Does the question make sense?
Makes perfect sense, Paul. This was the kind of feedback I was hoping for.
Thanks a lot.
I think that I'll take another look at my API and rework it a bunch. The
wvExporter_create and close calls will remain as well as the summary
functions. The others, well, who knows?
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
This archive was generated by hypermail 2b25 : Wed Sep 27 2000 - 17:47:07 CDT