Bug 117982 - FILEOPEN DOCX: Text in a table is invisible due to spacing and row height - see Comment 12
Summary: FILEOPEN DOCX: Text in a table is invisible due to spacing and row height - s...
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: Attila Bakos (NISZ)
URL:
Whiteboard: target:6.5.0 target:6.4.0.1
Keywords:
Depends on:
Blocks: DOCX-Tables
  Show dependency treegraph
 
Reported: 2018-06-03 15:23 UTC by Jack
Modified: 2020-01-21 12:58 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
The file which content isn't rendered properly (11.35 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-06-03 15:25 UTC, Jack
Details
The file previewed on Google Drive (76.31 KB, image/png)
2018-06-03 15:26 UTC, Jack
Details
Microsoft Word Paragraph Properties (26.38 KB, image/png)
2018-06-04 11:52 UTC, Jack
Details
Microsoft Word Table Properties (15.88 KB, image/png)
2018-06-04 11:53 UTC, Jack
Details
Example document from Word showing different spacing options with fixed table row height (11.77 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-10-02 13:12 UTC, NISZ LibreOffice Team
Details
Example document from Writer showing different spacing options with fixed table row height (10.24 KB, application/vnd.oasis.opendocument.text)
2019-10-02 13:12 UTC, NISZ LibreOffice Team
Details
The two example documents side by side in Word and Writer (138.20 KB, image/png)
2019-10-02 13:16 UTC, NISZ LibreOffice Team
Details
TheOriginalSampleWithTheFix (159.22 KB, image/png)
2019-12-04 07:22 UTC, Attila Bakos (NISZ)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2018-06-03 15:23:43 UTC
Description:
I have created a .docx document using Microsoft Word. LibreOffice can mostly read the file properly, except for some incorrect formatting. However, a certain table shows up completely blank.
Google Docs preview shows the table correctly.
I tried this on LibreOffice 5.2.2.2 and 6.0.4.2.

Steps to Reproduce:
The mentioned document is attached

Actual Results:  
The table is empty

Expected Results:
The table is not empty


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36
Comment 1 Jack 2018-06-03 15:25:49 UTC
Created attachment 142494 [details]
The file which content isn't rendered properly
Comment 2 Jack 2018-06-03 15:26:48 UTC
Created attachment 142495 [details]
The file previewed on Google Drive
Comment 3 Jean-Baptiste Faure 2018-06-03 16:56:54 UTC Comment hidden (obsolete)
Comment 4 Jack 2018-06-03 17:41:54 UTC
(In reply to Jean-Baptiste Faure from comment #3)
> Table is not empty in LibreOffice: select the table > right click > Size >
> Optimal row height.
> 
> Best regards. JBF

Thanks for your reply. I still believe it's a bug though.
I don't think you should need to modify a document to view it properly when other viewers/editors (Word and Google Docs) have no issues dealing with it.
Comment 5 Dieter 2018-06-03 19:36:53 UTC
I confirm it with

Version: 6.1.0.0.beta1 (x64)
Build ID: 8c76dfe1284e211954c30f219b3a38dcdd82f8a0
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: en-US (de_DE); Calc: CL


Row height is 0,6 cm. I found tow ways to make text visibla
a) Change Row height to 0,7cm.
b) Change paragraph spacing to 0cm.

I assume, that either the row height or the paragraph spacing is different from from the settings in the original doc-file. Jack, can you give informations about it? This would narrow down the problem.
Comment 6 Dieter 2018-06-03 20:02:18 UTC
Also reproducible in

Version: 4.4.7.2
Build-ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Gebietsschema: de_DE
Comment 7 m_a_riosv 2018-06-04 00:39:03 UTC
With a clear direct formatting the text is show, but inside the table I see a cursor with a half size not with the letter size.

Looks the issue is with the space below the paragraph.
Comment 8 Jack 2018-06-04 11:50:55 UTC
From Microsoft Word:
Paragraph spacing: Before = 0 pt, After = 17 pt
Line spacing: At least 16.8 pt
Row height: 0.24"

I attached a snapshot of the properties.
Comment 9 Jack 2018-06-04 11:52:23 UTC
Created attachment 142512 [details]
Microsoft Word Paragraph Properties
Comment 10 Jack 2018-06-04 11:53:12 UTC
Created attachment 142513 [details]
Microsoft Word Table Properties
Comment 11 Justin L 2018-09-08 16:34:38 UTC
This might be related to bug 13014 which exhibits a similar problem of not showing content in a table, likely due to spacing.
Comment 12 NISZ LibreOffice Team 2019-10-02 13:09:10 UTC
What we see in Word that there is a fixed row height set to 0.6 cm, and a below paragraph spacing of 17 pt. Also there "At least" 16.8 pt line spacing. 
All these settings are read and applied correctly in current master.

