Bug 108943 - FILEOPEN: RTF: left margin on first paragraph's line is ignored
Summary: FILEOPEN: RTF: left margin on first paragraph's line is ignored
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.0.0 target:5.4.2
Keywords: bibisected, bisected, filter:rtf, regression
Depends on:
Blocks: RTF
  Show dependency treegraph
 
Reported: 2017-07-04 11:12 UTC by Xisco Faulí
Modified: 2017-08-30 18:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
comparison LibreOffice 6.0 and MSO 2010 (307.47 KB, image/png)
2017-08-08 21:46 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2017-07-04 11:12:31 UTC
Steps:
1. Open attachment 100023 [details] from bug 79362
2. Check left margin in paragraphs 01 to 08

Observed behaviour: first paragraph's line is shifted to the left

[Bug found by office-interoperability-tools]

Reproduced in

Version: 6.0.0.0.alpha0+
Build ID: cb37c5f0f3de7b545231a53d46a5271058af76ad
CPU threads: 1; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-06-23_06:55:41
Locale: es-ES (es_ES); Calc: group
Comment 1 Xisco Faulí 2017-07-04 11:14:16 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2017-05-16 06:34:40 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2017-05-16 08:05:30 (GMT)
commit	f528f9499bd91b700c549575e88fa102cfffede9 (patch)
tree	3f6f1f61de123f5329cfc175ebd3bbaffac98574
parent	6170d7c6063da89929577702189e4e4bfe564cc7 (diff)
tdf#106953 RTF import: fix missing paragraph left margin
See commit 3915bf2dc877d5f1140798e24933db0f21386a4a (tdf#95376 DOCX
import: fix incorrectly indented tab stops, 2016-01-26) for the various
sources that can determine the paragraph indentation.

In this case the problem was that too aggressive RTF style deduplication
removed a direct indent, which then meant a fallback to the ind-from-num
value, not to the ind-from-parastyle one.

Bisected with bibisect-linux-64-5.4

Adding Cc: to Miklos Vajna
Comment 2 Xisco Faulí 2017-07-04 17:38:53 UTC
Same commit also affects attachment 56100 [details] from bug 45192 being the table in first page divided in 2.
Comment 3 Miklos Vajna 2017-08-08 21:00:18 UTC
I'm not sure I see what to fix here. I tried the bugdoc from comment 0 with today's master, also a bibisect binary from 2017-06-23, but in general the import result looks OK. Can you please provide a screenshot showing the problem or just be specific what are the exact left margins of the first paragraph (expected/actual)? They seem to be 0 in both LO and MSO. Thanks.
Comment 4 Xisco Faulí 2017-08-08 21:46:35 UTC
Created attachment 135321 [details]
comparison LibreOffice 6.0 and MSO 2010

Versió: 6.0.0.0.alpha0+
ID de la construcció: 0342c5e8086c8200ecadbe9d52dd4ef6a093effb
CPU threads: 4; OS: Linux 4.10; UI render: per defecte; VCL: gtk3; 
Configuració local: ca-ES (ca_ES.UTF-8); Calc: group

Sorry for not providing the screenshot in the first place. As you can see in the screenshot, every first line after the numbering starts right after the number, without indention, while in MSO 2010 there's space, and the first line has the same indent as the rest of the lines in the paragraph.
Comment 5 Miklos Vajna 2017-08-17 22:09:17 UTC
I see the problem now, thanks for the additional info.
Comment 6 Commit Notification 2017-08-23 08:53:03 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=57d535302596a62be914bee49d7b1df1fc622a65

tdf#108943 RTF import: handle \tx inside a list level definition

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2017-08-24 09:57:21 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e6426cc1bf174a67828f3e18ab1ea70eccc44b07&h=libreoffice-5-4

tdf#108943 RTF import: handle \tx inside a list level definition

It will be available in 5.4.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Xisco Faulí 2017-08-30 18:06:48 UTC
Verified in

Version: 6.0.0.0.alpha0+
Build ID: 78960ad06faca055a6d97afbc764c902d5d07f6f
CPU threads: 1; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2017-08-30_06:31:19
Locale: es-ES (es_ES); Calc: group