Bug 134062 - FILEOPEN DOCX Missing cell padding value imported as 0.12 cm (probably duplicate of smart justify actually)
Summary: FILEOPEN DOCX Missing cell padding value imported as 0.12 cm (probably duplic...
Status: RESOLVED DUPLICATE of bug 119908
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Tables
  Show dependency treegraph
 
Reported: 2020-06-17 08:43 UTC by NISZ LibreOffice Team
Modified: 2023-11-27 14:14 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word (14.44 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-06-17 08:43 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Word and Writer (159.43 KB, image/png)
2020-06-17 08:43 UTC, NISZ LibreOffice Team
Details
PDF export of the example file from Word 2010 (200.13 KB, application/pdf)
2022-06-29 21:29 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-06-17 08:43:05 UTC
Created attachment 162093 [details]
Example file from Word

Attached user made document is somehow set to contain no table cell padding setting for left and right instead of 0 or any value.
This is imported as 0.12 cm in Writer, while it is imported as 0 in Word.
There is one paragraph in the document that is broken into three lines instead of just fitting in two, so the tables last row is broken to the second page.

Steps to reproduce:
1.	Open attached document

Actual results:
Two page long document.

Expected results:
One page document.

LibreOffice details:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 33a720ab802491f15b247e09755cd36205b6f435
CPU szálak: 4; OS: Windows 6.3 Build 9600; Felületmegjelenítés: alapértelmezett; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL

Also happens in
Verzió: 6.0.0.3
Build az.: 64a0f66915f38c6217de274f0aa8e15618924765
CPU szálak: 4; OS: Windows 6.3; Felületmegjelenítés: alapértelmezett; 
Területi beállítások: hu-HU (hu_HU); Calc: CL

Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: hu-HU (hu_HU)

Verzió: 4.0.0.3 (Build az.: 7545bee9c2a0782548772a21bc84a9dcc583b89)

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 1 NISZ LibreOffice Team 2020-06-17 08:43:21 UTC
Created attachment 162094 [details]
Screenshot of the original document side by side in Word and Writer
Comment 2 Gabor Kelemen (allotropia) 2020-06-17 12:15:04 UTC
This must be a rare situation, even Word 2003 complains when I try to delete & OK a value that it must be between 0 and 59 (or so) value.
Comment 3 Dieter 2020-09-11 06:44:29 UTC
I confirm it with

Version: 7.0.1.2 (x64)
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: threaded

One additional remark: Would be nice, if you could add screenshots with English UI. Thanks.
Comment 4 Justin L 2022-06-29 14:08:37 UTC
In document.xml I see
<w:tblCellMar>
  <w:left w:w="70" w:type="dxa"/>
  <w:right w:w="70" w:type="dxa"/>
</w:tblCellMar>

This gets converted to .12cm
writerfilter/source/dmapper/CellMarginHandler.cxx:59: w[70] TwipsToMM100[123]

I'm not sure that this bug report is accurate then. Because this is justified text, perhaps it is instead a duplicate of bug 119908?
Comment 5 Gabor Kelemen (allotropia) 2022-06-29 21:28:29 UTC
(In reply to Justin L from comment #4)
> In document.xml I see
> <w:tblCellMar>
>   <w:left w:w="70" w:type="dxa"/>
>   <w:right w:w="70" w:type="dxa"/>
> </w:tblCellMar>
> 

This is strange. Why is the Word UI not showing it as values, but empty cells?
(it's operated by magic, that's why)

> This gets converted to .12cm
> writerfilter/source/dmapper/CellMarginHandler.cxx:59: w[70] TwipsToMM100[123]
> 
> I'm not sure that this bug report is accurate then. Because this is
> justified text, perhaps it is instead a duplicate of bug 119908?

It may very well be! In Word 2010, I get the same 3 line layout for that one paragraph ending with "publikálhatja.", just like in Writer.
Even then the second row of the table is not rendered at the top of the next page, but is kept at the bottom. Only the empty paragraph slips to the second.
Comment 6 Gabor Kelemen (allotropia) 2022-06-29 21:29:04 UTC
Created attachment 181019 [details]
PDF export of the example file from Word 2010
Comment 7 Gabor Kelemen (allotropia) 2023-11-24 09:19:50 UTC
This is now rendered as 1 page since:

https://git.libreoffice.org/core/+/7d08767b890e723cd502b1c61d250924f695eb98

author	László Németh <nemeth@numbertext.org>	Mon Oct 16 19:39:30 2023 +0200
committer	László Németh <nemeth@numbertext.org>	Tue Oct 17 10:37:23 2023 +0200

tdf#130088 tdf#119908 smart justify: fix DOCX line count + compat opt.

Indeed a duplicate. Thanks László!

*** This bug has been marked as a duplicate of bug 119908 ***
Comment 8 László Németh 2023-11-27 14:14:11 UTC
@Gábor: many thanks for your feedback!