Bug 139232 - Image to the right of other object does not move freely, sticks to right margin
Summary: Image to the right of other object does not move freely, sticks to right margin
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/positio...
Whiteboard:
Keywords: bibisected, bisected, regression
: 135003 139423 161055 (view as bug list)
Depends on:
Blocks: Anchor-and-Text-Wrap Writer-Images
  Show dependency treegraph
 
Reported: 2020-12-25 17:55 UTC by Telesto
Modified: 2024-05-30 01:30 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Bibisect log (4.00 KB, text/plain)
2020-12-25 21:37 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-12-25 17:55:14 UTC
Description:
Image refuses moving or jumps to unexpected position when attempting to move the image with arrow keys

Steps to Reproduce:
Created attachment 168488 [details]
1. Select image with green border and press arrow up (jump)
2. CTRL+Z
3. Select the image with red border and press arrow left (nothing happens)

Actual Results:
Jumps or refuses

Expected Results:
Should work more smooth (like 4.3


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 7.2.0.0.alpha0+ (x64)
Build ID: 315c7570c4a72f4c834086082825533b1e50d1bf
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

and in
4.4.7.2

but not in
Version: 4.3.0.4
Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0
Comment 1 Telesto 2020-12-25 21:37:37 UTC
Created attachment 168492 [details]
Bibisect log

Bisected to:

author	Luboš Luňák <l.lunak@collabora.com>	2014-08-07 21:24:01 +0200
committer	Luboš Luňák <l.lunak@collabora.com>	2014-08-07 21:46:51 +0200
commit 3c873206a9450058a11ab87cab5942d319c75c82 (patch)
tree 080f74b74ea9cf7c239294235747dca531c5faba
parent 5554be7f4cddcfeb450bfe41d0b588c8e8f6de76 (diff)
fix picture jumping to incorrect X position after dragging
If a picture anchored to character is dragged vertically, it can actually
jump to the left, even though X should stay the same. This change
basically reverts part of 5ddd93f4f90b3627a0ba63b62a5367c5e6c112a1.
I haven't figured out how this GetBaseOfstForFly() actually works, but
I'm reasonably sure that the relative X offset introduced by it
in SwFlyAtCntFrm::SetAbsPos() is not undone anywhere in SwFlyFrm::ChgRelPos()
or otherwise acted upon, it simply causes relative X position change, even though
the absolute position remained the same.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=3c873206a9450058a11ab87cab5942d319c75c82
Comment 2 Dieter 2021-01-28 07:17:17 UTC
Anchor of image with green border is "To Paragraph"; anchor of amage with red border ist "To Character". If you change both anchors to "To Page" arrow keys work perfect. Anchors are the same in LO 4.3 (I can't test)?

So I think we have differ between the characters and might have different expected results.

Expected result for images with anchor to paragraph:
UP / Down moves anchor one paragraph up / down (not sure about left / right arrow)

Expected result for images with anchor to character
Left / Right moves anchor one character left / right
Up / Down moves anchor one line up / down

cc: Luboš Luňák, because of comment 1
Comment 3 Jean-Baptiste Faure 2022-05-05 17:27:40 UTC
The problem is linked to the position and the wrap option of the first image, the one without colored border. If you move the first image down, then you can move both other images with the four arrow keys. If you change the wrap option of the first image from optimal to none, then you can move both other image with the four arrow keys.

I think there is some contradictory constraints with the three images with wrap set to optimal and anchored to the same paragraph.

Not sure if there is a bug there.

Best regards. JBF
Comment 4 Stéphane Guillou (stragu) 2023-10-24 14:19:18 UTC
Definitely a regression here. In OOo 3.3 and LO 4.3.0.1, both images would react to arrow presses, in the right direction and with a sensible jump size.

In a current trunk build, as described by Telesto:
- arrow up (or down) on green picture jumps to right edge
- arrow left on red picture does not move

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fd69b546ad36452560cb11ccb28e78632d65f045
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 5 Stéphane Guillou (stragu) 2024-05-29 12:14:44 UTC
*** Bug 161055 has been marked as a duplicate of this bug. ***
Comment 6 Stéphane Guillou (stragu) 2024-05-29 12:17:28 UTC
*** Bug 139423 has been marked as a duplicate of this bug. ***
Comment 7 Stéphane Guillou (stragu) 2024-05-29 12:23:58 UTC
Since testing duplicate bug 161055, here's some observations:

- Happens with both anchored To Paragraph and To Character;
- Happens in both DOCX and ODT;
- Dropping the right-hand-side image over the width of the left-hand-side image does move it somewhat to the left;
- Moving the left-hand-side image away from the left margin (and making sure some text _can_ go to the left of that image, e.g. by using a parallel wrap) resolves the issue: the anchor of the right-hand-side image is shown on the left margin while dragging it.

Reproduced in recent trunk build:

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: b860aea9d6f8ac46f6d2575ead25337495ec9a88
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 8 Stéphane Guillou (stragu) 2024-05-29 12:27:29 UTC
Also happens if another object if on the left, e.g. a shape.
Comment 9 Stéphane Guillou (stragu) 2024-05-30 01:25:26 UTC
*** Bug 135003 has been marked as a duplicate of this bug. ***