Bug 36467 - If Heading starts with digit+period, hyperlink to it will not work
Summary: If Heading starts with digit+period, hyperlink to it will not work
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version: 3.3.0 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
QA Contact: Andrew Panin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-21 10:28 UTC by Andrew Panin
Modified: 2013-09-18 10:03 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
hyperlinks_bug (190.72 KB, application/vnd.oasis.opendocument.text)
2011-04-21 10:28 UTC, Andrew Panin
Details

Description Andrew Panin 2011-04-21 10:28:36 UTC
Created attachment 45927 [details]
hyperlinks_bug

----------------------------
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Windows XP Professional SP2
----------------------------

I had a document consisting of 22 pages and 10 chapters overall. It was written in Russian. Some chapters were entitled as "Contents", or "Appendix A". The rest were numbered throughout the document: "1. Introduction", "1.1. Software installation".

I tried to make references from text to these headings using "Insert" -> "Hyperlink" menu. In case I referred to "Contents" or "Appendix A", the links were okay - when I clicked them, I jumped to the appropriate chapter.

But when I made links to chapters like "1. Introduction" or to a "7.5. Extra functionality", they didn't work. It looked like they had the target of self ("#") instead of the actual header. When you clicked them, the page scrolled a bit so that this line was on top, but you didn't get to the desired page.

I'm attaching a sample of that document. Steps to reproduce:
1. Open it.
2. Select a random word on the last page and create a link to the very first heading (that doesn't start with digit+period). Such link works okay.
3. Select another word on the same page and create a link to heading "1. xxx". This link WILL NOT work.
Comment 1 Muthu 2011-05-04 23:28:40 UTC
Reproducible.

one for cedric?
Comment 2 Paul Sorensen 2013-02-07 15:23:24 UTC
Confirmed still a problem in versions 3.6.2.2 (Ubuntu 12.10) and downloaded 4.0.3 verions (also on Ubuntu 12.10)

Simple, but annoying workaround is
1. prefix the heading with a alpha character like "a1.1 Introduction"
2. set the hyperlink references to this heading.
3. Restore the heading by removing the prefix "1.1 Introduction"

But don't ever change the hyperlinks without putting that same prefix character back.

Appears to be a problem in the way the hyperlink is prefixed internally with numbers for chapter and section. There isn't a delimiter between that and the heading text. Thus the hyperlink is broken because it doesn't exist.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.