Bug 107246 - Only one frame style name appearing, and not more, in drop down Apply Style when a graphic/frame is selected.
Summary: Only one frame style name appearing, and not more, in drop down Apply Style w...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Styles-Paragraph-Combobox Writer-Styles-Frame
  Show dependency treegraph
 
Reported: 2017-04-18 15:50 UTC by Yousuf Philips (jay) (retired)
Modified: 2023-03-03 14:16 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-04-18 15:50:47 UTC
Steps:
1) Open Writer
2) Insert an image or frame
3) Unhide the Paragraph Style control in the Frame toolbar
4) Notice that it says the paragraph style is 'Graphics' or 'Frame' and setting the style to one of the paragraph styles adds the paragraph style as a child Frame style

Version: 5.4.0.0.alpha0+
Build ID: 04edc5c796c1b96e5228d0c1fcf73bcf52465b66
CPU threads: 2; OS: Linux 3.19; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-04-15_03:25:45
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 Cor Nouws 2017-04-18 17:49:36 UTC
(In reply to Yousuf Philips (jay) from comment #0)

> 4) Notice that it says the paragraph style is 'Graphics' or 'Frame' and

I always thought that was intentional (it's the same since ages in the box "Apply style" on the formatting tool bar). In the sense that it shows frame styles, in case a picture/frame is selected.
But looking closer, that is not the case..
So either the box should be disabled, or frame styles should be offered, in stead of paragraph styles. isn't it?
Comment 2 Yousuf Philips (jay) (retired) 2017-04-18 21:53:21 UTC
(In reply to Cor Nouws from comment #1)
> I always thought that was intentional (it's the same since ages in the box
> "Apply style" on the formatting tool bar). In the sense that it shows frame
> styles, in case a picture/frame is selected.
> But looking closer, that is not the case..

Yes i always looked at it and assume it showed frame styles, but nope it didnt. Beautiful how apparent bugs go unnoticed for years, glad that i decided to hide the drop down in all related toolbars. :D

> So either the box should be disabled, or frame styles should be offered, in
> stead of paragraph styles. isn't it?

If .uno:StyleApply can be extended to show non-paragraph styles (bug 88512), then it likely can be extended to show contextually show the correct style types. Devs will have to decide on it.
Comment 3 Thomas Lendo 2017-04-19 07:01:29 UTC
I recognized this behavior some days ago but with the Style Formatting toolbar (of bug 106781). I thought I had created a bug report for this. ;-)

Is this a generous bug for all "Set Paragraph Style" drop down controls and not only for that in the Frame toolbar?

Tested also with LibreOffice 3.3.0, OOO330m19 (Build:6), tag libreoffice-3.3.0.4 where the drop down control is named "Apply Style". I assume that was the intention in OOo times - showing the current selected style in addition to other standard paragraph styles.
Comment 4 Cor Nouws 2017-04-19 07:12:08 UTC
(In reply to Thomas Lendo from comment #3)

> Tested also with LibreOffice 3.3.0, OOO330m19 (Build:6), tag
> libreoffice-3.3.0.4 where the drop down control is named "Apply Style". I

For me, that is still what it's called ;)

> assume that was the intention in OOo times - showing the current selected
> style in addition to other standard paragraph styles.

You may test if you can create a new frame style, by selecting the name and entering a new one.
But for the rest, I can't imagine what the sense is of applying e.g. Heading 1 to a frame or picture.
Comment 5 Maxim Monastirsky 2017-05-14 08:08:21 UTC
Quoting from https://wiki.openoffice.org/wiki/Documentation/OOoAuthors_User_Manual/Writer_Guide/Working_with_frame_styles :

"When a frame is selected, the Apply Style list at the left of the formatting toolbar displays frame styles. You can use this to change the style of a frame."

In addition the extended tip of this control still says "Assigns a style to the current paragraph, selected paragraphs, or to a selected object." So this control clearly supposed to work with object styles.

So I tested this with old versions:

With OOo 1.1.5 it doesn't list paragraph styles at all, only the current frame style and its parent styles.

With LO 3.3 it also lists paragraph styles, but clicking one of them have no effect (unlike the current behavior that it creates a new frame style).

So this apparently regressed over the years. The text field still shows the frame style as expected, but the dropdown lists paragraph styles, but actually applying them as if they were frame styles.

(In reply to Cor Nouws from comment #4)
> (In reply to Thomas Lendo from comment #3)
> 
> > Tested also with LibreOffice 3.3.0, OOO330m19 (Build:6), tag
> > libreoffice-3.3.0.4 where the drop down control is named "Apply Style". I
> 
> For me, that is still what it's called ;)
In Calc it's indeed still called "Apply Style", but not in Writer:
http://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu#2876
Comment 6 Cor Nouws 2017-05-14 08:29:46 UTC
(In reply to Maxim Monastirsky from comment #5)

> With OOo 1.1.5 it doesn't list paragraph styles at all, only the current
> frame style and its parent styles.
> 
> With LO 3.3 it also lists paragraph styles, but clicking one of them have no
> effect (unlike the current behavior that it creates a new frame style).
> 
> So this apparently regressed over the years. The text field still shows the

In old training documentation I wrote indeed that it is possible to apply a frame style too. So that must have gone broken somewhere before version 3.3.
Comment 7 Yousuf Philips (jay) (retired) 2017-05-14 15:12:21 UTC
(In reply to Maxim Monastirsky from comment #5)
> In addition the extended tip of this control still says "Assigns a style to
> the current paragraph, selected paragraphs, or to a selected object." So
> this control clearly supposed to work with object styles.

Ideally we shouldnt make this control work based on context, but based on what we want it to show (read bug 88512 comment 7), so we can easily show the list of frame styles like so - .uno:StyleApply?FamilyName:string=FrameStyles

> In Calc it's indeed still called "Apply Style", but not in Writer:
> http://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/
> openoffice/Office/UI/WriterCommands.xcu#2876

Yes it was left like that in Calc as you can only apply a single type of style, cell styles, while in Writer you have multiple types of styles that can be applied.
Comment 8 Yousuf Philips (jay) (retired) 2017-10-23 13:22:20 UTC
*** Bug 79160 has been marked as a duplicate of this bug. ***
Comment 9 QA Administrators 2018-10-24 02:57:41 UTC Comment hidden (obsolete)
Comment 10 Cor Nouws 2018-10-24 21:26:30 UTC
still in Version: 6.2.0.0.alpha1+
Build ID: ae9f37ba753519ae4a2ae6384d052d417359602f
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-10-22_23:05:02
Locale: nl-NL (nl_NL.UTF-8); Calc: threaded
Comment 11 QA Administrators 2019-10-25 02:40:14 UTC Comment hidden (obsolete)
Comment 12 QA Administrators 2021-10-25 03:55:55 UTC Comment hidden (obsolete)
Comment 13 sdc.blanco 2022-05-05 21:15:38 UTC
.uno:StyleApply was removed from frameobjectbar.xml as part of the resolution of bug 120856, so not easy to test -- but I believe the request of this ticket is still unfulfilled and still relevant.

bug 88512 comment 13 gives a code pointer and explanation