Bug 50050 - Make LE (Link End) Index/Table Entry component character style match LS (Link Start) by default
Summary: Make LE (Link End) Index/Table Entry component character style match LS (Link...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.5 release
Hardware: x86 (IA32) All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack, skillCpp
Depends on:
Blocks: TableofContents-Indexes Writer-Styles-Character
  Show dependency treegraph
 
Reported: 2012-05-17 06:49 UTC by ryan.jendoubi@gmail.com
Modified: 2018-10-26 22:41 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ryan.jendoubi@gmail.com 2012-05-17 06:49:27 UTC
As things stand, each time you click the "Hyperlink" button to add a link component to the Structure of an Entry in an Index/Table, the Character Style of that component defaults to "Internet Link".

Putting aside the fact that "Internet Link" is a silly default style in this context... the problem is that if you add an "LS" (Link Start) component to the Entry Structure, and change its Character Style to something sensible, the "LE" (Link End) component you then add will still default its Character Style to "Internet Link".

This in effect means that you have to change the Character Style *twice* per Entry Level, which is a bit silly. The logic should be "If LS exists, this.char_style = LE.char_style, else this.char_style = Internet Link". Or, you know, else "a plain style that makes sense for TOC links" :)

Could someone confirm this is still an issue in 3.5.x?
Comment 1 Florian Reisinger 2012-05-18 08:08:36 UTC
It is a easyhack now...
Comment 2 Björn Michaelsen 2013-10-04 18:47:32 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 3 Robinson Tryon (qubit) 2013-10-29 03:17:57 UTC
whiteboard: standardize spelling 'easyhack' -> 'EasyHack'
Comment 4 Björn Michaelsen 2014-12-02 10:53:12 UTC
adding LibreOffice developer list as CC to unresolved Writer EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 5 Robinson Tryon (qubit) 2015-12-10 11:50:46 UTC Comment hidden (obsolete)
Comment 6 Robinson Tryon (qubit) 2016-02-18 14:52:28 UTC Comment hidden (obsolete)
Comment 7 jani 2016-04-29 06:12:51 UTC
Code pointer is missing (mandatory for easy hacks)
Comment 8 Xisco Faulí 2016-09-27 10:36:13 UTC Comment hidden (obsolete)
Comment 9 Michael Stahl (CIB) 2018-10-26 22:41:29 UTC
the dialog code is in sw/source/ui/index/cnttab.cxx

it works with instances of FormToken that have the sCharStyle member to represent the character style.

it appears to me that the character style set on the LE link-end token does not have a visible effect on the resulting entries; in ToxTextGenerator::GenerateText a formatting hint is inserted, but it is inserted with SetAttrMode::DONTEXPAND on an empty range, so it will not have a visible effect.

this is unique to the LE token, the other ones can at least sometime generate text to which the char style will be applied.

for the entire range between LS and LE, the sCharStyle of the LS token is applied, overwriting any style set on inner tokens.

so either the LE token's char style should be synced to the LS token in the UI so as to not confuse users, or the style widget should be disabled for the LE token.