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: 2025-12-17 03:12 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
Comment 10 QA Administrators 2025-12-17 03:12:33 UTC
Dear Michael Fiedler,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug