Created attachment 89934 [details]
Showcase for variables in table
If a "Set variable" field is used inside a table, the variable stays unchanged inside this table for formulas, both to the right and below the cell where it was set. In tables below, it does have the changed value.
Steps to reproduce:
1. Create a new text document.
2. Insert a table 2x2.
3. In the first left cell (A1) insert a "Set variable" field (Insert->Fields->Other...->Variables->Set variable) with name "a" and value 1
4. In the lower right cell (B2), enter the formula "=a*2"
Expected: the B2 cell should contain 2
Actual: B2 contain 0.
If you add another table below the first, and put the formula from step 4 in any its cells, it will result to correct value (2).
Please consider adding immediate effect of the variable changes inside the table.
Attached is the odt demonstrating the problem and discussing its possible use.
please take a look to the options in:
Menu/Tools/Options/LibreOffice writer/General - update
(In reply to comment #1)
these options have nothing to do with this request.
1. Checking/unchecking automatic updating of fields doesn't change the described behavior (I had it checked anyway).
2. The documentation says on this matter (https://help.libreoffice.org/Common/General_8):
> The following table lists the fields that are updated without regard to this checkbox.
> Condition Automatically updated fields
> Manually changing a variable: Conditional text, Hidden text, Hidden paragraph, Variables, DDE field
So, it implies that "Set variable" field does have immediate effect. But not in current table.
Please try to reproduce the steps above to see what I'm talking about.
Setting to UNCONFIRMED again.
TESTING on LO 184.108.40.206 + Ubuntu 12.04.3
(tentatively) Confirming Repro results per attachment 89934 [details].