Bug 84385 - Object attribute "keep aspect ratio" ignored when resizing with handles
Summary: Object attribute "keep aspect ratio" ignored when resizing with handles
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
: 160752 (view as bug list)
Depends on:
Blocks: Object
  Show dependency treegraph
Reported: 2014-09-27 05:31 UTC by Yousuf Philips (jay) (retired)
Modified: 2024-05-07 07:21 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

Sample DOCX showing "keep ratio" property lost on import (49.67 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-09-28 18:02 UTC, Luke

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-09-27 05:31:49 UTC
1) Open Writer
2) Draw an object like a circle or rectangle
3) right-click > Position and size
4) Check 'keep ratio' and press OK
5) Resize object

Result - ratio not preserved when resizing object

Workaround - resize with the mouse holding shift

Tested in 3.3.0 and master on Linux.
Comment 1 Luke 2014-09-28 01:52:33 UTC
Samuel, could you please take a look at this?

When 'keep ratio' is checked, resizing by dragging the corner should keep the ratio locked. When it's unchecked, dragging should not preserve the ratio. 

Holding down shift should reverse this behavior. This is how other office suites work like Kingsoft Office.
Comment 2 Luke 2014-09-28 04:24:16 UTC
The checkbox in MS Word 2013 "Position and Size" -> 'lock ratio' is also respected when resizing. Pressing shift also reverse the behavior. Ignoring this parameter is clearly a bug.
Comment 3 Samuel Mehrbrodt (allotropia) 2014-09-28 09:29:32 UTC
I think this checkbox is only valid when you enter the width/height manually in the text entries above the checkbox.

When you resize with the mouse, you can keep the aspect ratio by holding shift.

Maybe this checkbox should be made like it is in GIMP: https://www.packtpub.com/sites/default/files/Article-Images/2022_04_02.png
Comment 4 Luke 2014-09-28 18:02:12 UTC
Created attachment 107017 [details]
Sample DOCX showing "keep ratio" property lost on import

I understand LO is using "keep ratio" as a UI element in the dialog. However, from a user's prospective when a picture has a property "keep ratio", he expects the application to respect that property. This is how all of the other office suites behave and the logical behavior. 

I understand it may not be easy to fix, but addressing it would give us
1) more intuitive UI
2) better interoperability

For example in the attached file, the aspect ratio properties are lost on import into Writer, but Word remembers them between saves.
Comment 5 Luke 2014-09-30 17:50:13 UTC
In an offline discussion about the required changes in the ODF spec to implement this, Miklos said, 

First step is to have an implementation for the new attribute in our
loext namespace.

Comment 6 Yousuf Philips (jay) (retired) 2014-09-30 20:11:03 UTC
I doubt this needs to be implemented in ODF, the same way as when images now scale proportionately. It should also be noted that the checkbox does also appear in the side.
Comment 7 Luke 2014-10-01 16:19:37 UTC
Did you try using the attached doc in either Kingsoft Writer or Word? When resized by dragging, one image scales proportionally, while the other does not. This is because "keep ratio" is part of the doc/docx spec and other office suites respect it's value. 

Are you saying that this information should be discarded between saves? Or only remember the "keep ratio" parameter when saved in .docx format? Currently, without actually being associated with the underlying image, "keep ratio" is just a confusing UI element.
Comment 8 Joey Reid 2014-10-04 07:47:09 UTC
Doing it like GIMP would be a bad choice. GIMP's UI is setup that way because it's only keeping track of one image per document. If you have multiple images per document, it should be done the way MS Word does it.
Comment 9 QA Administrators 2015-10-14 19:57:37 UTC Comment hidden (obsolete)
Comment 10 Luke 2015-10-14 20:37:48 UTC
Very confusing UI and still an issue with 
Build ID: f830600ece806ec365a4839e79afabe183c5e36d
Comment 11 QA Administrators 2016-11-08 11:24:48 UTC Comment hidden (obsolete)
Comment 12 Luke 2017-04-03 03:54:24 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2018-04-06 02:40:48 UTC Comment hidden (obsolete)
Comment 14 Luke 2018-04-06 04:10:53 UTC
No support for this feature in 6.0
Comment 15 Stéphane Guillou (stragu) 2023-03-29 15:33:31 UTC
Reproduced with a shape in:

Version: (X86_64) / LibreOffice Community
Build ID: 002f941ec20e594e9702c39fab9cf9f4cc392dab
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Even more confusing to the user when the sidebar (Properties deck > Position and Size section) has the option ticked, but the handles still resize freely.
Comment 16 Heiko Tietze 2024-05-07 07:17:52 UTC
*** Bug 160752 has been marked as a duplicate of this bug. ***