Bug 105261 - FILEOPEN DOCX: small vertical spacing difference with table
Summary: FILEOPEN DOCX: small vertical spacing difference with table
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
(earliest affected)
4.2 all versions
Hardware: All All
: low normal
Assignee: Not Assigned
Keywords: bibisected, bisected, filter:docx
Depends on:
Blocks: DOCX-Canvas-Shape DOCX-Floatingtable
  Show dependency treegraph
Reported: 2017-01-11 17:25 UTC by Marina Latini (SUSE)
Modified: 2021-01-11 08:34 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:

docx affected file (25.42 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-01-11 17:26 UTC, Marina Latini (SUSE)
good rendering (46.11 KB, application/pdf)
2017-01-11 17:28 UTC, Marina Latini (SUSE)
bad rendering with LibO (20.15 KB, application/pdf)
2018-01-29 08:50 UTC, Marina Latini (SUSE)
docx without wrap-around table (26.88 KB, application/vnd.ms-word.document)
2018-01-29 09:45 UTC, Timur
The reference rendering and original file in Writer master (199.18 KB, image/png)
2020-09-13 09:58 UTC, Gabor Kelemen (allotropia)
DOCX compared in MSO and oldeer and newer LO (134.70 KB, image/png)
2020-09-14 07:18 UTC, Timur

Note You need to log in before you can comment on or make changes to this bug.
Description Marina Latini (SUSE) 2017-01-11 17:25:37 UTC
bad rendering of the attached docx file.

Steps to Reproduce:
1. open the attached docx file

Actual Results:  
The formatting is completely lost

Expected Results:
The file is rendered like the attached PDF.

Reproducible: Always

User Profile Reset: Yes

Additional Info:
Tested with:

Build ID: 07ac168c60a517dba0f0d7bc7540f5afa45f0909
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: it-IT (it_IT.UTF-8); Calc: group

Build ID: 20m0(Build:3)
Thread CPU: 4; Versione SO: Linux 4.8; Resa interfaccia: predefinito; 
Versione locale: it-IT (it_IT.UTF-8); Calc: single

Build ID: 3d5603e1122f0f102b62521720ab13a38a4e0eb0
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; 
Locale: it-IT (it_IT.UTF-8); Calc: group

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2946.0 Safari/537.36
Comment 1 Marina Latini (SUSE) 2017-01-11 17:26:58 UTC
Created attachment 130321 [details]
docx affected file
Comment 2 Marina Latini (SUSE) 2017-01-11 17:28:03 UTC
Created attachment 130322 [details]
good rendering

pdf with the correct rendering
Comment 3 Marina Latini (SUSE) 2017-01-11 17:32:21 UTC Comment hidden (no-value)
Comment 4 Xisco Faulí 2017-01-11 20:31:02 UTC
Confirmed in

- Version:
Build ID: 9a30cb2161506e003f14592d83075ab9d30516c1
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

- Version:
Build ID: 2851ce5afd0f37764cbbc2c2a9a63c7adc844311
Locale: ca_ES

however the layout seems correct in

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-


Build ID: 7f4a622f9fbf27774efa908348e682df7280713b

the layout was worse than in 3.3 but better than it's nowadays.

Layout became completely messed up by:

author	Adam Co <rattles2013@gmail.com>	2013-06-26 08:08:56 (GMT)
committer	Miklos Vajna <vmiklos@suse.cz>	2013-06-28 09:43:48 (GMT)
commit 74c5ed19f430327988194cdcd6bdff09591a93fa (patch)
tree 3c13fe12ac592a1d0acb6caf273f12a1d0e15433
parent 7f4a622f9fbf27774efa908348e682df7280713b (diff)
DOCX import fix for table with auto size

Adding Cc: to Adam Co
Comment 5 QA Administrators 2018-01-12 03:30:43 UTC Comment hidden (obsolete)
Comment 6 Marina Latini (SUSE) 2018-01-29 08:48:19 UTC Comment hidden (obsolete)
Comment 7 Marina Latini (SUSE) 2018-01-29 08:50:06 UTC Comment hidden (obsolete)
Comment 8 Timur 2018-01-29 09:45:16 UTC
Created attachment 139425 [details]
docx without wrap-around table

Bad rendering is bad bug description :)
Looks like already existing wrap-around table issue, worsen with shapes around table. 
If wrap is set to None in MSO and than layout fixed, opens fine in LO.
So, looks like a duplicate to me, but since it's worsen by shapes, may remain open separately for a check should wrap-around ever be resolved.
Comment 9 Timur 2018-01-29 10:09:03 UTC
Attachment 130321 [details] also suffers from Bug 108493. 
I had to correct that in attachment 139425 [details] to have a proper look.
Comment 10 Marina Latini (SUSE) 2018-12-21 08:32:40 UTC
repro on:
Versione: (x64)
Build ID: 0412ee99e862f384c1106d0841a950c4cfaa9df1
Thread CPU: 4; SO: Windows 10.0; Resa interfaccia: GL; VCL: win; 
Versione locale: de-DE (en_US); UI-Language: it-IT
Calc: threaded
Comment 11 Gabor Kelemen (allotropia) 2020-09-13 09:58:06 UTC
Created attachment 165448 [details]
The reference rendering and original file in Writer master

Looks a lot better now in:

Build ID: 3a22f5a589e822e7ca8bbb00e38a3aff93ed7ba5
CPU threads: 16; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

from bibisect-7.1 repo. 
Same in 7.0 stable too.
Overlap of frames and tables started to get better with:


author	Miklos Vajna <vmiklos@collabora.com>	Fri Feb 14 16:29:44 2020 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	Fri Feb 14 18:37:34 2020 +0100

sw: fix handling of table vs fly overlaps in the AddVerticalFlyOffsets case
Comment 12 Timur 2020-09-14 07:18:47 UTC Comment hidden (obsolete)
Comment 13 NISZ LibreOffice Team 2020-09-14 13:55:53 UTC
(In reply to Timur from comment #12)
> Created attachment 165473 [details]
> DOCX compared in MSO and oldeer and newer LO
> As Gabor was kind to test, this is much better in 7.1+. So I set low
> priority. 
> We need to define the current problem and rename the title.

There are two minor issues left:
- The top table is floating so the two empty paragraphs before the second table (with DATA and TICKET NUMBER) are on its right in Writer and not below it like in Word.
- The rounded rectangle is actually a canvas object (in VML) containing a floating table (with Ragione Sociale Cliente) and a rounded rectangle shape. This is imported as a grouped shape containing a table frame and a shape.
Wrapping of this mess is again not the same as in Word so there is a bit less space - in form of a semi-overlapped empty paragraph - between this and the next table (TIPOLOGIA CONTRATTO)

I guess this can mostly be one more bug to the "wrapping of floating table" pile of bug #61594