Bug 82006 - FILEOPEN: RTF paragraph spacing not retained
Summary: FILEOPEN: RTF paragraph spacing not retained
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: Other All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:4.5.0 target:4.4.0
Keywords: bibisectRequest, filter:rtf, regression
Depends on: 104354
Blocks: RTF-Paragraph 118533
  Show dependency treegraph
 
Reported: 2014-08-01 10:27 UTC by Yousuf Philips (jay) (retired)
Modified: 2018-07-04 09:45 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Word 2013 exported RTF (1.72 MB, application/rtf)
2014-08-01 10:27 UTC, Yousuf Philips (jay) (retired)
Details
Word 2013 VS LibO 4.3.1 (441.70 KB, image/png)
2014-08-01 10:30 UTC, Yousuf Philips (jay) (retired)
Details
4.3.0.4 ubuntu pdf (no reproduce) (169.69 KB, application/pdf)
2014-08-02 07:22 UTC, Kevin Suo
Details
Repro, with Microsoft YaHei font installed (252.48 KB, image/png)
2014-08-03 14:39 UTC, Jorendc
Details
first paragraph needs zero top margin (RED: MSO, BLACK: recent LO, GREEN: fixed LO) (2.90 KB, image/jpeg)
2018-07-02 15:54 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-08-01 10:27:42 UTC
Created attachment 103808 [details]
Word 2013 exported RTF

I downloaded < http://download.microsoft.com/documents/customerevidence/Files/710000003670/Xiamen_Tungsten_Group_unifies_enterprise.docx > and opened it in Word 2013 and saved it as an rtf file. Then when opening the file in LibO 4.3.1, paragraph spacing isnt retained. This doesnt occur with the older 3.3.0 rtf importer.

This spacing issue also effects the import of the original docx file into LibO and is reported in bug 77960.
Comment 1 Yousuf Philips (jay) (retired) 2014-08-01 10:30:37 UTC
Created attachment 103809 [details]
Word 2013 VS LibO 4.3.1
Comment 2 Kevin Suo 2014-08-02 07:22:53 UTC
Created attachment 103852 [details]
4.3.0.4 ubuntu pdf (no reproduce)

Do not reproduce for me with 4.3.0.4, ubuntu 14.04 x64. See the exported PDF.

The paragraph "统一化的产品数据管理" appears in the 2nd page because I do not have "Microsoft Yahei" font installed, so "Wenquanyi Zenhei" was used.
Comment 3 Yousuf Philips (jay) (retired) 2014-08-02 08:26:53 UTC
Please install Microsoft Yahei and then retest as i have it on my system. :)
Comment 4 Jorendc 2014-08-03 14:38:57 UTC
Repro, with Microsoft Yahei installed.
Windows 8.1 with LibreOffice Version: 4.4.0.0.alpha0+
Build ID: 6528607d34c9a2098ff5eec051fc9299ec37dfd7
TinderBox: Win-x86@39, Branch:master, Time: 2014-08-03_07:56:26
Comment 5 Jorendc 2014-08-03 14:39:41 UTC
Created attachment 103912 [details]
Repro, with Microsoft YaHei font installed
Comment 6 Miklos Vajna 2014-11-01 20:05:40 UTC
Could you please attach a more minimal document? The original bugdoc has 71 paragraphs, it would be nice to know exactly what paragraph is your problem. Also, is this specific to non-ASCII characters? If not, could you please change the reproducer to contain just ASCII characters? That would help me a lot. :-)
Comment 7 Yousuf Philips (jay) (retired) 2014-11-01 21:49:48 UTC
Hi Miklos,

It effects every paragraph in the document. :D

If you open the original .docx file in master, paragraph 1 has 14pt above and below, paragraph 2 has 7.5pt above and 14pt below and paragraph 3 has 18.7pt above and 14.0pt below.

If you open the rtf file in master, paragraph 1 has 5pt above and below, paragraph 2 has 7.5pt above and 5pt below and paragraph 3 has 18.7pt above and 5pt below.

I havent created this file, but believe it must have to do with the chinese character settings in the document.
Comment 8 Miklos Vajna 2014-11-22 19:08:10 UTC
Ah, because we ignore \s{a,b}auto on import, I'll implement that.
Comment 9 Commit Notification 2014-11-22 19:57:19 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

fdo#82006 RTF filter: import \sbauto and \saauto

It will be available in 4.5.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 10 Adolfo Jayme Barrientos 2014-11-22 21:15:16 UTC
Pushed to -4-4: cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-4-4&id=85086306939b6bebb8cf549966942f2e5a244388
Comment 11 Miklos Vajna 2014-11-22 21:37:08 UTC
libreoffice-4-3 review: https://gerrit.libreoffice.org/13054
Comment 12 Robinson Tryon (qubit) 2015-12-17 10:47:22 UTC
Migrating Whiteboard tags to Keywords: (BibisectRequest, filter:rtf)
Remove redundant 'rtf_filter'.
[NinjaEdit]
Comment 13 László Németh 2018-07-02 15:53:02 UTC
First paragraph has got zero top margin in MSO, see the attached composite layouts in MSO (red) and LibreOffice before (black) and after fixing (green).
It needs to resolve this (solution in tdf#107480) and modify the regression test "testFdo82006" of this issue.

Note: also left margin position has got still some problem in LibreOffice master.
Comment 14 László Németh 2018-07-02 15:54:17 UTC
Created attachment 143268 [details]
first paragraph needs zero top margin (RED: MSO, BLACK: recent LO, GREEN: fixed LO)
Comment 15 Miklos Vajna 2018-07-03 07:19:06 UTC
Please don't reopen a bug from 2014, instead open a follow-up bug, then the whiteboard of that bug will properly track what branches will have your fix. Thanks!
Comment 16 László Németh 2018-07-04 09:45:26 UTC
(In reply to Miklos Vajna from comment #15)
> Please don't reopen a bug from 2014, instead open a follow-up bug, then the
> whiteboard of that bug will properly track what branches will have your fix.
> Thanks!

Sorry, Miklós, I've filed the bug 118533 for it. Thanks for your advice!