commit: piecetable changes


Subject: commit: piecetable changes
From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Sat Nov 10 2001 - 11:49:45 CST


I have made two substantial changes to the piectable related to
styles:

(1) when applying a style to something that already has a style, we
first remove all attributes and properties associated with the old
style and only then add the attributes and properties of the new
style. In the past we simply applied the properties of the new style
over all existing properties which meant that the result was not the
formating of the new style but a union of all previously used styles.

(2) when applying Paragraph style, we apply it to the Paragraph
alone not to the paragraph contents. In the past we did the latter,
i.e., applying Normal to a block resulted in all spans having also
the attribute style="Normal"; this is wrong. (Note that runs retrieve
their formating both from the block and span APs, so that any
character properties defined in Normal automatically filter down the
runs, without the need to apply Normal directly to the runs). This
change greatly simplifies changeStruxFmt, and once we are
satisified the new code is working, we can simplify it further (at the
moment this has been done so that it would could be easily
reverted).

These changes go some way toward fixing major bug 1939; there
is one more issue that needs to be resolved, and on which I need
Martin's input. Because the list-specific attributes are not part of
the style definitions, applying say Normal style to a list style will
not remove the numbering, etc. It would seem to me that the best
thing would be to add function to the style class bool
isNumbered(), which would return true for all the list styles,
numbered headings, etc., and which could be used to determine
whether to remove the list-specific attributes and related stuff.

Tomas

changed: a number of piecetable files



This archive was generated by hypermail 2b25 : Sat Nov 10 2001 - 11:50:13 CST