Hi Niklas,

Niklas Nebel schrieb:
On 06/21/09 22:57, Regina Henschel wrote:
In ODF1.2 draft spec I read, "MULTIPLE.OPERATIONS executes the formula expression pointed to by FormulaCell and _all_ formula expressions it depends on while replacing _all_ references to RowCell with references to RowReplacement respectively all references to ColumnCell with references to ColumnReplacement."

I think that the terms "execute formula expression" and "while replacing" is not exact enough.

(1) I interpret it in the way, that I first replace all references, generating intermediate, temp sheets, and then evaluate that sheet. I get the following:

The references are replaced dynamically during calculation, not in a separate step up front. The implementation uses a list of active replacements in the document (aTableOpList), no modified copies of the formulas are made.

That makes it not clearer and I do not see by which rules OOo results in 702. Would you be so kind to give a step by step calculation?

And besides the question what OOo does, there is the question whether that conforms to the spec.

Calculation starts in (A7=)MULTIPLE.OPERATIONS(A5;A2;A6). This means, "Take the formula in A5, replace all occurrence of A2 with A6 and calculate the formula then". Right?

So instead of calculating (A5=)MULTIPLE.OPERATIONS(A3;A2;A4) OOo calculates "=MULTIPLE.OPERATIONS(A3;A6;A4)". And now? If I understand the spec correct, then OOo has to go to A3 and look whether it depends on A2 and replace A2 with A6 if so.

If the formula on which a cell depends is a simple operation like + or * (as in the examples in the spec), then it makes no difference, when the replacement is done. In addition, it makes no difference whether you use the reference or use already the value to which the reference points. But here it is more complex and need to be defined.

Another example, again enter in column A.
2
3
5
7
11
13
17
19
=OFFSET(A2;1;0)
=A9+A2
=MULTIPLE.OPERATIONS(A10;A2;A4)

Try the same with
=OFFSET(A2;1;0)+A2
in cell A10 instead of =A9+A2
I would expect the same result, but it isn't.

kind regards
Regina


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@sc.openoffice.org
For additional commands, e-mail: dev-h...@sc.openoffice.org

Reply via email to