Bug 144201 - Remove "Insert as Background" from Gallery context menu
Summary: Remove "Insert as Background" from Gallery context menu
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: Gallery KDE, KF5 UNO-Command-Removal
  Show dependency treegraph
 
Reported: 2021-08-30 23:24 UTC by Rafael Lima
Modified: 2023-10-01 22:58 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing the bug (103.29 KB, application/vnd.oasis.opendocument.graphics)
2021-08-30 23:24 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2021-08-30 23:24:31 UTC
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.
Comment 1 Heiko Tietze 2021-09-15 09:24:23 UTC
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.
Comment 2 Heiko Tietze 2021-09-30 09:07:24 UTC
No further opinion, so let's remove the command.
Comment 3 Julien Nabet 2021-09-30 18:38:25 UTC
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)
Comment 4 Rafael Lima 2021-09-30 18:58:21 UTC
> 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.
Comment 5 Julien Nabet 2021-09-30 19:13:28 UTC
Indeed! I could reproduce this with kf5 rendering!
Comment 6 Julien Nabet 2021-10-01 16:20:41 UTC
Caolán: I'm trying to understand why kf5 rendering makes right click menu different than from other.
Any thoughts here?
Comment 7 Caolán McNamara 2021-10-04 09:53:10 UTC
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
Comment 8 Stéphane Guillou (stragu) 2023-10-01 22:58:46 UTC
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! :)