Bug 99932 - Anchor "to Character": Anchor changes position to the document when zoom-in or out
Summary: Anchor "to Character": Anchor changes position to the document when zoom-in o...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Vasily Melenchuk (CIB)
URL:
Whiteboard: target:7.3.0 target:7.2.1
Keywords:
: 137213 141190 (view as bug list)
Depends on:
Blocks: Anchor-and-Text-Wrap Zoom
  Show dependency treegraph
 
Reported: 2016-05-18 13:40 UTC by RGB
Modified: 2021-08-11 05:33 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Short screencast portraying the problem (1.14 MB, video/mp4)
2016-05-18 13:40 UTC, RGB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RGB 2016-05-18 13:40:06 UTC
Created attachment 125152 [details]
Short screencast portraying the problem

When you anchor an object/figure "to the character" (this seems to not happen when anchoring "to the paragraph") the anchoring point behaves erratically when the page is zoomed in or out, even moving outside the page. Because it is quite difficult to describe the problem with words, just look at the attached screencast.

The figure is anchored "to the character" and its position set to the top of the text area.

NOTE: I'm using 5.1.3.2 final, but the problem was already present on previous versions, no idea since when, though.
Comment 1 Theodore Matula Jr. 2016-05-18 20:04:03 UTC
I tested anchor behavior in relation to zoom level on Windows 10 with versions 5.2.0.0 Alpha1+ and 5.1.3.2 with the same results. As you zoom out, the anchor moves to the left. As you zoom in, the anchor moves to the right. This can ause the anchor to move off the page and off the screen. I also tested this on OpenOffice 4.2.0.0 and had the same result as both LibreOffice tests, so this problem was probably inherited from OpenOffice. This problem only happens when the anchor is changed to "To Character", but not when it is "To Paragraph" or "To Page"

Steps to reproduce:
1. Open a new Writer Document
2. Insert a picture: Click Insert>Image and choose an image
3. Under a picture, write a short paragraph
4. Right click the image and click Anchor>To Character
5. Move the anchor to a character in the paragraph
6. Zoom in and out with the zoom bar on the bottom right of the screen (or hold CTRL and use the mouse wheel)

Actual Result:
Anchor moves left and right as page is zoomed out and in respectively

Expected Result:
Anchor stays on its relative position on the page.
Comment 2 raal 2016-05-19 07:39:05 UTC
confirmed in comment 1
Comment 3 QA Administrators 2017-05-22 13:40:36 UTC Comment hidden (obsolete)
Comment 4 RGB 2017-05-22 18:22:31 UTC
Still present on 5.3.3.2 and on 5.4.0.0.beta1
Comment 5 QA Administrators 2018-05-23 02:36:52 UTC Comment hidden (obsolete)
Comment 6 RGB 2018-05-23 18:37:47 UTC
Problem is still present on 6.0.4.2.
Comment 7 QA Administrators 2019-05-24 02:57:13 UTC Comment hidden (obsolete)
Comment 8 RGB 2019-05-24 09:05:24 UTC
Problem still present in 6.2.3.2.
Comment 9 Dieter 2021-04-11 11:07:58 UTC
Still present in

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 807d059d99e7b99fe45a712428befa17ffa44858
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

Steps to reproduce
1. Open attacment 166045 with a zoom level 100% => Anchor position O. K. (more or less)
2. Zoom out to 60% => Anchor reamins at the same position on screen and therefore moves out of the document
3. Change position of image (zoom level ist still 60%) => Anchor moves to the correct position
4. Zoom in to 100% => Anchor reamins at the same position on screen and therefore changes position in relation to the document

Additional information:
Doesn't happen with "Anchor to Paragraph"
Comment 10 Dieter 2021-04-11 11:10:53 UTC
Inherited from OOo (see bug 137213 comment 4)
Comment 11 Dieter 2021-04-11 11:11:28 UTC
*** Bug 137213 has been marked as a duplicate of this bug. ***
Comment 12 Dieter 2021-04-11 11:12:04 UTC
*** Bug 141190 has been marked as a duplicate of this bug. ***
Comment 13 Commit Notification 2021-08-05 16:35:25 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6e879d5f142766c941d1c3bafd17f67b78c1c9f4

tdf#99932: sw: fix for invalid anchor location for FLY_AT_CHAR mode

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2021-08-08 21:18:47 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/8fdbb8aed1b48734a717d5f98ada566de7204605

tdf#99932: sw: fix for invalid anchor location for FLY_AT_CHAR mode

It will be available in 7.2.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 BogdanB 2021-08-11 05:33:05 UTC
Verified, it's ok now. Thanks. It was a very annoying bug.
Tested in
Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: c97bdca2d7abf30a99c45192b8f49c5bf76ca035
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded