Summary: | Make LE (Link End) Index/Table Entry component character style match LS (Link Start) by default | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | ryan.jendoubi <ryan.jendoubi> |
Component: | Writer | Assignee: | Ekta <ektagoel12july> |
Status: | ASSIGNED --- | ||
Severity: | enhancement | CC: | mentoring, michael.stahl, robinson.libreoffice, sdc.blanco |
Priority: | medium | Keywords: | difficultyInteresting, easyHack, skillCpp |
Version: | 3.4.5 release | ||
Hardware: | x86 (IA32) | ||
OS: | All | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 108014, 122497 |
Description
ryan.jendoubi@gmail.com
2012-05-17 06:49:27 UTC
It is a easyhack now... 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 whiteboard: standardize spelling 'easyhack' -> 'EasyHack' 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 Migrating Whiteboard tags to Keywords: (easyHack) JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit] Code pointer is missing (mandatory for easy hacks) Changing status: NEEDINFO -> NEW Adding keyword 'needsDevEval' [ninjaedit] 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. I have looked into the file and I am trying to add a method m_xHyperLinkEndPB for TOKEN_END similar to m_xHyperLinkPB(For TOKEN_START) for setting the scharstyle of LE as to same as LS. But I am getting stuck at the point of how can I know the existence of LE. Either there might be a way to iterate over the tokens present so I can iterate over them to check the LS presence and change LE charstyle to the same. I am somewhat trying to do this https://pastebin.com/fTbGjsrU Please help me out there. Thank You. I want to work on this easyhack. I'm trying to reproduce this issue, but I'm not sure how to create "Link Start" and "Link End" component. Can anyone provide steps to reproduce this bug? Or atleast how to create "Link Start" and "Link End" components? Thanks. (In reply to Mohit Marathe from comment #11) > Can anyone provide steps to reproduce this bug? Or atleast how to create > "Link Start" and "Link End" components? For 24.8.0.0 1. Insert > Table of Contents and Index > Table of Contents, Index, or Bibliography 2. (on Type tab) Type: anything except "Alphabetic Index" or "Bibliography" 3. Choose Entries tab. 4. Notice LE and LS in "Structure" line. Select each one and press Del key (which will remove these entries). 5. Place cursor at beginning of structure line, press "Hyperlink" Result: LS icon added to the structure list, and Character Style (shown under Structure line) is now "Index Link" 6. Change this character style to anything else (e.g., Footnote Characters) 7. Place the cursor in the Structure line again (after the LS icon), and click on "Hyperlink" again. Result: LE icon added to Structure list, and notice Character Style is "Index Link". iiuc, the OP would like the Character Style in this case to match the Character Style that was set for LS. Note also the end of comment 9. iiuc, the Character Style for LE has no visible effect in the document, so the point in having the character style for LE to match LS is only a UI trick to reduce possible user confusion. |