Bug 166907 - Writer: Aspect ratio not locked correctly on pasted images
Summary: Writer: Aspect ratio not locked correctly on pasted images
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Images
  Show dependency treegraph
 
Reported: 2025-06-08 07:28 UTC by internationils
Modified: 2025-08-26 12:11 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample (123.11 KB, application/vnd.oasis.opendocument.text)
2025-06-09 10:51 UTC, Telesto
Details
Screen recording. (15.91 MB, video/mp4)
2025-06-09 22:47 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description internationils 2025-06-08 07:28:03 UTC
I pasted a screenshot that was wider than the page into a writer document. I anchored it "as character".

The screenshot went off the right side of the page, so I double clicked the image. The aspect ratio was locked, so I checked the "relative width" and set it 100% relative to the paragraph width. The height did not change, and the image was distorted. The height should have been reduced.

I can't always reproduce this, sometimes it happens, sometimes the aspect ratio lock works. I tried with pasted images and dragging screenshots into the file.
Comment 1 m_a_riosv 2025-06-08 23:43:01 UTC
Please attach a sample file, reduce the size as much as possible without private information,
and paste the information in Menu/Help/About LibreOffice, there is a copy icon.
Comment 2 Telesto 2025-06-09 10:51:46 UTC
Created attachment 201156 [details]
Sample

1. Select the image
2. Press F4
3. Position and Size tab; Keep ratio is checked by default
4. Check Relative width; Type 80%
5. Press OK

Alternative
Skip step 4: also broken ratio

FWIW: only pasting an image does adjust the image to paper size. The image here comes from attachment 201139 [details] bug 166915. So assume this be result of web-paste
Comment 3 Telesto 2025-06-09 11:48:45 UTC
Also in 4.4.7.2

and in
LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735

and 
OpenOffice 2.2.1
Comment 4 m_a_riosv 2025-06-09 22:47:37 UTC
Created attachment 201168 [details]
Screen recording.

May I misinterpreted the matter.
It changes for me, but when you write the 80%, change the field is needed to see the change in the height.
Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: fef47a8bcc8531e69ccea29f2db5929741e66a3e
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: en-US (es_ES); UI: en-US
Calc: CL threaded
Comment 5 Telesto 2025-06-10 01:50:15 UTC
(In reply to m_a_riosv from comment #4)
> Created attachment 201168 [details]
> Screen recording.
> 
> May I misinterpreted the matter.
> It changes for me, but when you write the 80%, change the field is needed to
> see the change in the height.
> Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
> Build ID: fef47a8bcc8531e69ccea29f2db5929741e66a3e
> CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render:
> Skia/Raster; VCL: win
> Locale: en-US (es_ES); UI: en-US
> Calc: CL threaded

It's true, if you type 80% width instead of using the up/dow buttons of spinbox, the height spinbox not being refreshed, until clicking inside the height box
This is quite a nuisance. Caused by the welding. Refreshing it while typing was apparently not possible. So the value is actually changed, but you can't see.

However you will get feedback when using the arrow down button of the spinbox. And yes, the height of the image will adapt. However pressing OK, will still produce an image with a wrong aspect ratio. Which is unexpected with the lock aspect ratio being checked.
Comment 6 internationils 2025-06-17 07:23:22 UTC
Version: 25.2.3.2 (AARCH64) / LibreOffice Community
Build ID: bbb074479178df812d175f709636b368952c2ce3
CPU threads: 10; OS: macOS 15.5; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Also saw this on the Windows version under Win11, also most recent LO.

Others have added info and attachments, i will remove the NEEDINFO. Please let me know if anything else is needed.
Comment 7 Jeff Fortin Tam 2025-07-21 19:20:19 UTC
I would guess it is similar to (or duplicate of) bug #76991 and bug #151033 ?