Bug 128787 - UI: menu path Format - Styles - New style from selection does not work
Summary: UI: menu path Format - Styles - New style from selection does not work
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.1.3.2 release
Hardware: All All
: medium normal
Assignee: Jim Raykowski
URL:
Whiteboard: target:24.8.0
Keywords:
Depends on:
Blocks: Main-Menu
  Show dependency treegraph
 
Reported: 2019-11-13 19:46 UTC by Gerhard Weydt
Modified: 2024-02-15 19:58 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 Gerhard Weydt 2019-11-13 19:46:06 UTC
The menu path Format -> Styles -> New style from selection does not work, there is no reaction when the command is clicked.
The same function triggered in the styles section of the sidebar does work, though.

Steps to reproduce:
- draw a rectangle
- change its colour
- while the rectangle is still selected choose Format -> Styles -> New style from selection
- result: no reaction
- choose the respective symbol in the sidebar: a dialog to enter the name appears

It seems that this menu entry was introduced with 6.1 (Itested in 6.1.3.2), but I could niot find it in 6.0.7.3.

The problem still persists in:
Version: 6.4.0.0.alpha1 (x64)
Build ID: cc57df8f942f239d29cb575ea5a7cb01405db787
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: GL; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded
Comment 1 Roman Kuznetsov 2019-11-17 11:56:23 UTC
confirm in

Version: 6.5.0.0.alpha0+
Build ID: d04eef858250f97690f32dba17f42d157a8767fc
CPU threads: 4; OS: Mac OS X 10.15.1; UI render: GL; VCL: osx; 
Locale: ru-RU (ru_RU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 2 Xisco Faulí 2019-11-19 12:39:23 UTC
@Jim, I thought you might be interested in this issue...
Comment 3 sdc.blanco 2020-01-24 13:54:27 UTC
I think this is NAB  -- coming from a misunderstanding about "New style from selection"

"New style from selection" is an action to create a new Paragraph (Character, Page) style from an existing style.  

If a Shape (e.g. rectangle) is selected - then the menu item (Styles>Select new style from selection) will be greyed out.  (also in 6.3.4.2 if a Shape is selected, then the "styles action" icon in the Styles sidebar is greyed out).

If you place the cursor in a paragraph style, and use the same menu command, then it will be active again. (and you can see what it is used for)

@Gerhard -- to change format of your shapes, select and right-click

(In reply to Xisco Faulí from comment #2)
> @Jim, I thought you might be interested in this issue...

@Jim,  Will be interesting to see what "magic" you can make here... (-:
Comment 4 Gerhard Weydt 2020-01-24 20:14:48 UTC
(In reply to sdc.blanco from comment #3)
> I think this is NAB  -- coming from a misunderstanding about "New style from
> selection"
> 
> "New style from selection" is an action to create a new Paragraph
> (Character, Page) style from an existing style.  
> 
> If a Shape (e.g. rectangle) is selected - then the menu item (Styles>Select
> new style from selection) will be greyed out.  (also in 6.3.4.2 if a Shape
> is selected, then the "styles action" icon in the Styles sidebar is greyed
> out).
> 
> If you place the cursor in a paragraph style, and use the same menu command,
> then it will be active again. (and you can see what it is used for)
> 
> @Gerhard -- to change format of your shapes, select and right-click
> 
> (In reply to Xisco Faulí from comment #2)
> > @Jim, I thought you might be interested in this issue...
> 
> @Jim,  Will be interesting to see what "magic" you can make here... (-:

Obviously , you are talking about Writer, but the component of this bug report is Draw!
And even in Writer it is not the key point that the new paragraph style is created from the existing one (there's always a style, at least the default style): select an entire paragraph and set another colour, then use the command, in Writer it works with the menu as well as with the sidebar. The new style will use the colour set beforehand, the new style is created using the atttributes set manually, when they differ from the old style. That's the meaning of this command!
The reason for the command being grayed out in Writer when selecting a drawing object is, that there are no drawing styles in Writer!
And, as I said, the sidebar command is working in Draw, so there's no misunderstanding the command, the function seems simply not be called from the menu entry.
Comment 5 sdc.blanco 2020-01-24 22:09:39 UTC
(In reply to Gerhard Weydt from comment #4)
> Obviously , you are talking about Writer, but the component of this bug
> report is Draw!
Apologies for my oversight.  Can confirm the problem you describe and add that the same problem also appears for "Update Selected Style"  (i.e., works from Style window icon, but not from menu command)

Additional problem:  when using the menu commands, the shape remains "selected" (i.e., cannot select another shape -- need to click on the Drawing toolbar and then on the canvas, or use right-click and any command to be able to select other shapes).

Version: 6.5.0.0.alpha0+ (x64)
Build ID: da70fd1edc211bf63f8388e11c1bd8dd398fdaf8
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: da-DK (en_DK); UI-Language: en-US
Calc: CL
Comment 6 QA Administrators 2022-01-24 03:34:35 UTC Comment hidden (obsolete)
Comment 7 Gerhard Weydt 2022-01-24 13:59:04 UTC
The problem persists in
Version: 7.3.0.2 (x64) / LibreOffice Community
Build ID: f1c9017ac60ecca268da7b1cf147b10e244b9b21
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
Comment 8 BogdanB 2022-02-03 20:18:18 UTC
Still here
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 0b397d8ef0a2615e8e6202804ca2f6cb58436fa5
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 9 QA Administrators 2024-02-04 03:14:01 UTC Comment hidden (obsolete)
Comment 10 Jim Raykowski 2024-02-10 06:27:48 UTC
Hi all,

Here is a patch that adds missing stuff needed to make 'New Style from Selection' (uno:StyleNewByExample) and 'Update Selected Style' (.uno:StyleUpdateByExample) work in Draw/Impress:

https://gerrit.libreoffice.org/c/core/+/163208
Comment 11 Commit Notification 2024-02-15 19:38:18 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/60e37a4b85226f7a4430cd98347724a4ef0bde66

tdf#128787 sd: Make StyleNewByExample and StyleUpdateByExample work

It will be available in 24.8.0.

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

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