Bug 149047 - Improve labels and tooltips for .uno:ObjectMenue and .uno:InsertObjCtrl in the Customize dialog
Summary: Improve labels and tooltips for .uno:ObjectMenue and .uno:InsertObjCtrl in th...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: sdc.blanco
URL:
Whiteboard: target:7.4.0
Keywords: needsDevAdvice
Depends on:
Blocks: Customise-Dialog
  Show dependency treegraph
 
Reported: 2022-05-12 11:22 UTC by sdc.blanco
Modified: 2022-05-19 21:45 UTC (History)
3 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 sdc.blanco 2022-05-12 11:22:45 UTC
In Customize dialog, the command "Object" (.uno:ObjectMenue) is shown.

afaict, it is used only to make the dropdown menu for Insert -> Object, but otherwise has no function/value for Customize users.

=> should not be shown in Customize dialog.
Comment 1 Heiko Tietze 2022-05-12 11:36:21 UTC
If you want to customize the menu this command is relevant, isn't it?
Comment 2 sdc.blanco 2022-05-12 12:52:07 UTC
(In reply to Heiko Tietze from comment #1)
> If you want to customize the menu this command is relevant, isn't it?
Is it?

Insert | Object is already provided as a submenu.

Adding this command to the Insert menu simply gives an inactive command.

Insert > Insert Submenu provides a way to add submenus.

What am I missing?
Comment 3 Heiko Tietze 2022-05-12 13:02:20 UTC
The "Object" submenu is not a command (similar File > Recent Documents) but a customizable menu structure. The command uno:ObjectMenue is filled with content in ObjectMenuController::fillPopupMenu using MS_VERBATTR_ONCONTAINERMENU. But no idea what that is, the command remains disabled for me.
Comment 4 sdc.blanco 2022-05-13 11:58:53 UTC
Will also ask here about  .uno:InsertObjCtrl because same kind of issue, which can probably be handled in the same file (and move to new ticket if need be).

Search on "object" in customize dialog.

Note: Insert Object -- .uno:InsertObjCtrl  and OLE Object -- .uno:InsertObject

Note that icon for Insert Object appears the same as OLE Object when added to a toolbar.

Both open the Insert Ole Object dialog. Both are active when an object is not selected, but .uno:InsertObjCtrl is also active when an OLE object is selected, while .uno:InsertObject is not active.   

.uno:InsertObjCtrl seems to provide a empty dropdown menu, and given that it has the same icon as appears in the Insert menu, I am guessing that it has the same kind of purpose as .uno:Objectmenue.

Questions:

1. Maybe .uno:InsertObjCtrl should not be in the Customize menu?

2. Does the Customize dialog show "Label" or "Context Label"?  If "Label", then maybe Label should be "Insert Ole Object" and then Context Label "Ole Object"  (and tooltip can be improved).
Comment 5 Heiko Tietze 2022-05-16 12:34:06 UTC
(In reply to sdc.blanco from comment #4)
> 1. Maybe .uno:InsertObjCtrl should not be in the Customize menu?
This command has the label "Insert Object" and is used on the "Insert" toolbar but hidden by default. However, the very same command is labelled "OLE Object" at the toolbar. No idea why.
 
> 2. Does the Customize dialog show "Label" or "Context Label"?  If "Label",
> then maybe Label should be "Insert Ole Object" and then Context Label "Ole
> Object"  (and tooltip can be improved).

It's the label (with details in the text box below the list). 


Hiding an entry is not possible for one but all areas (see bug 147411 and bug 112620). But we have good reasons, at least for ObjectMenu, to hide and from my side it's all green do so generally- and bring back if users complain.
Comment 6 Miklos Vajna 2022-05-16 13:26:34 UTC
(In reply to Heiko Tietze from comment #3)
> The "Object" submenu is not a command (similar File > Recent Documents) but
> a customizable menu structure. The command uno:ObjectMenue is filled with
> content in ObjectMenuController::fillPopupMenu using
> MS_VERBATTR_ONCONTAINERMENU. But no idea what that is, the command remains
> disabled for me.

Most of the OLE embedded object code only works on Windows, where it can do win32 API calls to actually embed an external app to edit some embedded document. So if you make changes there, be sure to test your changes on Windows. Other platforms only support the (somewhat corner-case) "common" embedded object (Writer in Calc, etc) or "dummy" embedded object (just an image with some data which is retained on save).
Comment 7 sdc.blanco 2022-05-16 23:44:11 UTC
(In reply to Heiko Tietze from comment #5)

A few points of clarification...

> (In reply to sdc.blanco from comment #4)
> > 1. Maybe .uno:InsertObjCtrl should not be in the Customize menu?
> This command has the label "Insert Object" and is used on the "Insert"
> toolbar but hidden by default.
Yes, but in only one insert toolbar -- sw/uiconfig/swreport/toolbar/insertbar.xml (among several), but could not find out where it is actually used. (A "report" from Base uses sw/uiconfig/sglobal/toolbar/insertbar.xml )

> However, the very same command is labelled "OLE Object" at the toolbar. 
> No idea why.
To explain why:

When you write "labelled", I think (hope) you mean the appearance of the icon on the toolbar (and not the tooltip, which is "Insert Object").  Right?

The icon appearance can be explained quite simply.
Both .uno:InsertObjCtrl (Insert Object) and .uno:InsertObject (OLE Object) have been assigned to same icon -- possibly as a confusion, when the label for the first is identical to the .uno name of the second.
 
> Hiding an entry is not possible for one but all areas ---but good reasons 
> at least for ObjectMenu,  
I think .uno:ObjectMenu is already hidden.  I could not find it in Customize.

The motivation for the OP was primarily to improve the usability of the Customize dialog.

Miklos in comment 6 introduces the important possibility that .uno:InsertObjCtrl and .uno:ObjectMenue could be part of the  win32 API -- which could explain why they appear in officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu

Conclusions:
Instead of attempting to remove them from appearing in the Customize menu, modify the labels of .uno:InsertObjCtrl  and .uno:InsertObject so that they are better differentiated, and easier to see what they are likely to be used for. 

https://gerrit.libreoffice.org/c/core/+/134434

This might come close enough to resolving (or at least improving) this issue.
Comment 8 Heiko Tietze 2022-05-17 07:26:27 UTC
(In reply to sdc.blanco from comment #7)
> > However, the very same command is labelled "OLE Object" at the toolbar. 
> > No idea why.

Was fooled by ...swreport/toolbar/..., which is different to the ordinary insertbar.

> Instead of attempting to remove them from appearing in the Customize menu,
> modify the labels of .uno:InsertObjCtrl  and .uno:InsertObject so that they
> are better differentiated, and easier to see what they are likely to be used
> for. 
> 
> https://gerrit.libreoffice.org/c/core/+/134434

Sounds good to me. And probably safer than hiding.
Comment 9 Commit Notification 2022-05-17 10:23:23 UTC
Seth Chaiklin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0b582183902cfd1de13ad4748d80dc4a9257f3f4

tdf#149047 improve labelling of .uno:InsertObjCtrl and .uno:InsertObject

It will be available in 7.4.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.
Comment 10 Maxim Monastirsky 2022-05-17 13:56:04 UTC
.uno:ObjectMenue is the one under the Edit menu, not to be confused with .uno:ObjectMenu from the Insert menu (notice the extra "e" at the end). The former is filled dynamically with commands related to the currently selected object. For example, for a selected spreadsheet object I get there "Edit" and "Save Copy as..."  items. Otherwise it's disabled (as expected).

.uno:InsertObjCtrl is just a toolbar dropdown that's supposed to show the contents of the insertobjectbar toolbar. But there is no such toolbar under swriter/, which is why it appears empty. It does work as expected in e.g. Master Documents.
Comment 11 sdc.blanco 2022-05-17 16:36:56 UTC
(In reply to Maxim Monastirsky from comment #10)
> .uno:InsertObjCtrl is just a toolbar dropdown that's supposed to show the
> contents of the insertobjectbar toolbar. But there is no such toolbar under
> swriter/, which is why it appears empty. 
But now I have discovered that it is still active in Writer -- if one clicks on the icon, rather than use the dropdown box.

> It does work as expected in e.g. Master Documents.
Have seen the dropdown now.  Thanks for clarifying this mystery Maxim.

Proposed adjustment to .uno:InsertObjCtrl here:

https://gerrit.libreoffice.org/c/core/+/134443

(kind of curious that it appears in WriterCommands, but no insertobjectbar for Writer).

Changing bug summary from question to assertion. And wondering if an improved label will inspire some to try this .uno and then report a bug that there are no items in the dropdown.  At least the "answer" is here.
Comment 12 sdc.blanco 2022-05-17 17:01:37 UTC
(In reply to Maxim Monastirsky from comment #10)
> .uno:ObjectMenue is the one under the Edit menu, not to be confused with
> .uno:ObjectMenu from the Insert menu (notice the extra "e" at the end).
And thanks again for clearing up the mystery of the .uno that motivated this OP.

I can see from experiment that "Object" = "OLE Object" so here is my proposal:

https://gerrit.libreoffice.org/c/core/+/134444

This .uno does not work (for me) when it is on a menubar (bug? or intention?).
So I took the liberty of giving a longer TooltipLabel to explain the otherwise inscrutable "Label".
Comment 13 Maxim Monastirsky 2022-05-17 19:34:42 UTC
(In reply to sdc.blanco from comment #12)
> This .uno does not work (for me) when it is on a menubar (bug? or
> intention?).
You mean toolbar, not menubar, correct? In that case it's only a matter of adding the respective entry to officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu. That file has separate "PopupMenu" and "ToolBar" sections, and .uno:ObjectMenue is only registered there under "PopupMenu". Something similar to how e.g. .uno:InsertFieldCtrl is handled there under "ToolBar" should be sufficient, I believe. (Although I'm not sure if that command can indeed be useful for toolbars.)
Comment 14 sdc.blanco 2022-05-17 20:52:44 UTC
(In reply to Maxim Monastirsky from comment #13)
> You mean toolbar, not menubar, correct?
Yes, exactly. Toolbar.

> In that case it's only a matter of...
Thanks (again) for explanation.  The role of Controller.xcu starts to become clear.

I think I will leave status quo, because right-click on the OLE object is sufficient to get the edit and copy commands, so hard to imagine a rfe for a toolbar button.

If someone later sees the need to add .uno:ObjectMenue to Controller.xcu, then it will be necessary to evaluate whether the tooltip is too long or inappropriate.
Comment 15 Commit Notification 2022-05-19 21:42:56 UTC
Seth Chaiklin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/31f4173f9dd06ee2083763d5f8029f08e12e0cd7

tdf#149047  add tooltip to uno:InsertObjCtrl and improve label

It will be available in 7.4.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.
Comment 16 Commit Notification 2022-05-19 21:45:05 UTC
Seth Chaiklin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/70b00434bad4216aeaed360808e19344de794c9c

tdf#149047,tdf#149018 improve label and tooltip of .uno:ObjectMenue

It will be available in 7.4.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.