Bug 167583 - FILEOPEN DOC/X: AdjustLineHeightInTable: grid killed in tables without taking into account the compat flag
Summary: FILEOPEN DOC/X: AdjustLineHeightInTable: grid killed in tables without taking...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.4.3 release
Hardware: All All
: medium normal
Assignee: Jonathan Clark
URL:
Whiteboard: target:26.2.0
Keywords: bisected, regression
Depends on:
Blocks: CJK DOC Text-Grid
  Show dependency treegraph
 
Reported: 2025-07-18 17:01 UTC by Justin L
Modified: 2025-07-22 19:53 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
moz518503-9.doc: nice example - table content should not be packed tight (254.50 KB, application/msword)
2025-07-18 17:01 UTC, Justin L
Details
moz518503-9.doc_mso.pdf: how it looks in Word 2010 (440.85 KB, application/pdf)
2025-07-18 17:13 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2025-07-18 17:01:43 UTC
Created attachment 201882 [details]
moz518503-9.doc: nice example - table content should not be packed tight

Prior to 24.8 (and backported to 25.2.4), grid spacing could be applied to tables, but now it never does. However, MS Word has a compat flag that determines whether it should or not.

This started with 24.8 commit 47efe906bece13d2c4f0525c7889f19bbfb236c3
Author: Jonathan Clark on Wed May 14 04:05:14 2025 -0600
    tdf#88752 DOCX import: Ignore text grid base height inside tables
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185307

Our doc import knows (at least somewhat) about fDontAdjustLineHeightInTable, and DOCX has w:compat w:adjustLineHeightInTable, which is CT_Compat_adjustLineHeightInTable in writerfilter.

moz518503-6.doc is another example.

Found by Collabora's mso-test.
Comment 1 Justin L 2025-07-18 17:13:56 UTC
Created attachment 201884 [details]
moz518503-9.doc_mso.pdf: how it looks in Word 2010
Comment 2 Jonathan Clark 2025-07-19 02:54:53 UTC
Confirmed. Currently, this is rolled into the same compatibility flag we're using for other Word-compatible grid rules. To do this correctly, we need to wire the appropriate Word compat flag up to a separate Writer compat flag.
Comment 3 Commit Notification 2025-07-22 19:46:39 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2745e97d3d21cc91747d51ca4b68f53ac219211e

tdf#167583 sw: Add ADJUST_TABLE_LINE_HEIGHTS_TO_GRID_HEIGHT compat flag

It will be available in 26.2.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.