Description: The Table of Contents in a document includes entries from hidden sections. Steps to Reproduce: 1. Create a document, add some sections containig "Title" styled entries to be included in TOC 2. Hide some of those sections 3. Update the TOC Actual Results: All the "Title" styled entries are included in the TOC. Expected Results: Only the entries in the visible sections should be included in the TOC, as happened in LOWriter up to version 7. Reproducible: Always User Profile Reset: No Additional Info: Version: 24.8.2.1 (X86_64) / LibreOffice Community Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13 CPU threads: 8; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win Locale: it-IT (it_IT); UI: it-IT Calc: threaded
Please attach a sample file, reduce the size as much as possible without private information.
Created attachment 197052 [details] Sample with TOC and sections to show/hide I put buttons on the front page that launch the code to show/hide all sections and update the TOC. In version 7.6 the TOC is updated, hiding the titles in hidden sections, in version 24.8 also the hidden titles are listed in the TOC. Doing it manually gives the same result.
*** This bug has been marked as a duplicate of bug 162195 ***