Lessons learned from field prototypes and WW doc analysis

Needed:

a) Field need be considered for line break.

E.g. when you have a field Florian Reuter and that fields reaches the end of a 
line it need to be considered by the line break algorithms, e.g.: Text text 
text text text text text text text text <field>Florian 
Reuter</field> text text text.
This is very important, since the current field implementation in OOo Writer 
treats fields as a single entity and this does not break within fields.

b) Fields need traversable.
In other words you need to be able to place a cursor into a field and edit it. 
Again; currently a cursor can only be place on the whole field and not into it.

c) Fields need to be nestable
You need to be able to nest fields to e.g. model conditionals etc.


Optional:

d) Fields must be able to cross paragraph boundaries.
This is theoretically possible in WW. E.g. you can produce fields <field>Florian
Reuter</field>.
However this may be circumvented when we allow hard line breaks in a field. 
Then this resolved to use case a). E.g. the above sample would look this: 
<field>Florian <br>Reuter</field>.
Additionally this would prevent <field-start/> and <field-end/> marks in ODF 
:-) However I way result in slightly different layouts.

I tried several variants to implement fields: Bookmarks, Change tracking and 
Attributes.

At the end I would prefer to reuse the existing field mechanism and simply 
enhance the layout code such that a) fields considered for line break and c) 
field texts can also contains field wildcards. This again has to be considered 
by the layout code.
Regarding b) I would like to introduce a special field edit mode”, similar to 
the XForm edit mode.

The idea:
We add an additional SwNode array to a SwDoc or reuse one of the existing 
areas. We introduce a new special “field wildcards” which references an SwNode.
We enhance the layout such that these new field codes are recognized and that 
the text is loaded from the SwNode.
By having the text of the fields stored in SwNodes we can place a cursor to it 
:-)

I know that this is very brief. However suggestions and concerns are 
appreciated. Especially from Frank and Oliver regarding the layout code :-)

~Florian


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to