Issue 51960 - Variable fields are not displayed correctly when 'show' is placed on the first paragraph
Summary: Variable fields are not displayed correctly when 'show' is placed on the firs...
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: OOo 2.0 Beta
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-14 14:05 UTC by cxmcxm
Modified: 2017-05-20 11:22 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description cxmcxm 2005-07-14 14:05:51 UTC
Help->About gives version 1.9.113

Variables are not displayed correctly when 'set' and 'show' are split between
header and body.

Reproducible:
Create an empty document and enable header.
Click in the header.
Ctrl-F2 to show Fields doalog.
Click on the 'Variables' tab of the dialog.
Click Type 'Set Variable', Format 'Text'
Enter 'foo' for Name and 'fooval' for Value.
Click Insert.

Repeat to create a 'set' for variable 'bar' in the header.

Click on the body of the document.
In the Fields dialog, click Type 'Show variable', Selection 'foo', click Insert.

A field called foo is inserted but the value is blank. Expected the value to be
as set in the header.

Repeat for bar, the value is also blank.

Additional info:
It's possible to set a third variable in the body, and after that in the
document it is once more possible to show the values of the variables that were
set in the header. If the 'show's are deleted then there comes a point where all
the 'show's of the variables set in the header become blank suddenly.

It's also possible to set variables in the body of the document, but 'show' in
the header does not work, or may work only for the first instance of 'show'.

Background:
I have been trying to create a document template that uses variables to allow
setting document title, number, issue etc. in one place only. The behaviour of
the variables is thwarting this. I have done a fair bit of experimentation but
not found a working combination of set and show that spans the header and body.
Comment 1 michael.ruess 2005-07-14 14:10:42 UTC
Reassigned to ES.
Comment 2 eric.savary 2005-08-01 07:53:32 UTC
Your description referes to 2 different problems.

1) a known limitation: when you insert a Show varible field at the very first
paragraph of the document, the Set variable, placed in the header cannot be read.

2) "It's also possible to set variables in the body of the document, but 'show' in
the header does not work, or may work only for the first instance of 'show'."

Varables in a document work like variables in a program: they can only be used
*after* the point they have been defined. So if you Set a variable in the body
of page 1, it won't Show in header of page 1 but starting with the header of page 2.
Example:
-------- Header Page 1 Start -----------------
Show Foo: won't show
-------- Header Page 1 Stop -----------------

Show Foo: won't show

*Set Foo

Show Foo: will show

-------- Header Page 2 Start -----------------
Show Foo: will show
-------- Header Page 2 Stop -----------------

Comment 3 eric.savary 2005-08-01 07:55:47 UTC
ES->OS: can we fix 1)?
Comment 4 cxmcxm 2005-08-01 09:04:44 UTC
Thanks for the explanation.

Is there a practical workaround, for example having a 'page -1' which contains
variable settings but isn't printed? What is the best way to use variables,
given that they will appear in headers/footers and body?

Although it's logical to have definition before exposition, would it be more
useful to have properties applied to the 'set', such that the value could be
effective:

a) globally (which would allow use before definition)
b) after 'this page'
c) from 'this page' onwards

depending on the choice of the author?

For most of my intended use I would use (a), eg. a single global definition for
a document number, issue, date, author, security classification, etc.
Comment 5 Marcus 2017-05-20 11:22:39 UTC
Reset assigne to the default "issues@openoffice.apache.org".