Bug 144611 - Image position off when changing 'to paragraph' to 'to character' back 'to paragraph' and drag the anchor
Summary: Image position off when changing 'to paragraph' to 'to character' back 'to pa...
Status: RESOLVED NOTABUG
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:
Whiteboard:
Keywords:
: 132819 (view as bug list)
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2021-09-19 18:16 UTC by Telesto
Modified: 2021-10-15 09:32 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (93.10 KB, application/vnd.oasis.opendocument.text)
2021-09-19 18:17 UTC, Telesto
Details
Example of opposite (changing from 'to paragraph' to 'to character') (92.98 KB, application/vnd.oasis.opendocument.text)
2021-09-19 18:23 UTC, Telesto
Details
Anchor lacking relative size to anchor (92.95 KB, application/vnd.oasis.opendocument.text)
2021-10-04 17:42 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-09-19 18:16:54 UTC
Description:
Image position off when changing 'to paragraph' to 'to character' back 'to paragraph' and drag the anchor

Steps to Reproduce:
1. open the attached file
2. Select the image
3. Change anchor to 'to paragraph'
4. Change it back to 'to character'
5. Change it again to 'to paragraph'
6. Drag the anchor up to first paragraph

Actual Results:
Image goes the left corner

Expected Results:
Should work similar to Step 3


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: d5e55d204b71710eb5eb5d2c683dd6698626df3c
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
Comment 1 Telesto 2021-09-19 18:17:34 UTC
Created attachment 175124 [details]
Example file
Comment 2 Telesto 2021-09-19 18:20:51 UTC
STR to long:
1. open the attached file
2. Select the image
3. Change anchor to 'to paragraph'
4. Drag the anchor up to first paragraph -> Notice the mess

