Issue 82544 - Variable shown in header seems to lose the connection to the defined variable
Summary: Variable shown in header seems to lose the connection to the defined variable
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 2.3
Hardware: All All
: P3 Trivial with 19 votes (vote)
Target Milestone: ---
Assignee: eric.savary
QA Contact: issues@sw
URL:
Keywords: oooqa, regression
: 82780 84096 85191 87639 89961 (view as issue list)
Depends on:
Blocks:
 
Reported: 2007-10-12 09:19 UTC by claudiadzm
Modified: 2013-08-07 14:43 UTC (History)
4 users (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 claudiadzm 2007-10-12 09:19:45 UTC
Proceed like this:
Define a variable somewhere in a writer-Dokument.
Show this variable in the header of a page -> seems to be ok.
After re-open the document, the header shows "0" and not the content of the
variable while the variable still has his value
Home, that can be understood.
Claudia
Comment 1 michael.ruess 2007-10-12 10:29:11 UTC
Reassigned to ES.
Comment 2 Raphael Bircher 2007-10-12 20:25:22 UTC
Set me to CC
Set keywords

I will have a look this night on this issue

Thanks for reporting

Raphael
Comment 3 leonbloy 2007-10-13 15:10:40 UTC
I have been badly hit by this bug, also, after migrating to writer 2.3.

When a file is opened, if a "show variable" field is found in the styles.xml,
Writer changes the original

<text:variable-get text:name="xx">

adding a style (which appears defined before as numeric, with one digit minimum) 

<text:variable-get text:name="xx" style:data-style-name="N0">

Some more info and an example is given here:
http://www.oooforum.org/forum/viewtopic.phtml?t=63858
Comment 4 raicrag 2007-11-13 09:29:19 UTC
*** Issue 82544 has been confirmed by votes. ***
Comment 5 eric.savary 2007-11-13 17:00:54 UTC
@OS:
- new Writer document
- on page 1 insert a variable field: name="x", value="test", format="Text"
- insert a header
- insert the variable ("Show variable") in the header
- insert a page break
-> on page 1, header shows "" (nothing) -> ok
-> on page 2, header shows "test" -> ok
- save
- reload
-> the header shows everywhere "0"
Comment 6 andreschnabel 2007-11-24 10:11:27 UTC
this has also been reported at issue 82780 - see an example file there

as this is a regression (worked in OOo 2.2) , please reconsider the target.
Comment 7 andreschnabel 2007-11-24 10:12:59 UTC
*** Issue 82780 has been marked as a duplicate of this issue. ***
Comment 8 vanfelsing 2007-11-29 11:16:17 UTC
Please review target milestone!
Comment 9 andreschnabel 2007-11-30 13:14:43 UTC
*** Issue 84096 has been marked as a duplicate of this issue. ***
Comment 10 dysmas 2007-12-01 12:16:14 UTC
For those (like me) who cannot wait for a fix of this bug, there is a strange 
workaround :

Add a "define variable" in the header (or footer) for the variable which is 
shown in the header. You can give whatever value you want, it will not be used. 
Nothing has changed, you still have the "0" displayed. 
Close and reopen the document. 
Now the variable is displayed normally as it should. 
Comment 11 basd 2007-12-20 01:45:11 UTC
I appreciate the workaround, although I had a little trouble understanding it. 
Here's is how I did it:  Use 'set variable' to insert the same variable in a
header >before< the 'input field' that is used in the document to set the
variable's value.  (I used a value of '-' and set it invisible.)  Then, the
'show variable' in the headers/footers works fine.
Comment 12 eric.savary 2008-01-21 13:24:54 UTC
*** Issue 85191 has been marked as a duplicate of this issue. ***
Comment 13 raicrag 2008-04-01 15:25:47 UTC
Please, can the target milestone be reconsidered?
This is a very important functionality in professional use of OOo.
Comment 14 Oliver Specht 2008-04-01 17:02:50 UTC
raicrag: There is no nearer target than OOo 3.0
Comment 15 dysmas 2008-04-01 17:12:17 UTC
Hello, happy that you started this issue. Regressions are such an annoying 
situation, when you have files which were fine last year and no longer work 
properly. Thanks for your work. 
Comment 16 claudiadzm 2008-05-08 08:25:39 UTC
Seems, as if the issue does not work in my situation:
We got a new "corporate identity" and I've to create a template for
correspondency with the following defaults:
The first page is not the same than the following pages, so I've to use 2 page
styles.
If a letter has more than 1 page, on the following pages have to appear
automatically several things.
Among them the subject of the letter.
I thought to organize that with a variable and an input field, so that the user
who is opening a new document based on the template receives the
input-field-dialog where he can write the subject. As the input-field is linked
to the variable the content of the input-field goes automatically to the
variable and can be shown everywhere in the document where it is needed.
But as the following pages are only generated when the content is more than one
page, all defaults for the following pages have to be placed in a header or
footer to be automatically repeated.
And that's the problem:
I found no way to show the content of the variable form the first page in the
header of the following pages also I defined the varible a second time within
the header.
Any idea?
thanks, Claudia
Comment 17 elliot2extreme 2008-05-15 16:39:07 UTC
I have also a workaround for the problem reported by Claudia. The Solution is 
to define a new variable on the second header and init it with a blank. After 
that assign the old variable to the new one and then set the value of the old 
variable to one blank. Now you can reassign the value of the new variable to 
the old variable and then everything works fine.

Greetings Markus
Comment 18 claudiadzm 2008-05-16 06:25:55 UTC
Thanks for your workaround. I also find one:
Instead of a variable I use a user-field. This user-field I set into the header 
of the second page without content.
On the first page I set an input-field asigned to the user-field.
Nevertheless I hope for a definitve solution of the problem.
Greetings, Claudia
Comment 19 Oliver Specht 2008-05-27 12:55:32 UTC
*** Issue 89961 has been marked as a duplicate of this issue. ***
Comment 20 Oliver Specht 2008-05-27 13:38:06 UTC
Fixed in cws os116 in 
sw/inc/expfld.hxx
sw/source/core/fields/expfld.cxx
sw/source/core/unocore/unofield.cxx
Comment 21 Oliver Specht 2008-06-12 08:38:03 UTC
Reassigned for verification
Comment 22 eric.savary 2008-06-18 23:40:56 UTC
Vertified in CWS os116
Comment 23 Oliver Specht 2008-07-07 09:44:18 UTC
*** Issue 87639 has been marked as a duplicate of this issue. ***
Comment 24 turtledisaster 2008-07-07 15:49:10 UTC
In case anyone wants another workaround, the following works for me in 2.3.0:
Open the affected field for editing (double click or Edit->Fields).
Edit the content, if necessary.
Click the green arrow 'Apply' button.
Now click the Cancel button *NOT* OK.
Job Done

Bob
Comment 25 Rainer Bielefeld 2008-08-12 11:55:07 UTC
Unfortunately I am not able to understand EIS, and so I do not know whether the
bugfix is integrated. 

I only see, that the problem still exists with "Ooo-dev 3.0.0 Beta Multilingual
version German UI WIN XP: [300m29 (Build9339)]" for documents that have been
used with 2.3.
Comment 26 andreschnabel 2008-08-12 18:21:34 UTC
according to EIS, the fix has been integrated.

reading the description (from leonbloy Sat Oct 13 14:10:40 +0000 2007), I'd
expect files that were saved with OOo 2.3 and up to show the problem even in OOo
3, as they were broken during save operation.

Works for files created / saved with OOo 3 (OOO300_m1) -> closing


@rainerbielefeld:
if you open a broken file with 3.0 , remove and insert the "display variable"
again, this should fix the file. If not, please reopen the issue