Bug 158858 - Distorted image and incorrect size during hover over in Calc
Summary: Distorted image and incorrect size during hover over in Calc
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.0.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks: Calc-Comments
  Show dependency treegraph
 
Reported: 2023-12-25 15:14 UTC by PJF
Modified: 2024-02-20 14:08 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screen shot of the reported Calc bug. (350.55 KB, image/png)
2023-12-25 15:17 UTC, PJF
Details
test ODS with same comment duplicated: one shown, the other hidden (54.71 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-01-10 23:03 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PJF 2023-12-25 15:14:13 UTC
Description:
I inserted an image into a comment in Calc. I saved the size and position of the image in the comment. When I hover over the cell the comment, the photo in the comment is distorted and the image size is compressed .

Actual Results:
Add a comment to a cell. Insert an image into the comment. Save the size and position of the comment. Save the file. Open the file and hover over the cell with the comment. 

Expected Results:
The image size was incorrect and the image was distorted.


Reproducible: Always


User Profile Reset: No

Additional Info:
Reproduced the comment at the size and positioned originally saved.
Comment 1 PJF 2023-12-25 15:17:58 UTC
Created attachment 191592 [details]
Screen shot of the reported Calc bug.
Comment 2 Stéphane Guillou (stragu) 2024-01-10 22:58:45 UTC
The issue is related to the differently sized popup comment, likely since the fix for bug 73537.
The popup comment is resized to fit the authorship information, which really becomes a problem when the comment is filled with a stretched picture, like here.
If the image wasn't stretched, but for example centred or tiled, the aspect ratio issue would be less of a problem (but the placement of the image would change, potentially crop it...).

Confirming in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a2ccc25ccb2e94f5990d6d413541dbcdd3a72338
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 3 Stéphane Guillou (stragu) 2024-01-10 23:03:09 UTC
Created attachment 191861 [details]
test ODS with same comment duplicated: one shown, the other hidden

Steps to reproduce from scratch:

1. add comment
2. insert some text, keep comment visible
3. in next paragraph, use the toolbar to insert an image
4. right-click on image > Area > Area > Image > Options > Style: Stretched
5. resize the comment so image looks good
6. hover over cell

With attachment, hover over cell I1 and compare popup with visible comment.

In LO 7.5, popup comment would have the same size as visible comment.
Comment 4 Piotr 2024-01-19 16:16:09 UTC
Reproduced with version 7.6. Here is the result:
 3ba1964e115b7b7209bf7ce1ccbb161ddbf6fa0a is the first bad commit
commit 3ba1964e115b7b7209bf7ce1ccbb161ddbf6fa0a
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Thu Jun 29 09:25:51 2023 -0700
 
    source 2f76c9a2aff418f7c908c4494a05f5e859a83746
 
    source 2f76c9a2aff418f7c908c4494a05f5e859a83746
 
 instdir/program/editenglo.dll | Bin 2467328 -> 2469376 bytes
 instdir/program/sclo.dll      | Bin 17251328 -> 17253888 bytes
 instdir/program/setup.ini     |   2 +-
 instdir/program/version.ini   |   2 +-
 4 files changed, 2 insertions(+), 2 deletions(-)
Comment 5 Stéphane Guillou (stragu) 2024-01-19 22:19:47 UTC
Thanks for the bibisect, Piotr. This matches what I said in commet 2, however I wouldn't call it a regression because it was by design that the aspect ratio of the comment would change depending on if the author information is shown or not. You can learn more about the design decisions from the comments on gerrit: https://gerrit.libreoffice.org/c/core/+/153358

Regarding the "regression by" field, please always check who the author of the _source commit_ is. (You used the _bibisect build commit_ here, which does not match who actually authored the offending patch. I'm removing Norbert from CC, and adding Balázs.)

Regarding a fix for the issue described here, my suggestion is still to move the authorship information to a "pop down extension" tacked underneath the comment, leaving its size (and the position of its contents) unchanged, as I said in bug 73537 comment 9.