Bug 137085 - RTF table is shifted left
Summary: RTF table is shifted left
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.6.2 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.1.0 target:7.0.4
Keywords: filter:rtf
Depends on:
Blocks: RTF-Tables
  Show dependency treegraph
 
Reported: 2020-09-28 06:05 UTC by Vasily Melenchuk (CIB)
Modified: 2024-07-25 16:58 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample RTF document (137 bytes, application/msword)
2020-09-28 06:06 UTC, Vasily Melenchuk (CIB)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vasily Melenchuk (CIB) 2020-09-28 06:05:46 UTC
Description:
Some RTF document get invalid table position. RTF token \trgaph value is treatd incorrectly.

Sample document is a stripped out version of huge document with table movement.

NOTE: earliest affected version is rough. I definitely do not see this problem in 6.4.1.2 but see it in 6.4.6.2

Steps to Reproduce:
1. Open attached RTF document
2. For better visibility of problem ensure that paragraph marks are displayed (to see table and page areas)

Actual Results:
Table in document is shifted to left.

Expected Results:
Table is not indented.


Reproducible: Always


User Profile Reset: No



Additional Info:
-
Comment 1 Vasily Melenchuk (CIB) 2020-09-28 06:06:15 UTC
Created attachment 165900 [details]
Sample RTF document
Comment 2 Vasily Melenchuk (CIB) 2020-09-28 06:07:29 UTC
This behavior is a regression from:

commit c2a5346b19c57f93f210b76c15cdba64f6871203
Author: Michael Stahl <Michael.Stahl@cib.de>
Date:   Mon Feb 10 19:20:03 2020 +0100

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

    There's a compatibilityMode in word/settings.xml in DOCX files:
    https://docs.microsoft.com/en-us/openspecs/office_standards/ms-docx/90138c4d-eb18-4edc-aa6c-dfb799cb1d0d

    If a document doesn't contain compatibilityMode, then the default
    is 12, but the code for table indent import/export assumed that the
    default is 15, so loading an ODF document and exporting as DOCX results
    in wrong table indent when loaded in Word.

    (regression from 9a31d1c83e08600507689dc18f6f0973bc7e4389)

    Change-Id: I3ce32286473640e5b7e12b487aef5f123bfb8d12
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88408
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl@cib.de>
    (cherry picked from commit d978f5d40102a098f1faf1e98aa39ad122284299)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88392
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Comment 3 Commit Notification 2020-10-22 07:39:15 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fc872146845e4d77ff404d0929f28abf2d3a1c51

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

It will be available in 7.1.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 4 Michael Stahl (allotropia) 2020-10-22 07:39:49 UTC
fixed on master, although there are still some obvious problems here
Comment 5 Commit Notification 2020-10-22 12:11:41 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/501975b1705a9724c91bcd13ec0de19d39551595

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

It will be available in 7.0.4.

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.