From: Andrew Dunbar (email@example.com)
Date: Tue Oct 29 2002 - 20:29:53 EST
--- Dom Lachowicz <firstname.lastname@example.org> wrote: > On
Tue, 2002-10-29 at 09:31, Dr William Bland wrote:
> > Hello,
> > If I understand correctly, Abiword represents a
> > document by a doubly-linked list of objects
> > (strings, images, etc.) where the format
> > parameters (e.g. boldness, font size, etc.) are
> > constant over a single object in the list.
> > I am trying to
> > 1. Find the list of objects that corresponds to
> > the
> > document in the currently selected
> > frame.
> > 2. Step through it, from the first object to
> > the last.
> > Unfortunately I'm not getting very far. Could
> > someone post a code snippet if this is just a few
> > lines (I'm sure it must be simple to those who
> > know how!) or if it's not so simple some hints
> > would be great.
> Hi Bill,
> The only way I know how to do this *easily* is via
> writing an exporter.
> When you save the document, you necessarily iterate
> over the objects in the current document in a
> sequential manner.
> You could write a shim/dummy exporter which doesn't
> write anything to disk (serializing the object list,
> as it were), but instead did some other operation
> based on the object list that's being enumerated.
> Barring that, another good start would be to look at
> how these objects get enumerated in the piece-table
> code when being exported. Clearly we already have
> code for iterating over all of the objects in the
> document. You might be able to steal or use it.
This Feature Request in AbiWord's Bugzilla might also
be interesting to you:
"RFE: APIs to iterate through document"
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
This archive was generated by hypermail 2.1.4 : Tue Oct 29 2002 - 20:38:12 EST