Bug Hunting Session
Bug 78506 - FILEOPEN: WPS RTF - Number list character shown as '10!broken!!'
Summary: FILEOPEN: WPS RTF - Number list character shown as '10!broken!!'
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.5.3 release
Hardware: Other All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.3.0 target:5.2.1
Keywords: filter:rtf
Depends on:
Blocks: RTF-Bullet-Number-Lists
  Show dependency treegraph
 
Reported: 2014-05-09 22:58 UTC by Yousuf Philips (jay) (retired)
Modified: 2017-09-30 15:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
kingsoft writer .rtf (958.39 KB, application/rtf)
2014-05-09 22:58 UTC, Yousuf Philips (jay) (retired)
Details
numeric list shown in 4.2, 4.3, word 2010 and kingsoft writer (152.26 KB, image/jpeg)
2014-05-09 23:00 UTC, Yousuf Philips (jay) (retired)
Details
OSX LO 4.2.4.2 (98.42 KB, image/png)
2014-05-10 07:42 UTC, retired
Details
isolated number list example (32.09 KB, application/rtf)
2014-05-25 20:05 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-05-09 22:58:48 UTC
Created attachment 98789 [details]
kingsoft writer .rtf

I download the .docx file found at < http://download.microsoft.com/documents/uk/partner/publicsector/DraftMicrosoftResponsetoGovernment.docx > and opened it in Kingsoft Writer and saved it as an RTF file. I then opened the RTF file in LibO and on page 15, the numeric list number character shown as '10!broken!!' rather than '1.' In LibO 4.2.3 and 4.2.5, this error results in the number list not being indented, as well as the font used in each entry to be Times New Roman rather than being Calibri.

This was tested in Linux Mint on the last releases from 4.1 and 4.2, as well as 4.2.5 and 4.3 alpha. I had previously mentioned this as a second part of bug 77861, but wanted to give this its own bug report. As can be seen in the screeenshot, this is a fault in kingsoft writer's RTF output code as word 2010 doesnt output the number, which LibO should also do.
Comment 1 Yousuf Philips (jay) (retired) 2014-05-09 23:00:59 UTC
Created attachment 98790 [details]
numeric list shown in 4.2, 4.3, word 2010 and kingsoft writer
Comment 2 retired 2014-05-10 07:41:49 UTC
Interesting findings. In 4.2.4.2 numbers show correctly but are in "liberation serif" font and not calibri. Word 2011 on OSX behaves identical. Calibri and liberation serif for the numbered list.

needadvice as I'm unsure what to make of this and also a third party software is involved (kingsoft writer), which could be messing things up.
Comment 3 retired 2014-05-10 07:42:15 UTC
Created attachment 98808 [details]
OSX LO 4.2.4.2
Comment 4 Yousuf Philips (jay) (retired) 2014-05-10 10:25:44 UTC
(In reply to comment #2)
> Interesting findings. In 4.2.4.2 numbers show correctly but are in
> "liberation serif" font and not calibri.

Weird that LibO would display fine on mac and not on linux as its all the same code base. Well i just tested 4.2.3.3 on Windows XP and see the '10!br0ken!!'. 

> Word 2011 on OSX behaves identical.
> Calibri and liberation serif for the numbered list.

This just confirms that ms word on windows is different than word on mac, as i also tested word 2013 on windows 7 and it shows the same as word 2010, with no numbering. please upload a pdf of the file opened in word on mac, so i can compare its output, thanks. :)

> needadvice as I'm unsure what to make of this and also a third party
> software is involved (kingsoft writer), which could be messing things up.

as previously stated, there is something wrong with the RTF output from kingsoft as word 2010/2013 shows no number list numbers.
Comment 5 Jorendc 2014-05-25 19:49:45 UTC
I can reproduce the '10!broken!!' bug.

Tested using windows 8.1 with LibreOffice Version: 4.3.0.0.beta1 Build ID: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f

I'll try to reduce the file to the bug only. Attaching a 19 pages long document isn't inviting for a developer ;-).

Kind regards,
Joren
Comment 6 Jorendc 2014-05-25 19:54:41 UTC
Mmh, if I try to isolate those 2 paragraphs and resave (Office 2013), I can not reproduce the behavior anymore.

Kind regards,
Joren
Comment 7 Yousuf Philips (jay) (retired) 2014-05-25 20:05:05 UTC
Created attachment 99795 [details]
isolated number list example
Comment 8 ralf.krapf 2014-05-27 06:00:53 UTC
Hi

Could it be the same issue as in bug 76239?
Comment 9 Yousuf Philips (jay) (retired) 2014-05-27 07:54:27 UTC
(In reply to comment #8)
> Could it be the same issue as in bug 76239?

No its unrelated.
Comment 10 Yousuf Philips (jay) (retired) 2014-08-04 23:56:05 UTC
Tested attachment 99795 [details] on 4.3.1 and now instead of '10!broken!!' it shows '10.', so i'm not sure whether this should be closed or not as it should show '1.'.
Comment 11 Yousuf Philips (jay) (retired) 2015-05-27 23:42:32 UTC
Same behaviour of showing '10.' rather than '1.' is still present in master.

Version: 5.1.0.0.alpha1+
Build ID: 1c9302565aefb5a54b1b7f1478dd6dac724d30ea
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2015-05-21_00:47:28

The old RTF importer in 3.3.0 would act similar to Word 2010 and not show the bullet number.
Comment 12 Robinson Tryon (qubit) 2015-12-10 01:08:16 UTC Comment hidden (obsolete)
Comment 13 Miklos Vajna 2016-08-04 09:28:10 UTC
I can reproduce, \levelnumbers contains something strange, we do a best effort import of it, while Word gives up handling it.
Comment 14 Commit Notification 2016-08-04 11:10:08 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#78506 RTF import: fix handling of invalid \levelnumbers

It will be available in 5.3.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 15 Commit Notification 2016-08-05 07:39:54 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=100321e9b39687e8021763ee0aec95de856c497c&h=libreoffice-5-2

tdf#78506 RTF import: fix handling of invalid \levelnumbers

It will be available in 5.2.1.

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.