However the fixed row height matches the below paragraph spacing as 0.6 cm is 17 pt. 
Word ignores this and displays the content without the spacing after. Reducing the spacing after in Writer to 15 pt or lower shows the content.
Comment 13 NISZ LibreOffice Team 2019-10-02 13:12:26 UTC
Created attachment 154704 [details]
Example document from Word showing different spacing options with fixed table row height
Comment 14 NISZ LibreOffice Team 2019-10-02 13:12:53 UTC
Created attachment 154705 [details]
Example document from Writer showing different spacing options with fixed table row height
Comment 15 NISZ LibreOffice Team 2019-10-02 13:16:50 UTC
Created attachment 154707 [details]
The two example documents side by side in Word and Writer

This is really a difference in behavior of the two software:
If Word has only a 'spacing after' set which is greater than the fixed row height, then it ignores it. 
If it has 'spacing before' set which is greater than the fixed row height, or both before/after, then it considers it and hides the text.

Writer on the other hand 'hides' the text in every case, since that's what the user asked.
Comment 16 Commit Notification 2019-12-04 06:13:30 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5ac21d46f25023e4c8440aa45c6d923eaa4a925b

tdf#117982 Writer: fix invisible cell content due to spacing

It will be available in 6.5.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 17 Attila Bakos (NISZ) 2019-12-04 07:22:08 UTC
Created attachment 156282 [details]
TheOriginalSampleWithTheFix
Comment 18 Xisco Faulí 2019-12-04 16:45:59 UTC
Verified in

Version: 6.5.0.0.alpha0+
Build ID: 8f7010eb47119a2428b77f5d79fc8577d9914958
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@László Németh, thanks for fixing this issue!
Comment 19 Xisco Faulí 2019-12-04 16:48:05 UTC
also reproduced in

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 20 Commit Notification 2019-12-16 15:30:51 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/c0e80a015ba4bd18c64496020f596dc491014b0b

tdf#117982 Writer: fix invisible cell content due to spacing

It will be available in 6.4.0.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 21 László Németh 2020-01-20 13:33:45 UTC
(In reply to Xisco Faulí from comment #18)
> Verified in
> 
> Version: 6.5.0.0.alpha0+
> Build ID: 8f7010eb47119a2428b77f5d79fc8577d9914958
> CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
> Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
> Calc: threaded
> 
> @László Németh, thanks for fixing this issue!

@Xisco: Attila Bakos fixed the issue, but unfortunately, I've stolen his patch unintentionally. Sorry for it. Attila, thanks for the fix!
Comment 22 Attila Bakos (NISZ) 2020-01-21 12:56:52 UTC
(In reply to László Németh from comment #21)
> (In reply to Xisco Faulí from comment #18)
> > Verified in
> > 
> > Version: 6.5.0.0.alpha0+
> > Build ID: 8f7010eb47119a2428b77f5d79fc8577d9914958
> > CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
> > Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
> > Calc: threaded
> > 
> > @László Németh, thanks for fixing this issue!
> 
> @Xisco: Attila Bakos fixed the issue, but unfortunately, I've stolen his
> patch unintentionally. Sorry for it. Attila, thanks for the fix!

Never mind. The important thing is: it works fine, isn't it? ;)
Comment 23 Xisco Faulí 2020-01-21 12:58:36 UTC
(In reply to Bakos Attila (NISZ) from comment #22)
> (In reply to László Németh from comment #21)
> > (In reply to Xisco Faulí from comment #18)
> > > Verified in
> > > 
> > > Version: 6.5.0.0.alpha0+
> > > Build ID: 8f7010eb47119a2428b77f5d79fc8577d9914958
> > > CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
> > > Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
> > > Calc: threaded
> > > 
> > > @László Németh, thanks for fixing this issue!
> > 
> > @Xisco: Attila Bakos fixed the issue, but unfortunately, I've stolen his
> > patch unintentionally. Sorry for it. Attila, thanks for the fix!
> 
> Never mind. The important thing is: it works fine, isn't it? ;)

Sure, but credit is important too!
Kudos to you for fixing it!!