Bug 141010 - Changing anchor from 'to character' to 'to paragraph' changes image position
Summary: Changing anchor from 'to character' to 'to paragraph' changes image position
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2021-03-14 08:11 UTC by Telesto
Modified: 2023-03-27 22:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (188.83 KB, application/vnd.oasis.opendocument.text)
2021-03-14 08:12 UTC, Telesto
Details
Example B (196.75 KB, application/vnd.oasis.opendocument.text)
2021-03-14 08:20 UTC, Telesto
Details
Screencast (595.69 KB, video/mp4)
2021-03-29 11:26 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-03-14 08:11:37 UTC
Description:
Changing anchor from 'to character' to 'to paragraph' changes image position 

Steps to Reproduce:
1. Open the attached file
2. Scroll to bottom & select the image
3. Change anchor to 'to paragraph'

Actual Results:
Image jumps up

Expected Results:
Should stay put


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: dc3b64dcbfb0a49c0be65bd8d73ed4e6d3828a21
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-03-14 08:12:16 UTC
Created attachment 170468 [details]
Example file
Comment 2 Telesto 2021-03-14 08:12:45 UTC
Source example: attachment 163774 [details]
Comment 3 Telesto 2021-03-14 08:18:58 UTC
Broken in
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL

Still OK (or more in line with expected with)
Version: 4.3.7.2
Build ID: 8a35821d8636a03b8bf4e15b48f59794652c68ba
Comment 4 Telesto 2021-03-14 08:20:22 UTC
Created attachment 170470 [details]
Example B

Example B doing the same thing, but also present in 4.3

and in
LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 5 Dieter 2021-03-29 06:01:31 UTC
I can't confirm it with

Version: 7.1.2.2 (x64) / LibreOffice Community
Build ID: 8a45595d069ef5570103caea1b71cc9d82b2aae4
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 6 Telesto 2021-03-29 11:26:55 UTC
Created attachment 170809 [details]
Screencast

(In reply to Telesto from comment #4)
> Created attachment 170470 [details]
> Example B
> 
> Example B doing the same thing, but also present in 4.3
> 
> and in
> LibreOffice 3.5.0rc3 
> Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: f96004096268f5e71120678e32fc8c74055819aa
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 7 Dieter 2021-03-29 16:31:37 UTC
I can reproduce it, if I only change Afbeelding3. But if I change Afbeelding1 and Afbeelding2 before, the problem doesn't occur. 

Version: 7.1.2.2 (x64) / LibreOffice Community
Build ID: 8a45595d069ef5570103caea1b71cc9d82b2aae4
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

So it's not a general problem but a specific one. Can you narrow down the problem?
Comment 8 Telesto 2021-03-29 17:49:41 UTC
@NISZ @Dieter (In reply to Dieter from comment #7)
> So it's not a general problem but a specific one. Can you narrow down the
> problem?

The 'to character' of afbeelding3 position above afbeelding2. After anchor to "to paragraph" the 'to paragraph' snaps to paragraph below causing a shift

I think the position is defined relative to anchor. And if the anchor goes to different spot, the image will go to. Kind of similar to the sync of image frame & image. 

But that's my vision; the people at NISZ are better capable to explain what's happening here. 

I personally dislike a anchor change affecting position. But the method used to define the anchor position is already big mystery box to me. Does different between objects (I think). Have plenty of bugs open for that in the image anchor meta topic (mostly in consternation of page loops)

Surely needs someone with lots of expertise. As this touches to whole text image distribution across pages. Whereas page rendering is kind of critical. So surely lots of fun to solve :-). Currently only see László Németh or Michael Stahl being able to do this (and maybe Miklos, but haven't seen him do this type of changes in a while). Note: maybe under-estimating the capability's of other NISZ developers (so my 2 cents who might look at this some day, some year)

However as this is apparently a regression (I don't recall), it might be caused by commit of Luboš Luňák (bibisected multiple to him which are "similar")
Comment 9 Buovjaga 2022-03-17 14:37:25 UTC
(In reply to Telesto from comment #1)
> Created attachment 170468 [details]
> Example file

Repro with Linux 43max, 42max, 41max, 43all, so it's not a regression.

Not changing status as it seems a discussion needs to be had.

Arch Linux 64-bit
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 71b952340726190d1f178ef0dadfa89677f2c1dd
CPU threads: 8; OS: Linux 5.16; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 17 March 2022
Comment 10 Justin L 2023-03-27 22:13:48 UTC
There aren't really paragraphs in this example. Specifically, the paragraph starts on a different page than what the image is anchored on. That is a somewhat meaningless situation to switch to.