Bug 88512 - TOOLBAR/SIDEBAR: Character style drop down control uno command
Summary: TOOLBAR/SIDEBAR: Character style drop down control uno command
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.5.0.0.alpha0+ Master
Hardware: Other All
: high enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevEval, topicUI
: 130260 135956 139271 141958 141965 142717 154526 (view as bug list)
Depends on:
Blocks: UNO-Command-New Toolbars Writer-Styles-Character Sidebar-Properties-Character Writer-Toolbar-Formatting-Styles Style-Formatting-Writer-Toolbar
  Show dependency treegraph
 
Reported: 2015-01-16 22:21 UTC by Yousuf Philips (jay) (retired)
Modified: 2024-02-28 01:40 UTC (History)
18 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 Yousuf Philips (jay) (retired) 2015-01-16 22:21:04 UTC
Presently in Writer, we only show the paragraph style drop down control (.uno:StyleApply) and it would be useful to have a similar drop down control for character styles.

Is there an uno command for this control already available, as i wasnt able to find one searching through the toolbar customizing dialog.

MS Office 2003 and below would list both paragraph and character styles in its toolbar styles drop down control, while MS Office 2007 would also show paragraph and character styles in its styles selector control in its ribbon UI.
Comment 1 Cor Nouws 2015-01-17 11:59:09 UTC
Hi Jay,

Hmm, I'd love to see this :)

When implementing, maybe we can find a short cut? Long time ago Mathias Bauer was so kind to link Ctrl-F11 to the style dropdown. Maybe Ctrl+Shft+F11 for the character styles?

Ideas to how to position it? Isn't it going to be a cluttering ( ;) ) of drop down boxes there ?

