Bug 60886 - Show Variable field shows no content in Page Header/Footer, Frames
Summary: Show Variable field shows no content in Page Header/Footer, Frames
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium major
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:4.1.0 target:4.0.2
Keywords: regression
: 61671 (view as bug list)
Depends on:
Blocks: mab4.0
  Show dependency treegraph
 
Reported: 2013-02-15 09:58 UTC by James Prabu
Modified: 2018-07-15 20:09 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Header does not show the ShowVariable (8.35 KB, application/vnd.oasis.opendocument.text)
2013-02-15 09:58 UTC, James Prabu
Details
New Sample (8.81 KB, application/vnd.oasis.opendocument.text)
2013-02-15 10:56 UTC, Rainer Bielefeld Retired
Details
Testcase using variables in different containers (10.79 KB, application/vnd.oasis.opendocument.text)
2013-02-21 07:34 UTC, frozen
Details
Testcase I used for my version tests (17.25 KB, application/vnd.oasis.opendocument.text)
2013-03-01 21:38 UTC, Rainer Bielefeld Retired
Details
My second testcase with variables intermingled in different containers (12.24 KB, application/vnd.oasis.opendocument.text)
2013-03-08 21:20 UTC, frozen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Prabu 2013-02-15 09:58:24 UTC
Created attachment 74863 [details]
Header does not show the ShowVariable

Hi,

In LibreOffice 4.0.0.3, Header does not show any value.

Set Variable shows the value in page, but Show variable does not show any value in header.

Steps to reproduce the issue

1. Open the attached file(V4.odt) in LibreOffice 4.0.0.3.
2. See the header, it shows empty header.
3. Again open the V4.odt in previous versons(3.6 and older)
3. See the header, you can see some value in header.

Thank you,

Best Regards, 
James
Comment 1 Rainer Bielefeld Retired 2013-02-15 10:20:55 UTC
[Reproducible] with Server Installation of "LibO  4.0.0.3   -  GERMAN UI / German Locale  [Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89)]"  {tinderbox: @6, pull time 2013-01-31 11:30(?)} on German WIN7 Home Premium (64bit) with separate  new User Profile.

It's a little more sophisticated! Generally in LibO Writer a Variable of Type "Show Variable" only will show contents if it is used _behind_ the definition with Variable Type "Set Variable". And that's exactly what we see here, the Variable in Page Header is before definition in page body and so shown empty.

*But*
Somehow older LibO versions did a trick so that they were able to show contents in "Show Variable" used in header although "Set Variable" defines the variable contents behind that first use in header.

@James:
Thank you for your attention!
Comment 2 Rainer Bielefeld Retired 2013-02-15 10:56:57 UTC
Created attachment 74865 [details]
New Sample

Already [Reproducible]: with Server-installation of Master " 3.7.0.0.alpha0+  – ENGLISH UI [Build ID: f2e622]" {tinderbox: Win-x86@16, pull time 2012-10-06 09:31:39} on German WIN7 Home Premium (64bit) UserInstallation=$SYSUSERCONFIG/LOdev/3

Still worked fine with server-installation of Master "3.7.0alpha0+  – WIN7 Home Premium (64bit) ENGLISH UI [Build ID: b255de8]" (tinderbox: Win-x86@6-fast, pull time 2012-06-05 23:16:58)

It's a little different to my first thought, it seems that "Whow Variable" does not show contents in Page Header / Footer at all, as my nw sample shows. I failed to find a workaround.
Comment 3 Rainer Bielefeld Retired 2013-02-15 10:57:50 UTC
I doubt that so many people do use show variable in header, so not a blocker, but might be MAJOR, especially because currently no Workaround is known.

@Michael:
What do you think, any ideas?
Comment 4 frozen 2013-02-21 07:34:32 UTC
Created attachment 75229 [details]
Testcase using variables in different containers

Variables are also not displaying inside frames, I was also unable to create variable definition fields inside tables, but that might be intentional.
I am going to try this in my Gentoo install, and report back if it should work there.

