Page 1 of 1

[Solved] Scale picture in merged Calc cells

Posted: Thu Mar 28, 2024 5:42 pm
by FDB
In a calc document I have a merged area (multiple columns and rows) where a picture is to be placed. This picture will need scaling. Therefor I want to find out the size of the merged area.
The scaling (and repositioning, if needed) is to happen in a (basic) macro.
So far I was not able to find a strategy/ example.
Need help.

Re: Scale picture in merged Calc cells

Posted: Thu Mar 28, 2024 6:03 pm
by JeJe
Select the cells, then:

Code: Select all

thiscomponent.currentselection.size

Re: Scale picture in merged Calc cells

Posted: Thu Mar 28, 2024 7:55 pm
by Zizi64
The recent LibreOffice versions have a built-in feature for resizing the images: "Fit to cell size". It works for me with merged cells too.
FitToCellSize.png
FitToCellSize.png (19.71 KiB) Viewed 5522 times