5. File -> reload
6. Change anchor to 'to paragraph'
7. Save
8. File -> reload
9. Drag the anchor up to first paragraph -> Expected
Comment 3 Telesto 2021-09-19 18:21:20 UTC
Also in
4.4.7.2
Comment 4 Telesto 2021-09-19 18:23:18 UTC
Created attachment 175125 [details]
Example of opposite (changing from 'to paragraph' to 'to character')
Comment 5 Dieter 2021-10-04 07:34:37 UTC
(In reply to Telesto from comment #2)
> STR to long:
> 1. open the attached file
> 2. Select the image
> 3. Change anchor to 'to paragraph'
> 4. Drag the anchor up to first paragraph -> Notice the mess
> 
> 5. File -> reload
> 6. Change anchor to 'to paragraph'
> 7. Save
> 8. File -> reload
> 9. Drag the anchor up to first paragraph -> Expected

I can't see any difference in result after step 4 and step 9. Behaviour: If you move the anchor from one paragraph to another paragraph, LO keeps the distance between anchor and image (that might be expected). If you drag the image, you can reduce or expand the distance between anchor and image. 

If this is the specific difference between dragging the anchor and dragging the image / object itself, we should add this to documentation: https://help.libreoffice.org/7.3/en-GB/text/swriter/guide/anchor_object.html?&DbPAR=WRITER&System=WIN

=> needsUXEval

Tested with
Version: 7.2.1.2 (x64) / LibreOffice Community
Build ID: 87b77fad49947c1441b67c559c339af8f3517e22
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 6 Heiko Tietze 2021-10-04 10:47:19 UTC
(In reply to Telesto from comment #2)
> Notice the mess

Image attributes remain intact and positioning follows. Don't see an issue.
Comment 7 Dieter 2021-10-04 11:24:34 UTC
(In reply to Heiko Tietze from comment #6)
> Image attributes remain intact and positioning follows. Don't see an issue.

My question to Design Team was, if the following behaviour is the expected and intendet one: If you move the anchor from one paragraph to another paragraph, LO keeps the distance between anchor and image. If you drag the image, you can reduce or expand the distance between anchor and image."
Comment 8 Telesto 2021-10-04 17:27:39 UTC
STR 
1. open the attached file
2. Select the image
3. Change anchor to 'to paragraph'
3a. Drag the anchor (not the image) to the top paragraph -> expected
4. Undo
4. Change it back to 'to character'
5. Change it again to 'to paragraph'
6. Drag the anchor up to first paragraph -> off
Comment 9 Telesto 2021-10-04 17:42:15 UTC
Created attachment 175511 [details]
Anchor lacking relative size to anchor

(In reply to Dieter from comment #7)
> (In reply to Heiko Tietze from comment #6)
> > Image attributes remain intact and positioning follows. Don't see an issue.
> 
> My question to Design Team was, if the following behaviour is the expected
> and intendet one: If you move the anchor from one paragraph to another
> paragraph, LO keeps the distance between anchor and image. If you drag the
> image, you can reduce or expand the distance between anchor and image."

LO keeps the distance between anchor & image is something what initially expected, but appears to be more complicated :-(

1. Open the attached file
2. Select the image 
3. Select the anchor (to character anchoring)
3. Drag it up line by line (so vertically) I would expect the image to consistently move up one. This isn't the case.
4. Undo everything..
5. Select the image
6. Drag the anchor for right to left (or visa versa). So horizontally. Image doesn't adapt. Which can be seen as proper behaviour; But obviously doesn't totally fit the distance between anchor & image will be kept the same model.

Hover I somewhat have tendency to say 'vertical' position should be relative. But not sure about how the layout code handles this.. 

To paragraph appears to take the distance (vertically) into account. Horizontally it doesn't, but doesn't need too (as to paragraph by definition anchored to the start of the paragraph.
Comment 10 QA Administrators 2021-10-05 04:19:34 UTC Comment hidden (obsolete)
Comment 11 Telesto 2021-10-06 14:33:51 UTC
*** Bug 132819 has been marked as a duplicate of this bug. ***
Comment 12 Telesto 2021-10-06 16:01:53 UTC
@Justin
Sorry for spamming. Here I take different approach compared to bug 132819.

Bug 132819 assumed that the image location being fixed. Moving the anchor not moving the image. 

Here the topic being that the image should move. However detecting issues (see comment 9)

* Moving anchor to character up/down down a line (so vertically) doesn't move the image proportionally; it does only work when moving to different paragraph
* Moving anchor to character left/right (so horizontally) over same line of text doesn't move the image. It does for tables (and sections)

In search for design/ logic behind all this. Which makes it possible to distinguish bugs from the expected behaviour.
Comment 13 Heiko Tietze 2021-10-07 13:14:37 UTC
This topic was on the agenda for the design meeting. One opinion is that "anchors are a wild-card, 1000 other bugs needs more attention".

To answer Dieter's question: moving the anchor changes the position of the image while moving the image changes its attributes. Your description is more precise, the workflow is flexible and reasonable

I suggest to resolve the ticket as NAB.
Comment 14 Dieter 2021-10-07 13:50:10 UTC
(In reply to Heiko Tietze from comment #13)
> To answer Dieter's question: moving the anchor changes the position of the
> image while moving the image changes its attributes. Your description is
> more precise, the workflow is flexible and reasonable

Thank you for answering my question. So I will add a new bug report in order to add that information to help page.

I agree to close it as NAB
Comment 15 Dieter 2021-10-14 15:27:09 UTC
No further comment => RESOLVED NOTABUG

I've opened bug 145135 to improve documentation
Comment 16 Ross Johnson 2021-10-15 08:41:20 UTC
(In reply to Telesto from comment #9)
> Created attachment 175511 [details]
> Anchor lacking relative size to anchor
> 
> (In reply to Dieter from comment #7)
> > (In reply to Heiko Tietze from comment #6)
> > > Image attributes remain intact and positioning follows. Don't see an issue.
> > 
> > My question to Design Team was, if the following behaviour is the expected
> > and intendet one: If you move the anchor from one paragraph to another
> > paragraph, LO keeps the distance between anchor and image. If you drag the
> > image, you can reduce or expand the distance between anchor and image."
> 
> LO keeps the distance between anchor & image is something what initially
> expected, but appears to be more complicated :-(
> 
> 1. Open the attached file
> 2. Select the image 
> 3. Select the anchor (to character anchoring)
> 3. Drag it up line by line (so vertically) I would expect the image to
> consistently move up one. This isn't the case.
> 4. Undo everything..
> 5. Select the image
> 6. Drag the anchor for right to left (or visa versa). So horizontally. Image
> doesn't adapt. Which can be seen as proper behaviour; But obviously doesn't
> totally fit the distance between anchor & image will be kept the same model.
> 
> Hover I somewhat have tendency to say 'vertical' position should be
> relative. But not sure about how the layout code handles this.. 
> 
> To paragraph appears to take the distance (vertically) into account.
> Horizontally it doesn't, but doesn't need too (as to paragraph by definition
> anchored to the start of the paragraph.

The "to character" behaviour would more correctly be described as "to paragraph containing character". The image position is relative to the start of the paragraph, not the character that the anchor is attached to. That's why you don't see it move when you move the anchor to a new position in the same paragraph (step 3).

Try it: if you move the anchor to a new paragraph the image moves to a position relative to the start of the new paragraph that is the same as it was in the old paragraph, even if the new paragraph is much shorter.

The Help page is incomplete for this but the guidebook is correct. It would be used, for example, where you have a symbol, word or phrase that the image relates to and you want it to follow the paragraph that the text is in, or relate to the new paragraph if you split or combine paragraphs.
Comment 17 Telesto 2021-10-15 09:32:14 UTC
(In reply to Ross Johnson from comment #16)
Thank for the comment.. You're description matches the experience