When preparing a testcase for Bug 54473, I came across this bug: when there's no semicolon between "\stylesheet" keyword and the first character style, the first style is ignored, i.e. its formatting is not applied to the corresponding text. Here is the testcase: {\rtf1\ansi {\stylesheet {\*\cs16\ul Anot;} {\*\cs15\i ForeignTxt;} } {\cs16\ul Text } with {\cs15\i character } formatting \par } This testcase only differs from the testcase from Bug 54473 comment 5 in one character (absent semicolon after "\stylesheet"). Opening it in Writer, the word "Text" displays not underlined (unlike the testcase from the abovementioned bug). Both MS Word Viewer and MS Word show this file OK. Notes: 1. This testcase was artificially crafted, so it is not known if this kind of bug may be encountered "in the wild"; thus the priority is low. However, it is still a bug, because it violates the standard. 2. This problem is mentioned in a comment in Bug 54473, so it may happen that it will get fixed by a fix to that bug; thus making this bug depend on Bug 54473 to check when it changes its state. However, it doesn't mean that they necessarily stem from one root.
Thank you very much for your bug report! Also REPRODUCIBLE on Mac OS X (10.6.8, Intel), so changed Platform to All/All, with * LibreOffice 3.5.0 (Build-ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735) * LibreOffice 3.6.3.2 * LOdev 4.0.0.0.alpha0+ (Build ID: 32315e; pull time: 2012-11-13 00:32:26) NOT reproducible with * LibreOffice 3.3.0, OOO330m19 (Build:6), tag libreoffice-3.3.0.4 * LibreOffice 3.4.0, OOO340m1 (Build:12) So this is a regression compared to the old RTF reader; adapted Version field (should show the 1st version which is known to contain the problem) and added “regression” keyword. Added whiteboard tag. I have to confess that I do not know enough about the RTF standard to judge if the file without the semicolon after “\stylesheet” is correct. But when the old versions of LibreOffice (and OOo/AOO!), MS Office, and even simple RTF readers like Apple’s TextEdit *do* read the version without semicolon correctly (like the one with semicolon), LibreOffice should read the file without semicolon, too ...
@ Miklós Vajna: Hi Miklós, this is yet another little RTF reader issue. It is of minor importance compared to other problems, so probably not urgent. But nevertheless it would be nice if you could add this issue to your agenda ... Thank you very much!
Thanks for the separate report, though in this case a oneliner fix will resolve both bugs. :-) I'll push it in a bit when I'm ready with the unit test for this.
Fixed in master: http://cgit.freedesktop.org/libreoffice/core/commit/?id=41890bf714803969515578b47e63fa9730ea7090 -3-6 review: https://gerrit.libreoffice.org/1235
VERIFIED as FIXED on Mac OS X (10.6.8, Intel) with Version 4.0.0.0.beta1 (Build ID: 87906242e87d3ddb2ba9827818f2d1416d80cc7) TinderBox: MacOSX TDF Release, Branch:libreoffice-4-0, Time: 2012-12-05_22:13:37 Mike Kaganski’s test case is now imported correctly with *and* without the semicolon. @ Miklós: Thank you very much for fixing this issue!
For the record: (In reply to comment #4) > -3-6 review: https://gerrit.libreoffice.org/1235 Miklós’ patch has been pushed to the 3.6 branch with http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-6&id=3d43dc3318a0692287e877b2e70e873372d2c248 So this fix will appear in LibreOffice 3.6.5 (and 4.0.0, of course). Added missing Whiteboard tags (“target:4.0.0 target:3.6.5”).
Migrating Whiteboard tags to Keywords: (filter:rtf) Replace rtf_filter -> filter:rtf. [NinjaEdit]