Bug 101803 - Loss of hide with condition for a section when having a (second?) section at the end of the document
Summary: Loss of hide with condition for a section when having a (second?) section at ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Section
  Show dependency treegraph
 
Reported: 2016-08-30 15:52 UTC by riesslibo
Modified: 2023-04-23 18:46 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Template for reproducing with described steps (24.23 KB, application/vnd.oasis.opendocument.text-template)
2016-08-30 15:53 UTC, riesslibo
Details
result Document when having added a second section and the lost condition of the first section with hide condition (24.06 KB, application/vnd.oasis.opendocument.text)
2016-08-30 15:54 UTC, riesslibo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description riesslibo 2016-08-30 15:52:16 UTC
Version: 5.1.5.2
Build ID: 7a864d8825610a8c07cfc3bc01dd4fce6a9447e5
CPU Threads: 8; OS Version: Windows 6.1; UI Render: default; 
Locale: de-DE (de_DE); Calc: single

Problem statement / Description:

Having a document with a user field for managing a hidden section and a consecutive section (for the purpose of write protection) after inserting the second section it will loss the condition statement with the user field when changing the value of the user field

Steps to reproduce:

1. take the example document example4lostConditionSection.ott (it is a template for multiple reproducemnt of the bug)

2. open a document of the template (double click on it)

3. save as result.odt (see that there is a paragraph written in red)

4. verify in menu fields - variables - userfield there is one defined with the name showSection and the value 1  (the variable is positioned in the first line of teh document)

5. change the value of the userfield showSection to 0 and verify, that the red written paragraph is gone (it is a section with a hide with condition showSection == 0)

6. Change the value of the userfield to 1, the paragraph written in red is shown
(Please do not use the navigator in the sidebar to look after the sections, it seems that there is a dependency on it)

7. now select the whole last paragraph and define a second section with write protection on it and klick ok for it, save the document

8. now change the value of the showSection again, no hide Action is performed any longer

9. if you now use the navigator and have a look at the section with the hide with condition, you see that the condition statement changed to just "0", the variable name and the condition == is gone (see as result the attached document resultLostCondition.odt)

Expected behaviour
The mechanism of hiding the section is untouched and working still correct when inserting another section in the document
Comment 1 riesslibo 2016-08-30 15:53:14 UTC
Created attachment 127083 [details]
Template for reproducing with described steps
Comment 2 riesslibo 2016-08-30 15:54:42 UTC
Created attachment 127084 [details]
result Document when having added a second section and the lost condition of the first section with hide condition
Comment 3 Cor Nouws 2016-09-03 10:59:08 UTC
Hi Lothar,

Thanks - can confirm the problem. Already in 3.6.7.2 / 3.3.0.4, but those are not so reliable in hiding the section with your step 5...

Do you know a version where it worked fine?

I tried with a paragraph in between the sections and some more variations, section without protection. Turns out that when there is a (empty) paragraph after place where you insert the section, that it works fine.
Can you pls check that?
Comment 4 QA Administrators 2017-12-21 03:37:13 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2019-12-22 03:28:46 UTC Comment hidden (obsolete)
Comment 6 Gabriele Ponzo 2021-04-14 08:04:19 UTC
I can confirm that the bug is still present in version 7.1.2.2.
Moreover it behaves the same wrong way regardless of setting a condition or not: as far as a section becomes hidden, for whatever reason, it won't be visible anymore in any way.
Should I open a different bug for this?


Version: 7.1.2.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: it-IT (it_IT.UTF-8); UI: en-GB
Ubuntu package version: 1:7.1.2~rc2-0ubuntu0.20.04.1~lo3
Calc: threaded
Comment 7 Aron Budea 2021-04-26 03:04:05 UTC
(In reply to Gabriele Ponzo from comment #6)
> Moreover it behaves the same wrong way regardless of setting a condition or
> not: as far as a section becomes hidden, for whatever reason, it won't be
> visible anymore in any way.
Let's add the reference to this other bug here: bug 140863.