Bug 138934 - Hyperlink: Headings in "Target in document" window show numbered sublevels, regardless of settings in "Chapter Numbering"
Summary: Hyperlink: Headings in "Target in document" window show numbered sublevels, r...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:7.2.0
Depends on:
Blocks: Hyperlink-Dialog
  Show dependency treegraph
Reported: 2020-12-15 11:11 UTC by R. Green
Modified: 2021-03-03 02:43 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Writer file showing problem with hyperlinks to headings (119.96 KB, application/vnd.oasis.opendocument.text)
2020-12-15 11:11 UTC, R. Green
Insert -> Hyperlink... -> Document tab -> 'Target in Document' dialog -> 'Heading' section (113.30 KB, image/png)
2020-12-24 15:03 UTC, V Stuart Foote

Note You need to log in before you can comment on or make changes to this bug.
Description R. Green 2020-12-15 11:11:37 UTC
Created attachment 168189 [details]
Writer file showing problem with hyperlinks to headings

Version: (x64)
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

This issue complicates the creation of hyperlinks to headings in a document.

1. Open the attached document. Select any word, then click "Insert Hyperlink".
2. Select "Document", then "Target in document", and open the Headings section.

EXPECTED RESULT: The headings (in this case, Headings 1-3) should be titled exactly as they are in the document. The displayed sublevel numbers should match those specified in "Chapter Numbering > Numbering".

ACTUAL RESULT: The display is defaulting (in error) to showing ALL possible sub-level numbers (see "Chapter Numbering > Numbering").

NOTE: the bigger the document, the more confusing this display becomes: you may be faced with a hundred chapter headings, each one wrongly labelled! This makes searching for the correct heading difficult.
Comment 1 R. Green 2020-12-18 20:33:33 UTC
Another problem which needs to be fixed at the same time. The "Target in document" window does not remember the last user reize. It keeps resetting to the default size.
Comment 2 V Stuart Foote 2020-12-24 15:03:31 UTC
Created attachment 168466 [details]
Insert -> Hyperlink... -> Document tab -> 'Target in Document' dialog -> 'Heading' section
Comment 3 V Stuart Foote 2020-12-24 15:48:17 UTC
Reasonable, +1

It is a visual annoyance for sure, seems the targets should pick up the outline numbering/bullets.

@Jim, could the 'Target in Document' dialog categories be loaded with same content as the Navigator and Find Bar "modes"?  Or are the methods too different?


Comment 4 V Stuart Foote 2020-12-24 15:56:49 UTC
In a sense this is duplicate of bug 114567
Comment 5 Heiko Tietze 2021-01-11 05:26:48 UTC
"Chapter" is added because of the chapter numbering style, it's not the actual text. And if we add the text before the separator it might also needed for after.

If we omit the chapter number in the target list we have to implement it as tree. Otherwise it's very hard to find the right item.

Let's treat it as a bug.
Comment 6 Jim Raykowski 2021-01-26 03:40:38 UTC
Hello All,

Here is a link to a patch that does the expand/collapse part of this request:

A demo video is available at bug 114567
Comment 7 Commit Notification 2021-03-02 21:50:14 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":


tdf#114567 tdf#138934 Hyperlink-Target in Doc Headings expand/collapse

It will be available in 7.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:

Affected users are encouraged to test the fix and report feedback.