Bug 107211 - Table of Contents hyperlink character style "Default" or "Default Style" not imported
Summary: Table of Contents hyperlink character style "Default" or "Default Style" not ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: odf target:5.4.0 target:5.3.4 target:...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2017-04-16 21:01 UTC by Marco A.G.Pinto
Modified: 2022-01-11 10:01 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
the index page (34.32 KB, application/pdf)
2017-04-16 21:01 UTC, Marco A.G.Pinto
Details
sample of bug happening (2.02 MB, application/vnd.oasis.opendocument.text)
2017-04-17 17:19 UTC, Marco A.G.Pinto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco A.G.Pinto 2017-04-16 21:01:11 UTC
I printed part of a document to PDF (both LO pdf and CutePDFWriter) and noticed that the index gets the lines underlined which looks very ugly.

I have included the index page.
Comment 1 Marco A.G.Pinto 2017-04-16 21:01:35 UTC
Created attachment 132621 [details]
the index page
Comment 2 Xisco Faulí 2017-04-17 10:07:21 UTC Comment hidden (obsolete)
Comment 3 Marco A.G.Pinto 2017-04-17 10:30:31 UTC
It is strange... I was going to create a sample file but when I pressed "Update Index" it removed the underlines :(
Comment 4 Marco A.G.Pinto 2017-04-17 17:19:40 UTC
Created attachment 132639 [details]
sample of bug happening

Hello X1sk0,

I could duplicate the bug by opening the document saved on the index page.

If open in the index page, the index will all get underlined.

Try to "Update index" (it will fix it), then save in that page, close Writer and reopen the document (the index will get underlined, and if you print the document, the underline will be printed).
Comment 5 Aron Budea 2017-04-17 18:38:02 UTC
The links seem to be intentional because of LS / LE in the ToC, but I'm not sure why they disappear after an update.
Comment 6 Marco A.G.Pinto 2017-04-18 09:32:46 UTC
With or without underlines, the index links still work.

So, I believe there is no need to underline.
Comment 7 Buovjaga 2017-04-18 15:40:25 UTC
(In reply to Marco A.G.Pinto from comment #6)
> With or without underlines, the index links still work.
> 
> So, I believe there is no need to underline.

In the Entries tab, click the LS button and in the Character Style drop-down list below, select the Default style. Same for the LE button.
Comment 8 Buovjaga 2017-04-18 15:46:52 UTC
(In reply to Buovjaga from comment #7)
> (In reply to Marco A.G.Pinto from comment #6)
> > With or without underlines, the index links still work.
> > 
> > So, I believe there is no need to underline.
> 
> In the Entries tab, click the LS button and in the Character Style drop-down
> list below, select the Default style. Same for the LE button.

Urgh.. it resets this to None on save & reload.
Comment 9 Buovjaga 2017-04-18 15:49:32 UTC
In 3.6 the style stays. Note that you need to set it both for level 1 and 2.

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 10 Michael Stahl (allotropia) 2017-04-19 21:34:07 UTC
4.0.6 is bad
3.6.7 is good

bibisect range b6c016da23d309b4ac7d154bc33a22397974ed73..d85fd8a85501547d5bb87822d2589a07aed7f2d6

regression from:

commit 783d13a9276931e274a90b9b53de2c92dc8c055e
Author:     Jan Holesovsky <kendy@suse.cz>
AuthorDate: Tue Nov 20 12:03:18 2012 +0100

    Rename style called "Default" to "Default Style" + First Cap Some Others too.
    
    Change-Id: I71b74ceabfdaced541529143d15d020ac17d2e26

 sw/source/ui/utlui/poolfmt.src | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)


... ah, the values text:style-name="Default_20_Style" and text:style-name="Default"  (as written by LO < 4.0) are lost on import, while e.g."Emphasis"  works fine.
Comment 11 Commit Notification 2017-04-21 10:13:08 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=157013219230f251346a5aa662c39d02f15420ec

tdf#107211 sw: ODF import: add a horrible hack to import "Default"

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2017-04-21 11:37:14 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=05710ae52ff9962c0852a4e2e59e1814c785b461&h=libreoffice-5-3

tdf#107211 sw: ODF import: add a horrible hack to import "Default"

It will be available in 5.3.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Michael Stahl (allotropia) 2017-04-21 15:08:35 UTC
the import issue should be fixed now on master (at least it should work as it used to in LO 3)
Comment 14 Commit Notification 2017-05-03 10:49:28 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-3-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f087bc1cb476931f0b93c7b4a153129c8969b946&h=libreoffice-5-3-3

tdf#107211 sw: ODF import: add a horrible hack to import "Default"

It will be available in 5.3.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

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