[Wasn't able to find something as uno:CharacterStyleApply, but that is of limited value. I think the double click event for the Styles and Formatting window must have some hook to ;) ]
Comment 2 Yousuf Philips (jay) (retired) 2015-01-17 13:55:33 UTC
(In reply to Cor Nouws from comment #1)
> When implementing, maybe we can find a short cut? Long time ago Mathias
> Bauer was so kind to link Ctrl-F11 to the style dropdown. Maybe
> Ctrl+Shft+F11 for the character styles?

Never new there was a shortcut for the styles dropdown. :D

> Ideas to how to position it? Isn't it going to be a cluttering ( ;) ) of
> drop down boxes there ?

Well the idea would be that users who only use styles would likely disable the font name drop down and replace it with the character style drop down, or simply just enable it next to it if they have a sufficiently wide resolution.
Comment 3 Cor Nouws 2015-01-17 14:13:51 UTC
(In reply to Jay Philips from comment #2)
> (In reply to Cor Nouws from comment #1)
> > When implementing, maybe we can find a short cut? Long time ago Mathias
> > Bauer was so kind to link Ctrl-F11 to the style dropdown. Maybe
> > Ctrl+Shft+F11 for the character styles?
> 
> Never new there was a shortcut for the styles dropdown. :D

Oh dear, so much to learn ;p

I now see that Ctrl+Shft+F11 is Update Style... Dangerous one!
Shall we asign Ctrl+Alt+F11 to apply character style?
Or dump the assigment to Update Style and use Ctrl+Shft+F11?

> 
> > Ideas to how to position it? Isn't it going to be a cluttering ( ;) ) of
> > drop down boxes there ?
> 
> Well the idea would be that users who only use styles would likely disable
> the font name drop down and replace it with the character style drop down,
> or simply just enable it next to it if they have a sufficiently wide
> resolution.

OK, maybe a preference pops up gradually to add it by default. We'll see.

[side note: ever considered a style drop down in Calc?]
Comment 4 Yousuf Philips (jay) (retired) 2015-01-26 14:03:04 UTC
(In reply to Cor Nouws from comment #3)
> > Never new there was a shortcut for the styles dropdown. :D
> 
> Oh dear, so much to learn ;p

Yes dear, i'm not a heavy keyboard user. :D

> I now see that Ctrl+Shft+F11 is Update Style... Dangerous one!
> Shall we asign Ctrl+Alt+F11 to apply character style?
> Or dump the assigment to Update Style and use Ctrl+Shft+F11?

Wouldnt really know about this as i'm not a keyboard user. Maybe ask sophie. :D

> > Well the idea would be that users who only use styles would likely disable
> > the font name drop down and replace it with the character style drop down,
> > or simply just enable it next to it if they have a sufficiently wide
> > resolution.
> 
> OK, maybe a preference pops up gradually to add it by default. We'll see.

I am contemplating how best to include it by default but seem to fall short on it because i see the benefit of having all four drop downs, but think they would take up way to much space.

> [side note: ever considered a style drop down in Calc?]

I've considered it but we dont have a good set of default styles in calc ( https://redmine.documentfoundation.org/boards/1/topics/493 ) and we dont have any free space in the toolbar for it presently.
Comment 5 Yousuf Philips (jay) (retired) 2015-11-11 22:59:29 UTC
The character style drop down would also be useful in the styles content panel of the properties in writer.

@Maxim, @Bubli: It would be useful to be able to have one main reusable function that others functions could call to request a particular category of styles to fill the drop down, as a character style drop down would be useful in writer, while a page style drop down would be useful in calc and a presentation style drop down for impress.
Comment 6 Robinson Tryon (qubit) 2015-12-13 11:24:20 UTC Comment hidden (obsolete)
Comment 7 Yousuf Philips (jay) (retired) 2017-04-03 11:44:16 UTC
@Maxim, @Miklos: Is it possible to extend the apply paragraph style drop down toolbar list (.uno:StyleApply) so that it could work with other styles like character, frame, page, list, etc. by referencing it like

.uno:StyleApply?FamilyName:string=CharacterStyles
Comment 8 Miklos Vajna 2017-04-14 22:28:40 UTC
This is already possible, e.g.

.uno:StyleApply?Style:string=Quotation&FamilyName:string=CharacterStyles

just grep for e.g. StyleApply in sw.
Comment 9 Yousuf Philips (jay) (retired) 2017-04-16 16:40:03 UTC
(In reply to Miklos Vajna from comment #8)
> This is already possible, e.g.
> 
> .uno:StyleApply?Style:string=Quotation&FamilyName:string=CharacterStyles
> 
> just grep for e.g. StyleApply in sw.

Thanks for the reply Miklos, but that wasnt want is wanted here, as we have similar UNO commands already in the Style menubar menu. What is wanted here is to have the toolbar show a drop down control for non paragraph styles.
Comment 10 Miklos Vajna 2017-04-18 13:37:09 UTC
Ah, I see. I think you need a bit of work to make the existing drop down support non-paragraph styles, it won't work out of the box.
Comment 11 Yousuf Philips (jay) (retired) 2017-04-18 15:14:32 UTC
(In reply to Miklos Vajna from comment #10)
> Ah, I see. I think you need a bit of work to make the existing drop down
> support non-paragraph styles, it won't work out of the box.

So in your opinion is it better to create individual uno commands for each non-paragraph style option (there are alot of them across all the modules) or make .uno:StyleApply able to list non-paragraph styles (fix once and work everywhere).
Comment 12 Yousuf Philips (jay) (retired) 2017-04-19 18:43:16 UTC
@Maxim, @Miklos: What is the Family argument used for in .uno:StyleApply?

http://opengrok.libreoffice.org/xref/core/sfx2/sdi/sfx.sdi#4242
Comment 13 Maxim Monastirsky 2017-05-14 18:23:05 UTC
(In reply to Yousuf Philips (jay) from comment #7)
> @Maxim, @Miklos: Is it possible to extend the apply paragraph style drop
> down toolbar list (.uno:StyleApply) so that it could work with other styles
> like character, frame, page, list, etc.
Yes, easily.

> by referencing it like .uno:StyleApply?FamilyName:string=CharacterStyles
It's a bad idea to use such commands, because it will be hard to make them appear in the customization dialog. We really need separate commands. The good news is that there are already separate commands. Right now they do nothing (they used internally only to transport the style status), but I think we can reuse them for the toolbar controls. Take a look at [1] for the mapping of style families to their existing commands.

(In reply to Yousuf Philips (jay) from comment #11)
> So in your opinion is it better to create individual uno commands for each
> non-paragraph style option (there are alot of them across all the modules)
> or make .uno:StyleApply able to list non-paragraph styles (fix once and work
> everywhere).
Note that several commands can be bound to one control, which can change its behavior based on the command it gets. So using individual uno commands *does not* mean more work.


[1] https://cgit.freedesktop.org/libreoffice/core/tree/framework/source/uielement/styletoolbarcontroller.cxx?id=b91fb08fd63207e663dca83abe1305d8025b4b48#n22
Comment 14 Yousuf Philips (jay) (retired) 2017-05-14 21:23:44 UTC
(In reply to Maxim Monastirsky from comment #13)
> It's a bad idea to use such commands, because it will be hard to make them
> appear in the customization dialog. We really need separate commands. The
> good news is that there are already separate commands. Right now they do
> nothing (they used internally only to transport the style status), but I
> think we can reuse them for the toolbar controls. Take a look at [1] for the
> mapping of style families to their existing commands.

Thanks for the link.

> Note that several commands can be bound to one control, which can change its
> behavior based on the command it gets. So using individual uno commands
> *does not* mean more work.

Sweet, as that would be the best solution.
Comment 15 Maxim Monastirsky 2020-02-04 15:23:56 UTC
*** Bug 130260 has been marked as a duplicate of this bug. ***
Comment 16 Maxim Monastirsky 2020-08-20 21:47:00 UTC
*** Bug 135956 has been marked as a duplicate of this bug. ***
Comment 17 Telesto 2021-01-14 12:46:32 UTC
*** Bug 139271 has been marked as a duplicate of this bug. ***
Comment 18 Dieter 2021-05-15 04:55:16 UTC
*** Bug 141965 has been marked as a duplicate of this bug. ***
Comment 19 Dieter 2021-06-23 06:03:15 UTC
*** Bug 142717 has been marked as a duplicate of this bug. ***
Comment 20 Buovjaga 2022-04-20 13:03:40 UTC
*** Bug 141958 has been marked as a duplicate of this bug. ***
Comment 21 Dieter 2022-04-21 07:29:43 UTC
Six duplicates and 15 users in cc
=> I've changed priority to high
Comment 22 Telesto 2022-04-21 08:01:50 UTC
(In reply to Dieter from comment #21)
> Six duplicates and 15 users in cc
> => I've changed priority to high

A side note: CC is blown up by QA people and a couple of DEV's
Comment 23 V Stuart Foote 2023-04-01 15:36:40 UTC
*** Bug 154526 has been marked as a duplicate of this bug. ***
Comment 24 Vollbracht 2024-02-28 01:40:16 UTC
Before having a shortcut we should have the command. I'd appreciate an additional drop down for character styles only besides the drop down for paragraph styles only.