Bug 135710 - EDITING DOC: Image frame at wrong position on screen after reload and changing anchor from to character to paragraph
Summary: EDITING DOC: Image frame at wrong position on screen after reload and changin...
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: Justin L
URL:
Whiteboard: target:7.6.0
Keywords: filter:doc
Depends on:
Blocks: DOC-Frames
  Show dependency treegraph
 
Reported: 2020-08-13 12:34 UTC by Telesto
Modified: 2023-08-13 12:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-08-13 12:34:52 UTC
Description:
EDITING DOC: Image frame at wrong position on screen after changing anchor from to character to paragraph but fine after file reload

Steps to Reproduce:
1. Open attachment 164254 [details]
2. Save As DOC
3. File reload
4. Change the anchor of the image frame to "to paragraph" (image moves to first column)
5. Enable page wrap (parallel)
6. Save and reload 

Actual Results:
Image is at wrong position after changing anchor to to paragraph but gets corrected at file reload

Expected Results:
Should be on the proper position on file reload


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
7.1

4.4.7.2

and in
LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 1 Dieter 2021-03-28 09:58:25 UTC
Telesto, it seems, that nobody could confirm this bug since more than one year. So Iā€˜d like to ask, if it is still reproducible for you. Could you please try to reproduce it with a master build from http://dev-builds.libreoffice.org/daily/master/current.html? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 2 QA Administrators 2021-09-26 03:58:05 UTC Comment hidden (obsolete)
Comment 3 Telesto 2021-09-27 18:33:57 UTC
Still present
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: en-US (nl_NL); UI: en-US
Calc: CL
Comment 4 Dieter 2021-10-01 09:41:52 UTC
I confirm the problem but but step 5 from comment 0 ist not necessary.

Steps to Reproduce:
1. Open attachment 164254 [details]
2. Save As DOC
3. File reload
4. Change the anchor of the image frame to "to paragraph" (image moves to first column)
5. Save and reload 

Additional observation: It works with following steps:
1. Open attachment 164254 [details]
2. Save As DOC
3. Change the anchor of the image frame to "to paragraph"
Result: Doesn't jump to left => Problem only occurs after relaod => Changed bug summary
Comment 5 Justin L 2023-05-31 10:41:26 UTC
repro 7.6+

This is the same bug document, and similar kind of problem to bug 135709.
Comment 6 Justin L 2023-06-06 16:55:29 UTC
ODT -> To Paragraph:
-Horizontal: from left of entire paragraph area
-Vertical: center of paragraph text area

DOC -> To Paragraph:
-Horizontal: from left of entire paragraph area (same)
-Vertical: top of entire paragraph area (different - and a layout problem or invalid choice problem as well because hitting OK "fixes" the position)

I imagine that the export is coming from
            nFlags = 0x0014;        // x-rel to text,  y-rel to text
but that is rather undocumented.

DOCX also handles this situation rather poorly - it is totally messed up.

It seems like it is mainly a layout issue. However, we could "encourage" better behaviour by importing as paragraph positioning instead of character positioning by default.
Comment 7 Commit Notification 2023-06-06 19:09:28 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/45906d2dec179aa6868edd0b81ba01b2e479589c

tdf#135710 doc import:  force page center on inline images

It will be available in 7.6.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 8 Dieter 2023-08-13 12:03:27 UTC
VERIFIED with

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e25e27c85ed970cdb97c468bdac86c80964f4231
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded

Jutin, thanks for fixing it!