Bug 159827 - Formatting: moving an anchored images makes the text reflow around the image, not the anchor.
Summary: Formatting: moving an anchored images makes the text reflow around the image,...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-21 18:18 UTC by Richard Neill
Modified: 2024-02-22 15:12 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
PNG is in the wrong place (54.28 KB, image/png)
2024-02-21 18:20 UTC, Richard Neill
Details
This is with the text reflowed to the wrong-place (54.01 KB, image/png)
2024-02-21 18:27 UTC, Richard Neill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Neill 2024-02-21 18:18:57 UTC
Description:
When inserting an image, it's very difficult to place it in the right place in a document. While the anchor sits in the right place, the image isn't "in front of the document, on the layer above" but within the flow of the text. So, as we move the image around, the text unexpectedly reflows. See screenshots.

Steps to Reproduce:
Consider a simple document where I have:

SIGNED:   [signature goes here]
NAME:     Richard Neill

I insert a signature PNG and anchor it next to the word signed. 

I then try to move the image to be in the right place in the document.

Actual Results:
The image "won't go" where I want it, but is offset to the right.
If I drag the image into the right place, then the text jumps around!
See screenshots:

1. wrong-place.png - this is when I insert the image before moving it. The PNG starts out too far to the right.

2. wrong-text.png - this is what happens after I drag the PNG to the place I want it to be - but the word "Signed:" has now jumped to the right.

Expected Results:
I should be able to place the image close to the anchor point but on a z-layer that is "in front" of the text.




Reproducible: Always


User Profile Reset: Yes

Additional Info:
It doesn't matter whether I anchor it To Character or Paragraph, this behaviour is the same. There is no permutation of moves and settings I can find which doesn't have this issue.  Thanks for your help and time.
Comment 1 Richard Neill 2024-02-21 18:20:25 UTC
Created attachment 192694 [details]
PNG is in the wrong place

This is what happens immediately after inserting the image.
It's not where I want it (which is fine; I expect to move it to the left).
But the text is correctly positioned.
Comment 2 Richard Neill 2024-02-21 18:27:32 UTC
Created attachment 192695 [details]
This is with the text reflowed to the wrong-place

I've now tried to drag the image where I want it. That's fine, but the text (the word "Signed" has now jumped to the right. I didn't move the text. 

There's no way to get this to line up nicely to look like:

Signed:   [PNG here]
Name:      My name.


Here's what I think should happen, as a mental picture of the physical interface.

(a) The bottom layer is my main text document.
(b) The top layer is a 2cm x 1cm scrap of paper.
(c) an elastic band connects (a) to (b). 
(d) the left-hand end of the elastic is pinned to the main document by the anchor.
(e) the right hand of the elastic is free to move, when I move (b).

So dragging the PNG should be able to move it anywhere I want, while the word "Signed:", and the anchor point should not move.
Comment 3 m_a_riosv 2024-02-21 21:26:24 UTC
Maybe you need to set up properly the 'Wrap' option.
Comment 4 Richard Neill 2024-02-22 00:22:44 UTC
Thanks for your help in comment #3 - that's really helpful.

Yes, you're right, that setting "Wrap = Through" (in the context menu) does what I want. But I still contend that there's a significant usability bug here.

1. The default option ("Wrap = Optimal") does the wrong (imho) thing.

2. The correct option ("Wrap = Through") doesn't persist if I insert another image. Not even in the same document, let alone as a preference.

3. The Arrange => Bring to Front option does nothing.

4. This "wrap = through" option is, I think, rather non-intuitive and non-discoverable. I say this as a LibreOffice user since 1997, and a professional software engineer who had never known about this till today. If I missed this, it's a fair chance that most newer users have also missed it.

Consider: 
I'm not trying to "wrap the text around the image", I'm trying to "paste the image on top of (not into) of the text, without the text jumping around".

Might I suggest two possible resolutions:

(i)  set Wrap = Through as the default, or
(ii) change the context menu from "Wrap" to "Wrap text/image"

the latter will at least make the behaviour more discoverable.

Thanks - Richard
Comment 5 m_a_riosv 2024-02-22 15:12:56 UTC
If you want to suggest, open a new report as enhancement.