Bug 106782 - UNO: Addition of character style creation and modification commands
Summary: UNO: Addition of character style creation and modification commands
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: UNO-Command-New Styles-Management Writer-Toolbar-Formatting-Styles Style-Formatting-Writer-Toolbar
  Show dependency treegraph
 
Reported: 2017-03-26 18:15 UTC by Yousuf Philips (jay) (retired)
Modified: 2020-06-25 08:49 UTC (History)
5 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) 2017-03-26 18:15:13 UTC
We have uno commands for the creation (.uno:StyleNewByExample), editing (.uno:EditStyle) and updation (.uno:StyleUpdateByExample) of paragraph styles, and we also need similar commands that work for character styles.
Comment 1 Regina Henschel 2017-03-26 19:25:45 UTC
The command .uno:StyleNewByExample works the same for character style. It depends on the current active category in Styles&Formatting, whether paragraph or character is used.
Comment 2 Yousuf Philips (jay) (retired) 2017-03-26 20:03:40 UTC
(In reply to Regina Henschel from comment #1)
> The command .uno:StyleNewByExample works the same for character style. It
> depends on the current active category in Styles&Formatting, whether
> paragraph or character is used.

Unfortunately the command doesnt work for character style unless its run from within the sidebar, which wont work for when the command is run in the menu or the toolbar.

E.g.
1) Start Writer
2) Styles > Emphasis
3) Type some text
4) Select all the text
5) Click the font color toolbar butto to change the text to red
6) Styles > New Style or click the 'New Style' button in the formatting toolbar
7) Dialog appears with the list of character styles
8) Type a new style name and press OK
9) New paragraph style was created

.uno:StyleUpdateByExample also is intended to work for character styles, but it also doesnt function correctly from the menu or toolbar, so ideally this joint functionality should be separated into separate commands.
Comment 3 Thomas Lendo 2017-04-12 13:04:28 UTC
OT, @jay:
The whole uno commands and UI names for it are messed up. E.g. .uno:StyleApply is named "Set Paragraph Style" in the UI and shows the current frame style name if a frame is selected (and not the text in it) - then the list shows the selected frame name and other paragraph styles.
.uno:StyleNewByExample, .uno:EditStyle and .uno:StyleUpdateByExample are not grayed out (deactivated) if you use these commands on frames/other objects than paragraphs and then a paragraph style will be created/edited/updated and not the frame style.
Comment 4 Yousuf Philips (jay) (retired) 2017-04-21 10:40:19 UTC
(In reply to Thomas Lendo from comment #3)
> The whole uno commands and UI names for it are messed up. E.g.
> .uno:StyleApply is named "Set Paragraph Style" in the UI and shows the
> current frame style name if a frame is selected (and not the text in it) -
> then the list shows the selected frame name and other paragraph styles.

.uno:StyleApply used to be named 'Apply Style' until i changed it to 'Paragraph Style' recently ('Set Paragraph Style' is the tooltip :D). Yes frame-style names appearing in it is a known bug (107246).

> .uno:StyleNewByExample, .uno:EditStyle and .uno:StyleUpdateByExample are not
> grayed out (deactivated) if you use these commands on frames/other objects
> than paragraphs and then a paragraph style will be created/edited/updated
> and not the frame style.

The problem is that these commands were previously only in the sidebar, and i added them to the menubar and toolbar, so they only took into account which tab of the styles and formatting deck of the sidebar was active, and that is what needs to be corrected.