Created attachment 174655 [details] Screenshot showing the bug In the gallery sidebar, if the user right-clicks any object a popup menu will appear with an option "Insert as Background". In a Writer document this option will show a sub-menu with 2 options "Page" and "Paragraph". However, in Impress, Draw and Calc there are no options available in the sub-menu because this command is only applicable to Writer (see attached ODG file). Therefore, I think this option should appear only in Writer and be removed from the other applications.
No option where it makes most sense, Draw/Impress. And buggy in Writer: I always get the #729fcf but pretended to be an image. Better drop it completely. The command is svx/uiconfig/ui/gallerymenu2.ui with (quite confusing) code in svx/source/gallery2/galbrws2.cxx. Dev advice welcome.
No further opinion, so let's remove the command.
I gave a try with LO Debian package 7.2.1.2, when right clicking on an object of the side gallery, on Writer, Calc, Impress and Draw I got only: - Insert - Preview - Copy On pc Debian x86-64 with master sources updated today, I got: - Insert - Preview - Title - Delete - Copy - Paste There's indeed something weird here but I don't see "Insert as Background", did I miss something? (I tried with gen rendering). (nitpick: you haven't attached a screencast but an odg file with a fixed image)
> There's indeed something weird here but I don't see "Insert as Background", > did I miss something? > (I tried with gen rendering). This is indeed weird... using the Kf5 backend the problem happens using LO 7.2.1.2 (from the Ubuntu PPA) and with the daily LO 7.3 alpha build. However, setting SAL_USE_VCLPLUGIN=gen has the following results: 1) Using the PPA version and the 7.3 alpha daily build (deb), I get only Insert, Preview and Copy. 2) If I build LO from source, I get Insert, Preview, Title, Delete, Copy and Paste (no "Insert as Background"). If I run the same build I made from the source code, but using kf5, I get the "Insert as Background" option. What may be causing this? > (nitpick: you haven't attached a screencast but an odg file with a fixed > image) True... I fixed it to avoid confusion.
Indeed! I could reproduce this with kf5 rendering!
Caolán: I'm trying to understand why kf5 rendering makes right click menu different than from other. Any thoughts here?
wrt "why kf5 rendering makes right click menu different than from other." and comment #3 I believe the issue there is that its a distro build where the gallery is read only due to being installed system-wide and the user hasn't write access to it, vs the self-build case where it belongs to the local user so it can be modified and then those extra entries are available. Right click on the list of galleries and check properties and it probably has a location somewhere the user doesn't have write access to
Resolved in 7.6: now regardless of the VCL plugin used, the context menu item is only shown where relevant (bitmaps galleries in Writer – although one could argue this kind of gallery should also be allowed to fill pages/slides in other components, but that's a different issue). Bibisected the fix with linux-64-7.6 to: commit d446be648385a451c60ba3bd1657906f72a63e75 author Michael Weghorn Wed Apr 12 16:41:38 2023 +0300 committer Michael Weghorn Wed Apr 12 17:07:21 2023 +0200 qt: Don't show non-visible menu entries Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150285 Thanks Michael! :)