Bug 148578 - FILEOPEN RTF Table left indent incorrect
Summary: FILEOPEN RTF Table left indent incorrect
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All All
: medium normal
Assignee: Vasily Melenchuk (CIB)
URL:
Whiteboard: target:7.6.0 target:7.5.0.2
Keywords: bibisected, bisected, regression
: 141248 (view as bug list)
Depends on:
Blocks: RTF-Tables
  Show dependency treegraph
 
Reported: 2022-04-13 22:04 UTC by Gabor Kelemen (allotropia)
Modified: 2023-04-14 11:24 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example RTF file from Word 2013 (56.64 KB, application/msword)
2022-04-13 22:04 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the first tables settings in Word and Writer (101.42 KB, image/png)
2022-04-13 22:05 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the second tables settings in Word and Writer (102.87 KB, image/png)
2022-04-13 22:05 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2022-04-13 22:04:32 UTC
Created attachment 179541 [details]
Example RTF file from Word 2013

Attached document contains two left aligned tables with left/right inner padding set.
When opened in Writer these tables move a bit to the left compared to Word.

1. Open attached file in Word and Writer
2. Compare the first tables indent and cell margin settings in Word and Writer: it has 0 cm left indent, 0.5 cm left margin and 0.3 cm right margin set.
When opened in Writer it has -1 cm left spacing (double of the 0.5 cm left padding extracted from the 0 left indent)
3. Compare the second tables indent and cell margin settings in Word and Writer: it has 1.5 cm left indent, 0.35 cm left margin and 0.3 cm right margin set.
When opened in Writer it has 0.8 cm left spacing (double of the 0.35 cm left padding extracted from the 1.5 cm left indent)

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

This was good in 6.4, with -0.5 cm left spacing imported for the first table and 1.15 cm left spacing for the second (the amount of left padding extracted from the left indent). While these values do not match the values seen in Word, the layout matches.

It started to break in 7.0 with:
https://git.libreoffice.org/core/+/d978f5d40102a098f1faf1e98aa39ad122284299

author	Michael Stahl <Michael.Stahl@cib.de>	Mon Feb 10 19:20:03 2020 +0100
committer	Michael Stahl <michael.stahl@cib.de>	Tue Feb 11 11:57:35 2020 +0100

related: tdf#106742 sw: DOCX import/export: fix default of table indent

This changed the first tables left spacing to -0.75 cm and the second tables left spacing to 0.90 cm.

It broke to the current status in 7.1 with:
https://git.libreoffice.org/core/+/fc872146845e4d77ff404d0929f28abf2d3a1c51

author	Michael Stahl <Michael.Stahl@cib.de>	Wed Oct 21 17:53:07 2020 +0200
committer	Michael Stahl <michael.stahl@cib.de>	Thu Oct 22 09:38:19 2020 +0200

tdf#137085 writerfilter: RTF import: \trpaddfl and \trpaddl are row...

Adding CC to: Michael Stahl
Comment 1 Gabor Kelemen (allotropia) 2022-04-13 22:05:00 UTC
Created attachment 179542 [details]
Screenshot of the first tables settings in Word and Writer
Comment 2 Gabor Kelemen (allotropia) 2022-04-13 22:05:25 UTC
Created attachment 179543 [details]
Screenshot of the second tables settings in Word and Writer
Comment 3 Xisco Faulí 2022-04-15 14:37:20 UTC
Reproduced in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: ab8d141967111ca81f4607db3618bb09214e42db
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 4 Commit Notification 2023-01-09 07:55:46 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/788cc6ff3b186ceb8f265e53b5482f808f6536f4

tdf#148578: Do not apply table shift for RTF

It will be available in 7.6.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 5 Commit Notification 2023-01-09 23:45:26 UTC
Vasily Melenchuk committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/78e91fd2bf7fe7d92020e7d9d9a2c6c25c8da830

tdf#148578: Do not apply table shift for RTF

It will be available in 7.5.0.2.

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 6 Vasily Melenchuk (CIB) 2023-01-13 08:17:38 UTC
*** Bug 141248 has been marked as a duplicate of this bug. ***
Comment 7 Gabor Kelemen (allotropia) 2023-01-15 22:41:58 UTC
Verified in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 37e3455a13ab5741104bf41d05a80e60a4612682
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (hu_HU); UI: en-US
Calc: threaded

Now the layout matches the one in Word.