Fields Update.


Subject: Fields Update.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Fri Sep 22 2000 - 07:11:59 CDT


HI Everyone,
            I've spent a few days with all the Fields email and Keith
Stribley's initial patch for a new Fields implementation. We need a new
Fields implemntation because the current Fields implementation is not good
enough for complex multi-lined fields like Table Of Contents. Our current
scheme works fine for List labels, page numbers and dates though and I
propose we keep the current implementation for that purpose.

What Keith's code does is to generate new textRuns marked as fields from a
Field calculation. This requires changes to the PieceTable to allow spans
to marked as Fields. The Field textRuns can be formatted and broken like
regular Abi text but they cannot be editted. I've revived the patch,
successfully compiled and run Abiword with Keith's code and have fixed a
bug that meant that cursor movement around a field was incorrect.

I'm confident this will all work and should be finished in a couple of
weeks. Justin Bradford had more grandiose plans involving groups and runs
and special zero-length marker runs. I will not try to implement that
because I actually think Keith's scheme will allow us to do whatever we
like with Fields and will be more than enough for a version 1.X release.

The next thing I want to do is to implement a generic Fields updating
mechanism. One problem with Keith's code is that updating a Field requires
deleting the previous text span then inserting the new span. This is quite
expensive and is why I think we should just use Keith's PieceTable Fields
for complex stuff like Table Of Contents. The present mechanism is much
faster for simple fields like list labels. Once the updater is done I'll
commit the code. It should be finished in a couple of weeks at most.

After that I'll need help to get rtf importing/exporting working so we can
cut and paste fields. It would be good to get Word fields imported too.
Can you help with these Dom?

Cheers

Martin



This archive was generated by hypermail 2b25 : Fri Sep 22 2000 - 07:12:06 CDT