LibO version: 4.0.0.3
OS: Windows 8 Pro 64-bit
Comment 5 Rainer Bielefeld Retired 2013-03-01 19:17:24 UTC
It seems that causes dataloss, Documents edited with 4.0.0.3 will no longer show variables in 3.6.5, too. More research during the evening
Comment 6 Michael Stahl (allotropia) 2013-03-01 21:14:39 UTC
i've played with it and the weird thing is, i can't reproduce the
problem on Linux.  in the second attachment, the 2 variable-get fields
in the frame display empty, but that is not a regression and happens
in every LO/OOo version tested back to OOo 3.0.1.

all other fields work fine.

in my Windows master build however, the variable-get fields
in header/footer are indeed empty.

this is very weird because none of this is platform specific.
Comment 7 Rainer Bielefeld Retired 2013-03-01 21:36:17 UTC
(In reply to comment #5)
Seems I mde a mistake, I can't reproduce the dataloss problem.

Still [Reproducible] with "LibO  4.0.1.2 rc   -  German UI / German Locale  [Build ID: 2c0c17a6e4bee0ee28131ea4bdc47edc700d659)]"  {tinderbox: @6, pull time  2013-02-28 08:53(?)} on German WIN7 Home Premium (64bit) 

Already [Reproducible] with unzipped  installation of  "LOdev  4.0.0.0.alpha1+   -  ENGLISH UI / German Locale  [Build ID: af60316514f3ae3d4c475819bf86f2af837171e)]"  {tinderbox: Win-x86@6, pull time 2012-11-23 22:10:31} on German WIN7 Home Premium (64bit) with own separate User Profile 

Was still ok with 
* server-installation of Master "3.7.0alpha0+  – WIN7 Home Premium (64bit) ENGLISH UI [Build ID: b255de8]" (tinderbox: Win-x86@6-fast, pull time 2012-06-05 23:16:58)

Can we get a bibisect?
Comment 8 Rainer Bielefeld Retired 2013-03-01 21:38:07 UTC
Created attachment 75759 [details]
Testcase I used for my version tests
Comment 9 Rainer Bielefeld Retired 2013-03-01 22:42:15 UTC
"testcase.odt" 2013-02-21 07:34 UTC by frozen is a little worrying because of the multi definition of variables and also because it shows set and show variable in the same section, what seems to work fine.

My 2 Testcase using variables in different containers" does not show some variables in frames. And most (lots of hundreds) of my documents suffer from "Show variable not shown in sections"

It seems there are some additional dependencies, modifying the " Testcase I used for my version tests" shows some strange effects. I created an additional document with 3.6.5, where in 4.0 suddenly the "show Varible" works in Frame and section, but not in header footer.
Comment 10 Michael Stahl (allotropia) 2013-03-02 00:58:13 UTC
was from a faulty STL conversion/cleanup, fixed on master.

the pre-existing problem with the fields in the frame still exists,
please file separate bug for that.
Comment 11 Not Assigned 2013-03-02 01:00:07 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9ca5383abfb7f2f785e9f2e2d5b2565b9a60bbab

fdo#60886: _SetGetExpFlds: use the custom operator<



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2013-03-04 09:57:03 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=aa1d118f9474ca0be4b1fcdc2749dd4020e05ffc&h=libreoffice-4-0

fdo#60886: _SetGetExpFlds: use the custom operator<


It will be available in LibreOffice 4.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 13 frozen 2013-03-08 21:20:03 UTC
Created attachment 76192 [details]
My second testcase with variables intermingled in different containers

I can confirm it works using commit be5587ce0c13901acffe664d71bf22f0cb60918a on Gentoo Linux/amd64.

It seems odd to me that variable definitions follow document order, since header and footer are defined before the body in XML, but I guess the way it works now is more intuitive.
Also, opening my previous testcase upload (#75229 from 4.0.0.3), in this build displays variables in headers/footers automatically, but requires an "Update All" to display variables in the frame, but I think that is ok.
The next time I will have to boot into Windows, I'll try the nighly build and start a new bug if frames still cause a problem.

So thank you very much for the fix :-)
Comment 14 frefretmp-bugzilla 2013-03-18 22:54:53 UTC
*** Bug 61671 has been marked as a duplicate of this bug. ***