Bug 105729 - RTF import ignores centered paragraph attribute in title style
Summary: RTF import ignores centered paragraph attribute in title style
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.4.0 target:5.3.2
Keywords: bibisected, bisected, filter:rtf, regression
: 105730 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-02-03 16:58 UTC by Christian Nieber
Modified: 2017-03-28 18:55 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Centered Title from Word 2010 RTF (32.33 KB, application/msword)
2017-02-03 17:01 UTC, Christian Nieber
Details
another file affected by the same commit (164.17 KB, application/rtf)
2017-02-15 18:05 UTC, Xisco Faulí
Details
another one (253.88 KB, application/rtf)
2017-02-20 11:49 UTC, Xisco Faulí
Details
missing upper and lower border (2.87 KB, application/rtf)
2017-02-20 12:56 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Nieber 2017-02-03 16:58:11 UTC
Description:
The RTF example created with Word 2010 should have centered text, but is left justified in LO. Bug observed in master from today and 5.3.0.3, while 5.2.5.1 imports this correctly.
Possibly related to the style that has title attributes.


Steps to Reproduce:
load RTF into LO

Actual Results:  
Text is left justified

Expected Results:
Text should be centered


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:51.0.1) Gecko/20100101 Firefox/51.0.1 anonymized by Abelssoft 1941398195
Comment 1 Christian Nieber 2017-02-03 17:01:11 UTC
Created attachment 130885 [details]
Centered Title from Word 2010 RTF
Comment 2 Xisco Faulí 2017-02-07 09:31:16 UTC
Confirmed in

Version: 5.4.0.0.alpha0+
Build ID: fc53cce64400430cdc21f79c959d75fb9a26d13d
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

but not in

Version: 5.4.0.0.alpha0+
Build ID: ae604ccce58f414fb2a0446bb4f94553929c72e4
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:master, Time: 2017-01-02_23:32:56
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 3 Xisco Faulí 2017-02-14 13:59:06 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2017-01-03 07:49:43 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2017-01-03 10:56:29 (GMT)
commit a9e029ace41562e28e9242d63230ad1ca275f5d3 (patch)
tree 605fee980e467c8a5896bdf5053fd7422865091a
parent c9c5c94771f22919ec82351b3b9b3096af96a508 (diff)
tdf#104744 RTF import: fix unexpected zero para left margin wrt style dedup
See commit 1be0a3fa9ebb22b607c54b47739d4467acfed259 (n#825305:
writerfilter RTF import: override style properties like Word,
2014-06-17) for the details on style override in RTF.

Here the problem was that we added an unneeded "reset to 0" property, the
opposite situation that commit 657c6cc3acec0528209a8584b838cd6de581c437
(tdf#104228 RTF import: fix override of style left/right para margin,
2016-12-13) was fixing (there a "reset to 0" was missing).

Adding Cc: to Miklos Vajna
Comment 4 Xisco Faulí 2017-02-14 14:13:38 UTC
*** Bug 105730 has been marked as a duplicate of this bug. ***
Comment 5 Xisco Faulí 2017-02-15 18:05:03 UTC
Created attachment 131259 [details]
another file affected by the same commit
Comment 6 Xisco Faulí 2017-02-20 11:24:41 UTC
Same commit is also affecting TOC's numbering position in attachment 93817 [details] from bug 74817
Comment 7 Xisco Faulí 2017-02-20 11:49:05 UTC
Created attachment 131351 [details]
another one

Another document where the toc's numbering position is affected by the same commit
Comment 8 Xisco Faulí 2017-02-20 12:56:48 UTC
Created attachment 131355 [details]
missing upper and lower border
Comment 9 Miklos Vajna 2017-03-10 21:41:14 UTC
This is similar to bug 94435, except in this case the \qc is in the style, not in the paragraph direct formatting. And again \ltrpar causes a problem. I'll look into this.

(Once fixed, it may make sense to re-check the other bug documents, I'm not sure if the root cause is really the same; you may need follow-up bugs for the non-fixed other documents if there are any.)
Comment 10 Commit Notification 2017-03-14 11:25:09 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2cc5f18d10cf6ef1349d9518e6f67977f7c5d9bf

tdf#105729 RTF import: \ltrpar should not override \qc from style

It will be available in 5.4.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 11 Commit Notification 2017-03-17 10:15:33 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

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

tdf#105729 RTF import: \ltrpar should not override \qc from style

It will be available in 5.3.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 12 Xisco Faulí 2017-03-22 11:39:16 UTC
Verified text position in

Version: 5.4.0.0.alpha0+
Build ID: 4ba483beccc99d336d0e0bec47b5fd6823b16c16
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Regarding the TOC's numbers position, I've created a follow-up bug -> bug 106694