Bug 144092 - FILEOPEN PPTX: Empty table rows appear with lower height
Summary: FILEOPEN PPTX: Empty table rows appear with lower height
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Keywords: bibisected, bisected, regression
Depends on:
Blocks: PPTX-Tables
  Show dependency treegraph
Reported: 2021-08-25 23:56 UTC by Gerald Pfeifer
Modified: 2022-01-14 07:07 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

Sample PPTX slide (1.31 MB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2021-08-25 23:56 UTC, Gerald Pfeifer
Visual comparison LibreOffice 7.3 vs Office 365 (138.74 KB, image/png)
2021-08-25 23:57 UTC, Gerald Pfeifer

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2021-08-25 23:56:27 UTC
Created attachment 174540 [details]
Sample PPTX slide

Looking at this document the two rows without text (so empty) appear with
lower height than the other rows.

If I just insert a space character in those two lines, they extend to full
height in line with the others.

Version: / LibreOffice Community
Build ID: 4e86347d7ad76e16d8b0eaae5f12d1dfb763b531
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-08-24_19:41:14

Build ID: 54e9dd41dc9dd45af12c9346199f601ea4a5994d
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-7-0, Time: 2021-05-07_08:22:18
Calc: threaded

NOT seen with version 6.4, so a regressions apparently:

Build ID: 99b065ec31d032fc08ab14f66430dac4fef904a5
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-6-4, Time: 2020-10-08_08:57:08
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Comment 1 Gerald Pfeifer 2021-08-25 23:57:31 UTC
Created attachment 174541 [details]
Visual comparison LibreOffice 7.3 vs Office 365
Comment 2 Buovjaga 2021-08-26 07:15:09 UTC
Bibisected with linux-64-7.0 to
tdf#137949 Fix table row heigths.

Adding Cc: to Gülşah Köse
Comment 3 Justin L 2022-01-11 05:43:11 UTC
There must be some secret formula that determines when to honour the a:tr h="xxx" specified row height, and when to ignore it. The documentation doesn't give any clues. tr (Table Row)
h (Height) Defines the height of the row in the table.
The possible values for this attribute are defined by the ST_Coordinate simple type (sal_Int32)

The values used are huge - defined as an EMU.
L.4.1.1 EMU Unit of Measurement
Throughout ECMA-376, the EMU is used as a unit of measurement for length. An EMU is defined as
1 emu  ==  1/914400 inch  ==  1/360000 cm
Comment 4 Justin L 2022-01-11 09:05:00 UTC
I'm sure that the problem with bug 137949 is the calculation of the cell height - since the cells have direct paragraph values which are probably being ignored on the empty cells.

In bug 137949's tablescale.pptx, the cell height for text xxx(10.5pt) and yyy(11pt) is calculated as size 412/433, while the empty cells are calculated too large as size 712 (and in LO are indicated as size 18, while in MS Powerpoint they are size 11). This seems to be specified by endParaRPr sz=1100.

In this bug's table-shadows.pptx, the sizes are all in the default style's 18pt, and so the empty cells are this time properly calculated as size 712, and thus the cell content ought to override the smaller rowHeight.
Comment 5 Justin L 2022-01-14 07:07:38 UTC
I have a mass revert patch at https://gerrit.libreoffice.org/c/core/+/128376.

Obviously since some of these have been in the product since LO 5.0, it wouldn't be very nice to actually push this unless those bugs are fixed properly, but I post it here for the record.

It fixes this bug, and bug 139511.