Re: chunks design -- ABW-format selections on the clipboard

Subject: Re: chunks design -- ABW-format selections on the clipboard
From: Martin Sevior (
Date: Sat Sep 23 2000 - 21:12:48 CDT

HI Paul,
         thanks very much for your emails. I'm pretty pressed for time
right now so I'll just ask on a couple of points.

I've been working with Kevin's patch and I think it will give us
everything we need without breaking the file format all. He subclassed a
PieceTable fragment called a field object which can generate Field marked
runs. These runs can be formatted using all the usual tricks and since
they're marked as fields we can skip over them and show them up as grey so
they cannot be directed editted. There is a bit of work to do on updating
the fields especially with undos and using the Fields dialog but nothing I
can't fix. I've been working with it for a couple of days and I'm pretty
sure I can wrap it up in a few more days.

So my questions are:

1. Do we really want to allow editting of Fields? This adds a whole of
complexity if we want to preserve editting of fields through field
updates. My example is TOC. If a user decides to change on line of the TOC
it will be very hard to preserve this change when she adds a new chapter
and the TOC is updated.

2. Is a chuck a subclass of a fl_BlockLayout? I'm not convinced we need
it. Can you give me an example of where Kevin's code will fail to give us
the Field we want?



 On Fri, 22 Sep 2000, Paul Rohr wrote:

> I should mention that one hidden benefit of factoring out the CHUNK
> mechanism is that this is exactly what we'll need if we ever want to have
> abiword-format content on the clipboard.
> Currently, we just cut and paste RTF, which works pretty well, so long as we
> continue to keep the RTF import/export code in sync with our file format.
> However, if we ever add features which shouldn't be added to RTF, it might
> be handy to have ABW format content on the clipboard instead. (It's sure a
> lot faster to parse.)
> Essentially, all clipboard content would look something like:
> <abiword>
> <styles> <!-- referenced style definitions, if any --></styles>
> <section>
> <p>
> ... whetever the selection is goes inside here, wrapped in CHUNK tags ...
> </p>
> </section>
> <data><!-- again, only referenced data items --></data>
> </abiword>
> This means that the selection is a complete and valid document, but on a
> paste, the importer knows to ignore the outermost SECTION and P tags when
> inserting the selected chunk.
> Paul

This archive was generated by hypermail 2b25 : Sat Sep 23 2000 - 21:13:02 CDT