Bug 95373 - Condition for hidden sections is not dynamically updated (at least using the PAGE variable)
Summary: Condition for hidden sections is not dynamically updated (at least using the ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: Other All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Section
  Show dependency treegraph
 
Reported: 2015-10-27 22:26 UTC by Michael Fiedler
Modified: 2023-12-17 07:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Fiedler 2015-10-27 22:26:36 UTC
Steps to reproduce:

1. Open a new document
2. Insert two paragraphs of text and mark the first one
3. Open dialog at Insert > Section...
4. Mark "Hide" and use "page == 2" ("page" holds the total number of pages)  as condition
5. Click "Insert"
6. Create a page break after the second paragraph, e. g. using CTRL + ENTER (the total page count is now 2)


Expected result:

The section is now hidden.


Actual result:

The section is still there.


Environment:

Debian Linux 7.9 (wheezy) x86
LibreOffice 3.5.4.2 (from Debian)
LibreOffice 4.4.4.3 (from libreoffice.org)
LibreOffice 5.0.2 (from libbreoffice.org)
Comment 1 Jacques Guilleron 2015-10-28 09:18:34 UTC
Hi Michael,

Changing "page == 2" into "page = 2" seems to work.
Comment 2 Michael Fiedler 2015-10-28 12:57:57 UTC
The section is hidden immediately when using "page = 2".  However, it is always hidden, even if the total number of pages is 1, 3, 4, ... So "page = 2" is probably an assignment and not a comparison.  The == operator is also used in the LibreOffice documentation [1].

  [1] https://help.libreoffice.org/Writer/Hiding_Text
Comment 3 Michael Fiedler 2015-10-28 13:07:32 UTC
Moreover, the comparison with e. g. "page == 1" works sometimes, but sometimes not.  I use it in some of my templates:

When opening template [1] and inserting a page break, nothing happens.  But when I trigger the PDF exporter, the hidden section (page numbers in the footer) appears.

  [1] http://users.simified.de/~micha/openoffice-vorlagen/Standard/Standard_Liberation_Sans.ott

When opening template [2] and inserting a page break, it immediately works as expected (the page numbering in the footer appears).

  [2] http://users.simified.de/~micha/openoffice-vorlagen/Korrespondenz/Brief_Arial.ott
Comment 4 Buovjaga 2015-11-08 17:34:37 UTC
I take comment 1 as confirmation, because Jacques must have noticed == not working. NEW.
Comment 5 QA Administrators 2017-01-03 19:37:03 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2019-12-03 14:50:43 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2022-01-12 03:42:14 UTC Comment hidden (obsolete)
Comment 8 Mike Kaganski 2023-06-01 09:04:01 UTC
It indeed works (fails to work) as explained in comment 0; but Tools->Update->Update All fixes it, so it is a matter of dynamic updates for the condition.
Comment 9 sdc.blanco 2023-12-17 07:36:21 UTC
Changing summary based on comment 8