Bug 150889 - Insert->Image inconsistent behavior when graphic objects are selected
Summary: Insert->Image inconsistent behavior when graphic objects are selected
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Image-Caching
  Show dependency treegraph
 
Reported: 2022-09-09 12:01 UTC by Mike Kaganski
Modified: 2022-09-15 06:25 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 Mike Kaganski 2022-09-09 12:01:47 UTC
Since commit 5c75cd95178e3d57e53fee64a9d64023c6d18acf (LO 4.3), inserting a bitmap from file when a graphic object (like ellipse) is selected results in the object getting the background (area) set to the chosen bitmap. (Missing in release notes BTW.)

But since commit 7524dd59efc9b685548caf7967b24f7758796078 (LO 5.2), it works that way only in Writer and Calc, not in Draw/Impress.

Is there a reason to have this inconsistency? Should the fix for tdf#73742 be reverted, or changed?

Steps:

1. In a Writer document, insert an ellipse;
2. Keeping the newly inserted ellipse selected, Insert->Image, select some PNG.

See that the ellipse now has the PNG set as its background.

3. In Draw, repeat #1-#2.

See that the PNG is inserted as a separate object, above the ellipse.
Comment 1 Heiko Tietze 2022-09-09 12:28:34 UTC
Bug 73742, which is resolved by the patch, reports that a selected image is being replaced when another image is inserted. And Samuel's patch fixed that for sd/. 

My take: Although applying an image background via Insert > Image is convenient for those who know this, it's probably not expected by the average user. I'd do the same in other modules what has been done for Draw/Impress.
Comment 2 Mike Kaganski 2022-09-09 12:45:44 UTC
But also note discussion in bug 55582 (having a controversy WRT the desired workflow), and the AOO issue i#123922, for which Armin implemented the original change.

I personally consider (1) the change in tdf#73742 doing *more* than was asked (it was about replacement of *images* with other images, while we are discussing the behavior when *non-image* graphic objects are selected); and (2) the behavior before that was rather carefully considered (objects of different kinds had well-defined consistent behavior across different modules, allowing to have a very special behavior of keeping old object's size on insertion, which is impossible now).
Comment 3 Heiko Tietze 2022-09-15 06:25:37 UTC
We discussed this topic in the design meeting.

From the possible solutions
  a) change Draw/Impress to behave like Writer (insert Image as background)
  b) change Writer and Calc and never apply as background
  c) make all insertions behaving the same and _replace_ selections

the easiest to implement should be used, probably a), to ensure consistency.
MSO Word and Powerpoint unselect the shape and insert the image as additional object.

On the long run we should reconsider the function completely. Point is that we replace selected text on input, whether on typing or by inserting a chart, for example.