Created attachment 189218 [details] test document for delete chapter in Navigator The attached document has three lines. ----- Heading Level 1 (with outline open) Random text Heading Level 2 (with outline folded) ------ Test 1: 1. Place cursor in ”Heading Level 2 – folded” 2. Use Navigator, right-click on ”Heading Level 1 – open”, choose ”Delete Heading” Actual: Dialog box appears, with ”You are trying to delete folded (hidden) content.” Expected: Either heading and text is deleted or request a confirm before deleting. Test 2: 1. Fold outline of ”Heading Level 1” 2. Place cursor in Heading Level 2. 3. Use Navigator, right-click on ”Heading Level 1 – open”, choose ”Delete Heading” Actual: Nothing happens. Expected: In light of test 1, I now would expect to get the dialog box that appeared in test 1. Test 3: 1. Use Navigator, right-click on "Heading Level 2 - folded", choose "Delete Heading" Actual and expected: Get error message about trying to delete hidden content I think there is one more variation (that I cannot always repeat) where I add a new heading, and the first time I get the error dialog, then I toggle the heading closed and open, and then it is deleted. Tested with: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 218a7650a5cf03f895bed19c68d6f02daec536e9 CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: da-DK (da_DK); UI: en-US Calc: CL threaded
(In reply to sdc.blanco from comment #0) > Test 1: > 1. Place cursor in ”Heading Level 2 – folded” > 2. Use Navigator, right-click on ”Heading Level 1 – open”, choose ”Delete > Heading” > > Actual: Dialog box appears, with ”You are trying to delete folded (hidden) > content.” Actual result: - No dialog box appears - If heading level 2 is folded in navigator, heading level 2 within sublevel (instructions) is deleted - If heading level 2 is open in navigator, sublevel "instructions" remains. Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: a4522ef5ce6a625054d83ec907aee07c156e94ed CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: en-US (de_DE); UI: en-US Calc: CL threaded
(In reply to Dieter from comment #1) Just to be sure. The issue here is outline folding, not whether headings are collapsed or expanded in Navigator. I do not think the issue is affected by whether headings are collapsed or expanded in Navigator. When I opened the attached document, I noticed that "Heading Level 2 - folded" was not "outline folded". Make sure it is folded. Then try the tests. When "Heading Level 2 - folded" was outline folded, then I reproduced both Test 1 and Test 2, now with a later version. Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 218a7650a5cf03f895bed19c68d6f02daec536e9 CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
(In reply to sdc.blanco from comment #2) > When I opened the attached document, I noticed that "Heading Level 2 - > folded" was not "outline folded". Make sure it is folded. Then try the > tests. Can you advise how to do it? I followed the instructions from https://help.libreoffice.org/latest/en-US/text/swriter/01/outlinecontent_visibility.html but Ctrl does nothing and there is no Outline Folding item in the context menu for headings in the Navigator. Arch Linux 64-bit, X11 Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 9eb419b0b0f019f5fbc48ff1a11977e8b041edee CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 2 October 2023
I reproduce the three tests in: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: e3c961e6a3917d95534652e0f982918cc1079015 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Jim, any change you could have a look at these special cases? (In reply to Buovjaga from comment #3) > Can you advise how to do it? I followed the instructions from > https://help.libreoffice.org/latest/en-US/text/swriter/01/ > outlinecontent_visibility.html but Ctrl does nothing and there is no Outline > Folding item in the context menu for headings in the Navigator. You don't get the right-hand-side arrow when hovering the titles? Is this setting on? Tool > Options > LO Writer > View > Show Outline-Folding Buttons
(In reply to Stéphane Guillou (stragu) from comment #4) > (In reply to Buovjaga from comment #3) > > Can you advise how to do it? I followed the instructions from > > https://help.libreoffice.org/latest/en-US/text/swriter/01/ > > outlinecontent_visibility.html but Ctrl does nothing and there is no Outline > > Folding item in the context menu for headings in the Navigator. > > You don't get the right-hand-side arrow when hovering the titles? > Is this setting on? Tool > Options > LO Writer > View > Show Outline-Folding > Buttons Ok, that was the missing step, I did not have it activated.
(In reply to sdc.blanco from comment #0) > > Test 1: > 1. Place cursor in ”Heading Level 2 – folded” > 2. Use Navigator, right-click on ”Heading Level 1 – open”, choose ”Delete > Heading” > > Actual: Dialog box appears, with ”You are trying to delete folded (hidden) > content.” > Expected: Either heading and text is deleted or request a confirm before > deleting. I repro this bug. > Test 2: > 1. Fold outline of ”Heading Level 1” > 2. Place cursor in Heading Level 2. > 3. Use Navigator, right-click on ”Heading Level 1 – open”, choose ”Delete > Heading” > > Actual: Nothing happens. > Expected: In light of test 1, I now would expect to get the dialog box that > appeared in test 1. After I set outline folding not to include sub levels I was able to repro this. I agree that the dialog box should be shown. > Test 3: > > 1. Use Navigator, right-click on "Heading Level 2 - folded", choose > "Delete Heading" > > Actual and expected: Get error message about trying to delete hidden content To repro this, I needed to first fold "Heading Level 2 - folded". Reading comment 2, I see you had clarified this. > I think there is one more variation (that I cannot always repeat) where I > add a new heading, and the first time I get the error dialog, then I toggle > the heading closed and open, and then it is deleted. I'll look into why Test 1 and 2 don't show the dialog box. Same happens when the "Instructions:" heading is folded. I wonder if this has always been the behavior or if something has changed that has caused this.
Here is a patch that deletes folded content without any message: https://gerrit.libreoffice.org/c/core/+/157667 I think this is probably the correct behavior when using the Navigator to delete headings.
Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ceceb574251d6ed3ce4da2fdcae398cb72488dfa tdf#156980 SwNavigator: Make headings delete even if they have It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Marking this as fixed. Please let me know if more attention is needed.