On Tue, 2012-02-21 at 15:28 -0700, Svante Schubert wrote:
> The interesting change occurs within the content.xml:
>
> State A - before:
> <table:table-row table:style-name="ro1">
> <table:table-cell office:value-type="float" office:value="2010">
> <text:p>2010</text:p>
> </table:table-cell>
> <table:table-cell office:value-type="float" office:value="10000">
> <text:p>10000</text:p>
> </table:table-cell>
> <table:table-cell table:formula="of:=0.15*[.B4]"
> office:value-type="float" office:value="1500">
> <text:p>1500</text:p>
> </table:table-cell>
> </table:table-row>
>
>
> State B - after:
> <table:table-row table:style-name="ro1">
> <table:table-cell office:value-type="float" office:value="2010">
> <text:p>2010</text:p>
> </table:table-cell>
> <table:table-cell office:value-type="float" office:value="11000">
> <text:p>11000</text:p>
> </table:table-cell>
> <table:table-cell table:formula="of:=0.2*[.B4]"
> office:value-type="float" office:value="2200">
> <text:p>2200</text:p>
> </table:table-cell>
> </table:table-row>
>
> On the first glance it seems the document has changed at five
> different places. At a closer look - with some ODF back-ground - only
> two changes are identified, because the following ODF relations create
> dependencies of changes:
> The cell's @office:value attribute (see [1]) is always
> reflected by the cell's paragraph content.
I would disagree with this formulation. The cell's paragraph content can
be deduced from the office:value attribute (assuming one knows the
applicable style, but not vice-versa).
> Changing a cell's formula (@table:formula attribute, see [2])
> changes as well the cell's @office:value - if existent - and
> the cell's paragraph content
> Changing a cell's content (text of child paragraph), which is
> referenced by another cell's formula results in general in a
> change of the @office:value and the paragraph text of the cell
> with the formula.
>
> By the above dependencies the XML changes are mapped into basically
> two state changes, which can be mapped to two operations to be
> serialized using Merge-Enabled Change Tracking (MCT):
>
>
> 1. The change of cell value [.B4]
> 2. The change of the formula of cell [.C4] and the resulting cell
> value & paragraph text change
Unfortunately this only suffices as long as the office:value change is a
deterministic consequence of a formula change. Simple recalculation of a
document could change values without any accompanying formula changes
(think of random number generation or other volatile functions such as
date, time,....)
Andreas
--
Andreas J. Guelzow, PhD, FTICA
Concordia University College of Alberta