Bug 130079 - Rotated image cannot be moved to margin of page, if it is anchored as character
Summary: Rotated image cannot be moved to margin of page, if it is anchored as character
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Writer-Images Regress-Rotated-Images
  Show dependency treegraph
 
Reported: 2020-01-19 12:52 UTC by Marcus
Modified: 2024-01-29 10:01 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file (2.00 MB, application/vnd.oasis.opendocument.text)
2020-01-20 21:04 UTC, Marcus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus 2020-01-19 12:52:16 UTC
Description:
If you insert an image (e.g. from a png file) into a page and rotate it by +/-90 degrees it seems that the original size/orientation is maintained to determine how far the image can be moved on the page. E.g. an image with portrait orientation becomes landscape after rotating by 90° but you cannot move it to the actual top or bottom of the page (but you may move it to a place exceeding the left/right limits of the page).

Steps to Reproduce:
1. Open new writer document
2. Insert an image with preferably "drastic" portrait orientation (ratio 1x2)
3. Rotate by 90°
4. Try to move image to the bottom right of the page

Actual Results:
The image may get positioned too far on the right thereby exceeding the page BUT the image can not get moved to the actual bottom. 

Expected Results:
Image can get moved to the actual bottom right of the page without exceeding the page's print margins.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
The original size/orientation seems to be used for calculating how far the image can be moved. This bug has been around many years and bothers me time and again.
Comment 1 Dieudonne Dukuzumuremyi 2020-01-19 21:18:02 UTC
Description:

I tried the same steps but it looks the same as yours.
Let's try in different version and see what will happen

Steps to Reproduce:
1. Open new writer document
2. Insert an image with preferably "drastic" portrait orientation
3. Rotate by 90°
4. Move the image to the bottom right of the page

Actual Results:
The image become positioned a bit far on the right and cannot move on the bottom. 

Expected Results:
Image could move to the bottom right of the page in the right margin.
Comment 2 Dieter 2020-01-20 20:53:59 UTC
I confirm it with

Version: 6.5.0.0.alpha0+ (x64)
Build ID: 350d25da375f221edfa37309324ce3c68cf297ef
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded

Additional information: It works, if you anchor it to page.
Comment 3 Marcus 2020-01-20 21:02:53 UTC
Thanks for checking and your remark!

I just tested again using 6.3.4.2 using an image with height 16cm and width 5cm which I rotated clockwise 90°.

Anchoring to the page does help regarding left/right/top of the page. Which is actually amazing given that: But still the image cannot be placed on the bottom of the page. 

The dotted border can be dragged to the bottom (and will stop there correctly so the page is taken into account somehow). But once I release the mouse button the image snaps back to a position about 5.5cm from the bottom. This is exactly the space that would be required to place the image at the bottom if it still was in original orientation.
Comment 4 Marcus 2020-01-20 21:04:24 UTC
Created attachment 157278 [details]
Test file
Comment 5 Lukas 2020-10-27 09:47:24 UTC
This Bug unluckily still exists on the newest Dev version 7.1 alpha1
Fixing annoying bugs should have more priority than new features or UI improvements. But I haven't got the permissions to raise the importance.
Comment 6 Gabor Kelemen (allotropia) 2022-03-07 11:39:00 UTC
This behavior started in 6.0 with

https://git.libreoffice.org/core/+/6675e6eaf999de94d49d7644d5877537fda83239

author	Armin Le Grand <Armin.Le.Grand@cib.de>	Thu Nov 02 18:28:04 2017 +0100
committer	Armin Le Grand <Armin.Le.Grand@cib.de>	Sat Nov 18 13:07:43 2017 +0100

RotateFlyFrame3: Initial support added

Before this the newly inserted image (anchored to paragraph) could be positioned to the edge of the paper. Also the example file has a page anchored + rotated image that can not be positioned to the very bottom of the page, this behavior also started with the above commit.
In recent versions the default anchoring of inserted images is To character, those started to behave incorrectly with the above commit when rotated: now they can not be aligned to the page borders AND their height/width scales are getting changed with each move. This is differently bad.

Adding CC to: Armin Le Grand
Comment 7 Romain Bazile 2022-06-10 12:09:34 UTC
I can confirm this still exists too.

This is probably a duplicate of 115934 (and 124498 is probably linked to this too).
Comment 8 Thorsten Behrens (allotropia) 2024-01-29 10:01:40 UTC
Un-Ccing developer for the moment, old regression & very high workload.