Bug 142381 - DOCX export: Table behind chart regression when reopen in LO (OK in MSO)
Summary: DOCX export: Table behind chart regression when reopen in LO (OK in MSO)
Status: RESOLVED DUPLICATE of bug 112313
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2021-05-19 20:32 UTC by Telesto
Modified: 2023-03-28 12:28 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (13.71 KB, application/vnd.oasis.opendocument.text)
2021-05-19 20:32 UTC, Telesto
Details
Example file compared in LO and MSO (106.23 KB, image/png)
2021-05-24 08:47 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-05-19 20:32:13 UTC
Description:
DOCX export: Table behind chart

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

Actual Results:
Table behind chart

Expected Results:
Chart above table as in ODT


Reproducible: Always


User Profile Reset: No



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

Exports fine with 4.4.7.2 (and opens OK with 7.2)
Comment 1 Telesto 2021-05-19 20:32:32 UTC
Created attachment 172178 [details]
Example file
Comment 2 Telesto 2021-05-19 20:37:19 UTC
Also found in
7.0b1

and in
Version: 6.3.7.0.0+ (x86)
Build ID: 726535ec30f12697ceccd2f0640d9371a64dc5bd
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL

not in
Version: 6.2.0.0.alpha0+
Build ID: b1d1edff4e81a8299e2a17c7e562d144329549ab
CPU threads: 4; OS: Windows 6.3; UI render: GL; 
Locale: nl-NL (nl_NL); Calc: CL
Comment 3 Harshita Nag 2021-05-20 04:07:03 UTC
When I try to reproduce it, the position of the table and chart does change, but the table doesn't go behind the chart.
Comment 4 Roman Kuznetsov 2021-05-22 08:37:23 UTC
confirm in

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: dbd4110cc36011042c98549d997daa79e8065aba
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL

but not in

Версия: 6.2.2.1 (x64)
ID сборки: fcd633fb1bf21b0a99c9acb3ad6e526437947b01
Потоков ЦП: 4; ОС:Windows 6.1; Отрисовка ИП: по умолчанию; VCL: win; 
Локаль: ru-RU (ru_RU); Язык UI: ru-RU
Calc: threaded

I bisected it in bisect-win32-6.3 repo and got

https://git.libreoffice.org/core/commit/609f82ef8a2019473c801fd6f537195b472165bc

https://gerrit.libreoffice.org/c/core/+/74737

CC: Thorsten Behrens and Vasily Melenchuk
Comment 5 Timur 2021-05-24 08:47:41 UTC
Created attachment 172284 [details]
Example file compared in LO and MSO

Bug is RT in LO, it's OK in MSO.
Bug 107628 is for DOC regression, so this one is for DOCX regression.
Comment 6 NISZ LibreOffice Team 2021-05-28 13:21:37 UTC
More like a wrapping problem than a chart one.
Comment 7 Justin L 2023-03-15 15:15:30 UTC
Yes, this looks like a fundamental difference in LO. Apparently tables are not considered in the wrapping layout? That seems strange, but it certainly looks that way.
Comment 8 Gabor Kelemen (allotropia) 2023-03-17 09:35:12 UTC
(In reply to Justin L from comment #7)
> Yes, this looks like a fundamental difference in LO. Apparently tables are
> not considered in the wrapping layout? That seems strange, but it certainly
> looks that way.

To me it looks like the table is "anchored" to the first empty paragraph, and it is not wrapped around the chart frame in odt, but it is in docx.
If you type a long word like "aaaaaa" (this is "long enough") in the docx, then the original layout is restored.
Or if you change the wrap in the odt to "Paralell" then the "wrong" layout is happening again.
Or if you just reduce the widht of the odt chart.

I think this is another manifestation of the issue described in bug 112313.
Comment 9 Justin L 2023-03-28 12:28:51 UTC
(In reply to Gabor Kelemen (allotropia) from comment #8)
So yes, there are multiple ways in which wrapping differences are being exposed.

As you mention, the first item after the chart is an empty paragraph. If that didn't get wrapped, then we wouldn't have the problem in the first place. So definitely that is the "main problem" here. I agree that this would be a duplicate of bug 112313.

However, MS Word 2010 does wrap that empty paragraph, just not the table. That is import bug 76022.

So either way, this is a duplicate of something. Since this is called an export bug, I'll mark it as a duplicate of 112313. (Note that the actual export is fine, what is missing is some kind of "I know that my settings need to be tweaked in order to look similar in a different format" translation during export - which is extremely tricky to do.

*** This bug has been marked as a duplicate of bug 112313 ***