Description: In the process of testing some forms I previously built in LibreOffice 7.4.3.2, using LibreOffice 24.8.5.2 I have noticed that there seems to be a difference in the way Tables containing conditional sections are handled. In 7.4, the table row would shrink when a conditional section was hidden. In 24.8 the row does not shrink and none of the table size settings seem to remedy the problem. I need to upgrade from 7.4 but don’t want to have to redesign hundreds of templates that were already built in 7.4 because of this difference. I will attempt to add images for illustration purposes figure1 - The table, with both conditional sections showing figure2 - LibreOffice 7.4 with section 1 (green) hidden figure3 - LibreOffice 7.4 with section 2 (blue) hidden figure4 - LibreOffice 7.4 with both conditional sections hidden figure5 - LibreOffice 24.8 with section 1 (green) hidden figure6 - LibreOffice 24.8 with section 2 (blue) hidden figure7 - LibreOffice 24.8 with both conditional sections hidden Steps to Reproduce: 1) Insert a table in LibreOffice 24.8.5.2 (1 row, one cell is fine for testing purposes). Enable borders for ease of viewing the table row size in relation to the sections and text 2) Insert 2 hidden user variable fields named SectionOne.Indicator and SectionTwo.Indicator. Set the example value in these fields to "N" 3) Insert a conditional section into a cell with text identifying it as Conditional section 1. Hide condition: SectionOne.Indicator EQ "Y" 4)Add some hardcoded text (not in a section) in the same table cell 5) Add a second conditional section in the same table cell with text identifying it as Conditional section 2. Hide condition: SectionTwo.Indicator EQ "Y" 6) After sections and text have been set up, open the user fields and change the value for the first indicator field from "N" to "Y". Observe the outcome on the ODT 7) Change the value for the second indicator field from "N" to "Y" and observe the outcome in the ODT Actual Results: Sections show/hide appropriately based on the conditional logic. White space suppresses between the text when the sections hide, but table row does not shrink when sections are hidden. Expected Results: In version 7.4 the table row would shrink when sections were hidden Reproducible: Always User Profile Reset: No Additional Info: no information found on how to address this behavior change
was unable to add the screenshots I referenced as figures 1-7 in the description.
(In reply to Adam from comment #1) > was unable to add the screenshots I referenced as figures 1-7 in the > description. Notice the section: Attachments Add an attachment
Created attachment 200363 [details] image for illustration purposes
Could you provide us more straight forwards steps ? Like Insert -> Field -> More fields -> Variables -> User fields ... I never used these options, it took me some time to figure out how to follow some of the steps. I think I reproduced the issue in the sense that the row has a minimal row height when it should not I made 4 lines in a row, selected 2, added a section with Insert -> Section, added a name in new section, checked "hide", with condition "SectionOne.Indicator EQ "Y"" and insert When I inserted, the text of the two lines disappear, but the row height is the same. Adding 4 lines in the table row and then deleting them shows that the row height has a minimum (the row height is 4 lines instead of the 2)
Created attachment 200373 [details] odt with conditional sections in table This is the original ODT created in LibreOffice 7.4 where the table row shrinks and grows as expected. When this same ODT is opened in LO 24.8.5.2 the sections still show/hide as expected but the table row DOES NOT shrink if sections are hidden and this is the problem.
(In reply to opp from comment #4) > Could you provide us more straight forwards steps ? > Like Insert -> Field -> More fields -> Variables -> User fields ... > > I never used these options, it took me some time to figure out how to follow > some of the steps. > I think I reproduced the issue in the sense that the row has a minimal row > height when it should not > > I made 4 lines in a row, selected 2, added a section with Insert -> Section, > added a name in new section, checked "hide", with condition > "SectionOne.Indicator EQ "Y"" and insert > > When I inserted, the text of the two lines disappear, but the row height is > the same. > Adding 4 lines in the table row and then deleting them shows that the row > height has a minimum (the row height is 4 lines instead of the 2) I will write up more straight forward steps. In the meantime, I have attached the original odt created in LibreOffice 7.4
Confirm with Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 492c94abe05e5ac213475cdd85f158b7a462f824 CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: x11 Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US Calc: threaded but not with Version: 7.3.7.2 / LibreOffice Community
This seems to have begun at the below commit in bibisect repository/OS linux-64-24.8. Adding Cc: to Mike Kaganski ; Could you possibly take a look at this one? Thanks 5fe97a8b73e6d9a40363866cf741563c11166b66 is the first bad commit commit 5fe97a8b73e6d9a40363866cf741563c11166b66 Author: Jenkins Build User <tdf@maggie.tdf> Date: Wed Feb 14 22:01:24 2024 +0100 source 0c96119895b347f8eb5bb89f393351bd3c02b9f1 163151: tdf#159565 prerequisite: make hidden sections have zero-height frames | https://gerrit.libreoffice.org/c/core/+/163151
(In reply to opp from comment #4) > Could you provide us more straight forwards steps ? > Like Insert -> Field -> More fields -> Variables -> User fields ... > > I never used these options, it took me some time to figure out how to follow > some of the steps. > I think I reproduced the issue in the sense that the row has a minimal row > height when it should not > > I made 4 lines in a row, selected 2, added a section with Insert -> Section, > added a name in new section, checked "hide", with condition > "SectionOne.Indicator EQ "Y"" and insert > > When I inserted, the text of the two lines disappear, but the row height is > the same. > Adding 4 lines in the table row and then deleting them shows that the row > height has a minimum (the row height is 4 lines instead of the 2) My apologies for the confusion. Here are updated steps: These steps are performed using LibreOffice 7.4.3.2 1. Insert→Field→More Fields→ Variables. In the “Type” column select “User Field”. Enter “SectionOne.Indicator” for the name, “N” for the “Value”, and check the “Invisible” box. Click the green check mark, and then the insert button. 2. Repeat the step above to insert a second field with “SectionTwo.Indicator” for the name, “N” for the “Value”, and check the “Invisible” box. Click the green check mark, and then the insert button. 3. Below these two hidden fields you just placed we want to insert a table. Navigate to Table → Insert Table→ One row for the table is most efficient for our purposes here. My table had 2 columns and I just sized column 1 at somewhere in the range of .4 inches. Our work will be in column2. (It may be helpful to turn on table borders when you create this table so you can more easily see how the row reacts when the sections show/hide) 4. Place your cursor in the right hand column of the table you just inserted and hit the enter key 3 times. (this makes it easier when inserting the sections. 5. Place your cursor on top line of the 3 lines you just created in the column, and Insert → Section. Name it Section 1. 6. Place your cursor in the “Section 1” you just created and type the text “Section 1”. I also like to change the background color of the section to make it easier to see when testing. To do this got to Format → Sections → choose “Section 1” from the list. Then click “Options”, select the “Background” tab, and choose a color of your choice. Click “OK” then “OK” again 7. Place your cursor on the line below “Section 1” and type the words “Static Text”. This text is helpful for seeing how the table reacts when the sections show/hide 8. Place your cursor on bottom line in the column, and Insert → Section. Name it Section 2. 9. Place your cursor in the “Section 2” you just created and type the text “Section 2”. I set the background color of this section to a different color that our first section. 10. Add the conditions to your sections you just created. To do this Select Format → Sections. Select Section 1, check the “Hide” box and in the space after “with condition” enter “SectionOne.Indicator EQ "Y"”. Follow the same procedure for Section 2 and use the condition “SectionTwo.Indicator EQ "Y"”. 11. Save this odt. With the Variables, table, and sections in place we can now look at the behavior of the table when the sections are hidden. 1. Navigate to Insert→Field→More Fields→ Variables. Change the value for “SectionOne.Indicator” from “N” to “Y”. and note that “Section 1” hides as expected, text within the cell shifts up, and the table row shrinks. 2. Now do the same and change the value for SectionTwo.Indicator from “N” to “Y” and note that section 2 hides, the table shrinks, and all we see is our static text we did not place in a section. This is the behavior that is expected and I have hundreds of templates that rely on these tables shrinking to suppress white space. 3. Exit the odt without saving at this point. Now we need to test the table behavior with our existing odt, using LibreOffice version 24.8.5.2. 1. Open the ODT and Navigate to Insert→Field→More Fields→ Variables. Change the value for “SectionOne.Indicator” from “N” to “Y”. and note that “Section 1” hides as expected, text within the cell shifts up, but the table row does not shrink. 2. Now do the same and change the value for “SectionTwo.Indicator” from “N” to “Y” and note that section 2 hides and all we see is our static text we did not place in a section. However the table is still reserving the space for the two hidden sections and DID NOT shrink to fit. This behavior is causing problems in all of my previously created templates that utilize the conditional section functionality within table rows. I have tried changing the settings at Table → Size → Row Height using “0.00” and fit to size. I have also tried setting it with Table → Size → Minimal Row Height. None of the table row sizing option in 24.8.5.2 have worked for me. The table row still reserves all of the space for three lines, even when the conditional sections are hidden.