Bug 142849 - FILEOPEN ODT->DOCX: Image partly off page on file open b/c no DOCX equivalent to bottom of paragraph area (comment 6)
Summary: FILEOPEN ODT->DOCX: Image partly off page on file open b/c no DOCX equivalent...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.0 alpha1+
Hardware: All All
: lowest normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
: 142855 (view as bug list)
Depends on:
Blocks: DOCX-Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2021-06-14 13:09 UTC by Telesto
Modified: 2023-09-11 19:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (986.44 KB, application/vnd.oasis.opendocument.text)
2021-06-15 07:15 UTC, Telesto
Details
Bibisectlog (2.25 KB, text/plain)
2021-06-15 12:59 UTC, Telesto
Details
The original document and its docx version in Writer (318.39 KB, image/png)
2021-06-16 07:31 UTC, NISZ LibreOffice Team
Details
The original document and its docx version in Word (368.07 KB, image/png)
2021-06-16 07:35 UTC, NISZ LibreOffice Team
Details
Docx version of the original document (919.51 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-06-16 07:35 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-06-14 13:09:40 UTC
Description:
FILEOPEN DOCX: Image partly off page on file open

Steps to Reproduce:
1. Open the attached file
2. Save to DOCX
3. File reload

Actual Results:
Image moves to top of the page

Expected Results:
The old situation wasn't perfect (1-1 with ODT), but surely better compared to current


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 239b4bb27fd8db26e8416045b3015688a8b1b0ae
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

not in
Version: 7.1.0.0.beta1+ (x64)
Build ID: f9fab4203c1aa0b9a3f27ce2713b6d5addc7df19
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: CL
Comment 1 Roman Kuznetsov 2021-06-14 18:39:16 UTC Comment hidden (obsolete)
Comment 2 Telesto 2021-06-15 07:15:21 UTC
Created attachment 172889 [details]
Example file
Comment 3 Telesto 2021-06-15 07:16:18 UTC Comment hidden (no-value)
Comment 4 Telesto 2021-06-15 12:59:36 UTC
Created attachment 172918 [details]
Bibisectlog

Bisected to:
author	Miklos Vajna <vmiklos@collabora.com>	2021-05-26 11:56:04 +0200
committer	Miklos Vajna <vmiklos@collabora.com>	2021-05-26 13:29:12 +0200
commit 2f21e4f357ec60450df84ddd858c3cf0a4711b02 (patch)
tree e422784a36b1f34ef25b1d42738e8c8119db2caa
parent 9ac3b599e65669380ab346cb2bb135a6edc3273a (diff)
tdf#139915 DOCX import: fix anchored obj position with to-char and TEXT_LINE
There were multiple problems here:

- commit 8f1a1092d47947847e1d888b0284e8364c663d1f (tdf#97371 DOCX
import: fix text covered by shape, 2016-01-28) disabled to-char
anchoring for TEXT_LINE (e.g. "alignment top, relative to line") because
changing the anchor type of a TextBox could not be changed, but this has
been implemented in sw/ in the meantime, so it can be dropped

- Now that the anchor type is to-char, we can set the vertical relation
to TEXT_LINE, but Word's positive value is "below line", and ours mean
"towards the top of the page, from the bottom of the line", so we need
to drop the workaround of commit 3303a4c5f21874453e634d84408c50e7a0055a4d (tdf#135153 DOCX import: avoid
line-of-text relation with to-para anchoring, 2021-01-18)

Once these are in place, we can fix the remaining problem by inverting
the vertical position of the shape, which instantly fixes the
overlapping textboxes in the bugdoc.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=2f21e4f357ec60450df84ddd858c3cf0a4711b02
Comment 5 Telesto 2021-06-15 13:03:29 UTC
@NISZ
As this might be related to bug 117692
Comment 6 NISZ LibreOffice Team 2021-06-16 07:25:58 UTC
This is mostly the same as bug #142855

Here the caption frame has the captioned image in it, in bug #142855 that was removed.
But the vertical alignment is incorrectly read back as Top to line instead of Bottom to line.
Funny thing is that even in Word the shape appears above the very first paragraph, juts like in Writer, but with the vertical alignment read correctly as below line.

There is also something else, that I don't see yet. Even if I manually change the vertical alignment the result is not the same as before: 
Originally the frame is below paragraph A.1. but after changing the vertical alignment to below line it appears above A.1.

Let's keep this one open about this latter mystery.
Comment 7 NISZ LibreOffice Team 2021-06-16 07:31:59 UTC
Created attachment 172931 [details]
The original document and its docx version in Writer
Comment 8 NISZ LibreOffice Team 2021-06-16 07:35:01 UTC
Created attachment 172932 [details]
The original document and its docx version in Word
Comment 9 NISZ LibreOffice Team 2021-06-16 07:35:47 UTC
Created attachment 172933 [details]
Docx version of the original document

Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 93a3e2f86c27b06062708fe788963a0e49f3a90b
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL
Comment 10 Justin L 2023-09-11 16:54:33 UTC
This is basically an INVALID bug report. The caption frame is vertically anchored to the BOTTOM of the paragraph area. DOCX doesn't have such strange choices. If you change the ODT to anchor to the TOP, then everything works as expected.
Comment 11 Justin L 2023-09-11 19:54:45 UTC
*** Bug 142855 has been marked as a duplicate of this bug. ***