Issue 99121 - user fields/formulas autonomously change their values
Summary: user fields/formulas autonomously change their values
Alias: None
Product: Writer
Classification: Application
Component: viewing (show other issues)
Version: OOo 3.0
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2009-02-11 13:41 UTC by peterdaum
Modified: 2017-05-20 11:17 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

Sample data (10.57 KB, application/vnd.oasis.opendocument.text)
2009-02-11 13:43 UTC, peterdaum
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description peterdaum 2009-02-11 13:41:36 UTC
I tried to print a sheet of labels with consecutive ranges of numbers.
After several attempts to do this in a fancier way (that always failedin even
stranger ways), I came up with the following (which nearly worked ;):

- I defined 2 fields: s=2021 and n=40
- 1st label contains 2 formulas: "s" and "s+n-1" (=> values: "2021" "2060")
- following labels: "s+n*1", "s+(n-1)+(n*1)", "s+n*2", "s+(n-1)+(n*2)" ...

When I print the document (and upon several other operations), the 1st label
suddenly is displayed and printed as "21" "2061"
when I look into the corresponding dialog, it still shows s=2021 and n=40
(so the subject line is not entirely correct: what changes, is only the
displayed values)
Comment 1 peterdaum 2009-02-11 13:43:40 UTC
Created attachment 60094 [details]
Sample data
Comment 2 michael.ruess 2009-02-12 14:31:06 UTC
MRU->OS: in the attached document two User field variables are available (s=2021
and n=40). in the first frame, the User field formula just showing value of s
will display a wrong value after updating the fields using F9 or printing.
Comment 3 Oliver Specht 2009-09-30 09:32:08 UTC
Target changed to 3.x
Comment 4 pjentsch 2011-01-10 13:21:07 UTC
We're seeing this too in our documents. It only happens in formulas that use
userfields which are not referenced in the document. The problem can be
circumvented by adding a hidden section at the end of the document that contains
direct references (by using Insert->Fields>Other...>Variables>UserField, not in
a formula) to all userfields in the document which are used in forumlas.

It seems the internal value is only initialized a first use and this is not
properly considered when calculating formulas in writer documents. 

Comment 5 Marcus 2017-05-20 11:17:35 UTC
Reset assigne to the default "".