Bug 149563

Summary: FILEOPEN DOCX Table with negative indent appears incorrectly in section with negative top margin
Product: LibreOffice Reporter: Gabor Kelemen (allotropia) <kelemeng>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: telesto
Priority: medium    
Version: 7.4.0.0 alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=119952
https://bugs.documentfoundation.org/show_bug.cgi?id=90534
https://bugs.documentfoundation.org/show_bug.cgi?id=149564
https://bugs.documentfoundation.org/show_bug.cgi?id=161139
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 104522    
Attachments: Example file from Word 2016
The example file in Word 2016 and Writer master

Description Gabor Kelemen (allotropia) 2022-06-14 14:30:12 UTC
Created attachment 180759 [details]
Example file from Word 2016

Attached Word-made document has a table in the first page header, which is also set to have negative top page margin.

The table has a negative 1 cm indent. Since the table is in a negative top page margin section, it is placed inside a text frame, since bug 119952 was fixed.

However, the text frame does not take into account the tables negative indent, but the table inside does. This makes the left column of the table hidden under the left edge of the frame.

1, Open attached document
2, Notice the first three row of the table text show 1, 2, 3 instead of 111111, 222222, 333333

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: c0e66cfab12d6c78d68af09498533362724dbd05
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

To make this match the layout better, the horizontal position of the frame should be "From Left" instead of "Left" and the "by" value should be the tables left indent, while the tables left indent should be 0.
In Word, the negative indent of the table moves the table towards the left of the page, into the left margin.

Of course this would be only a workaround, until the negative page margin feature is properly implemented - see https://bugs.documentfoundation.org/show_bug.cgi?id=119952#c2
Comment 1 Gabor Kelemen (allotropia) 2022-06-14 14:38:20 UTC
Created attachment 180760 [details]
The example file in Word 2016 and Writer master
Comment 2 Rafael Lima 2022-06-14 14:58:04 UTC
Repro with

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 66b849eab05bb6b696cced84ca90c17ca1bc31dd
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL

The first column is indeed too narrow and it's not possible to see the entire text in the column. Some of it is hidden to the left.

Changing the frame position as described fixes the issue in this case, however it moves the entire table to the left.