Bug 162195 - TOC in Master document include headings from hidden sections
Summary: TOC in Master document include headings from hidden sections
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.0.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2024-07-25 14:56 UTC by Olivier Hallot
Modified: 2024-07-27 23:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Master document (4.64 MB, application/vnd.oasis.opendocument.text-master)
2024-07-25 14:57 UTC, Olivier Hallot
Details
Chapter document (443.51 KB, application/vnd.oasis.opendocument.text)
2024-07-25 14:58 UTC, Olivier Hallot
Details
Chapter document (443.53 KB, application/vnd.oasis.opendocument.text)
2024-07-25 14:59 UTC, Olivier Hallot
Details
Sample with two section, one visible, one hidden. (13.23 KB, application/vnd.oasis.opendocument.text)
2024-07-25 18:46 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Hallot 2024-07-25 14:56:32 UTC
Description:
The Table of Contents in a master document includes entries from hidden sections in chapters.

Steps to Reproduce:
1.Place the attached master document and chapter document in a folder
2.Open the master document, update the TOC.
3.

Actual Results:
The TOC in master includes the entry "Copyright – I am supposed to be hidden on master TOC" just below the Preface entry. 

This section is hidden in master document because the section visibility is controlled by variable "book eq 1" in the caper "Preface"

The section is actualy invisible but the the Heading "Copyright – I am supposed to be hidden on master TOC" is brought to the master TOC.

Expected Results:
The headings in the hidden sections shall not be listed in the master TOC.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (pt_BR.UTF-8); UI: en-US
Calc: default
Comment 1 Olivier Hallot 2024-07-25 14:57:56 UTC
Created attachment 195502 [details]
Master document
Comment 2 Olivier Hallot 2024-07-25 14:58:15 UTC
Created attachment 195503 [details]
Chapter document
Comment 3 Olivier Hallot 2024-07-25 14:59:27 UTC
Created attachment 195504 [details]
Chapter document
Comment 4 m_a_riosv 2024-07-25 18:46:52 UTC
Created attachment 195519 [details]
Sample with two section, one visible, one hidden.

Seems it happens also with no master.

Reproducible
Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c60dd66d89dab2174aa71c26c653f68908c7ba78
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 5 B. Antonio Fernández 2024-07-26 16:28:49 UTC
Reproducible always

And also:
 When you insert the variable book (1) in the chapter document. to hidde the sectión 

The previous paragraph to the hidden section adquires the atributes of the first paragraph of the hidden section. No way to delete this format. 

Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded
Comment 6 B. Antonio Fernández 2024-07-27 23:17:57 UTC
Reproducible always

And also:
 When you insert the variable book (1) in the chapter document. to hidde the sectión 

The previous paragraph to the hidden section adquires the atributes of the first paragraph of the hidden section. No way to delete this format. 

Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded

____________________________________________________________

The bug is present in version 7.6.8.0 and in all versions 24

In version 7.6.7.2 and earlier, hidden section headers are not displayed in the index.