Re: wv and .doc exports?


Subject: Re: wv and .doc exports?
From: Emile Snyder (emile@reed.edu)
Date: Mon Dec 06 1999 - 10:59:41 CST


Thanks all for the good overview. I'll look at the docs and src and see
how it goes.

-emile

On Mon, 6 Dec 1999, Caolan McNamara wrote:

>
> On 05-Dec-99 Justin Bradford wrote:
> >> I was wondering if someone more familiar with the wv codebase might
> >> comment on future possibilities of Word export functionality? Is there a
> >> fairly straightforward way for this to happen, and it's waiting on
> >> programmer time, or is this a complicated design problem in it's own
> >> right. If someone wanted to start thinking about this, and poking around,
> >> where would you recommend they begin?
> >
> >Yes, export is planned, and the limiting factor is programmer time.
> >
> >One would need to consult with Caolan about his specific plans, but here
> >is a rough outline of implementation details:
> >
> >1. Replace laola OLE code in wv with libole2 from gnumeric.
> > Most of the reads are already wrapped by some utility functions, which
> >could just be replaced. However, getc is also used many times, which ought
> >to be replaced with a wrapper function similar to the 2 and 4 bit read
> >functions. Some seek functions might also need replacement.
> > The OLE loader would need to be replaced, and the stream FILE handles
> >would be replaced with libole2 stream handles.
>
> I have just added 2 and 4 byte reads for little endian platforms which
> give a good speed increase. Later I will make more speed increases by
> reading input in much larger chunks.
>
> >
> >2. The various "chunks" of a word file have specific formats which, in
> >the importer, are read from the file, and used to build in memory
> >structures for use. These functions need complementary write versions,
> >which takes the structs and writes out the data to the OLE stream.
> >
> >3. Export API should be the reverse of the import API. Simply, function to
> >change character, paragraph, section properties, write a block of
> >characters, insert a "special" character (which includes images, OLE
> >objects, etc).
> >
> > a. Propably also need a function to set a style (just pass character and
> >paragraph properties for it)
> >
> > b. Functions to set various other properties of the word file (password,
> >encryption, name, etc)
> >
> >4. A function to write all of the little pieces we collect out the in
> >right place and order.
> >
> >
> >If you want to explore this more, I'd start with the wv source and some
> >documentation on the Word file format. The latter can be found on
> >wotsit.org. Just a warning, though, it is not a pleasant format.
> >
> >As for actually programming stuff, perhaps Caolan could give details on
> >what he is planning. I imagine one could start on the write functions, as
> >they are fairly self-contained.
>
> Yep I would recommend by simply starting with a small line of text and creating
> a correct FIB and CLX structures and attempt to write them. Many of the other
> elements can remain blank for now.
>
> C.
>
>
> >
> >Justin
>
> Real Life: Caolan McNamara * Doing: MSc in HCI
> Work: Caolan.McNamara@ul.ie * Phone: +353-86-8790257
> URL: http://www.csn.ul.ie/~caolan * Sig: an oblique strategy
> Cut a vital connection
>

-------------------------------------------------------------------
ESR: I want to live in a world where software doesn't suck.
RMS: Any software that isn't free sucks.
Linus: I'm interested in free beer.
          - As reported by Elizabeth O. Coolbaugh of LWN
            from LinuxWorld Conference and Expo
-------------------------------------------------------------------



This archive was generated by hypermail 2b25 : Mon Dec 06 1999 - 11:00:04 CST