Bug 156380 - FORMATTING: images in cells should autoshrink to cell size, same as Excel behavior
Summary: FORMATTING: images in cells should autoshrink to cell size, same as Excel beh...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86 (IA32) Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Images Cell-Management
  Show dependency treegraph
 
Reported: 2023-07-19 14:06 UTC by BrianP
Modified: 2023-07-23 18:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
how it looks in Calc vs Excel (190.08 KB, image/png)
2023-07-19 14:06 UTC, BrianP
Details
original excel file that can be opened to show the behaviors (38.75 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-07-20 09:00 UTC, BrianP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BrianP 2023-07-19 14:06:58 UTC
Created attachment 188469 [details]
how it looks in Calc vs Excel

A column contains images.
When opened in Excel, the images autosize to the cell size.
When opened in Calc, the images remain too large and overlap (hide) following column(s) information.
It is possible to right-click each individual image, and select "Fit to cell size", but the documents we need to work with have whole columns of images and that would be impractical, especially for non-technically able users.
I had thought of some sort of a macro to visit each image, which might do the job for me personally, but the users would be reluctant to do anything different other than open the file as they currently do in Excel.
If this could be fixed, I could move all the users off Microsoft Office.
Comment 1 Regina Henschel 2023-07-19 22:33:10 UTC
Please attach a small file which has this problem. That makes it easier to investigate the problem.
Comment 2 BrianP 2023-07-20 09:00:05 UTC
Created attachment 188491 [details]
original excel file that can be opened to show the behaviors

attaching file as per request on comment #1.
I could only upload 1 file with original submission, so had chosen the image showing issue.
In retrospect, I should perhaps have created a .7z file and put both files inside.
Comment 3 danomois 2023-07-22 16:34:17 UTC
BrianP,

Interesting one.

I have replicated the behavior and see the situation exists.

I have changed the 'Importance': medium to 'enhancement' and marked it New - because (while admittedly I am new to QA here) I believe the default setting for Anchor of the Image (see the help link below) is acting as desired.

https://help.libreoffice.org/latest/hr/text/scalc/guide/change_image_anchor.html?DbPAR=CALC#bm_id471607970579914

The problem of course is it defaults to To Cell, where I would argue with you that the Anchor setting should inherit the setting from Excel if set to Fit to Cell.

As for the Macro and a quick fix - there below is a link to Event Driven Macros. If you made one to execute on Start Application I think that would eliminate the need for user intervention.

https://help.libreoffice.org/latest/en-US/text/sbasic/shared/01040000.html

Finally, let me ask - can you confirm if Excel picks up the default setting Fit to Cell if the setting is first made in LibreOffice calc?

That is, if you make a LibreOffice calc sheet, and paste an image then Anchor To Cell(Fit to Cell), then save, then open in Excel - is that same image/cell formatted Fit to Cell?

I'm only asking to know because I don't have Excel myself.

Thank you!
Comment 4 ady 2023-07-23 00:25:16 UTC
(In reply to BrianP from comment #2)
> Created attachment 188491 [details]
> original excel file that can be opened to show the behaviors

Is this happening also when using (saving) ods files from Excel? Or is it only reproduced with xlsx? What about xls?

These questions might be relevant in order to find out whether the problem is related to import filters (only), or it is also related to images in any file format (including ods). Of course that Excel might also generate an ods file that is seen differently (in Excel itself and/or in Calc), which would add another layer to the interoperability problem.



> I could only upload 1 file with original submission

Simply open again the report page of this bug 156380 and click (again) on the "Add an attachment" link in order to add a new comment with an additional attachment.