Bug 42407 - RTF file import does not handle Word95 version of Drawing Objects
Summary: RTF file import does not handle Word95 version of Drawing Objects
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.4.3 release
Hardware: Other All
: medium normal
Assignee: Miklos Vajna
Whiteboard: target:3.7.0
Depends on:
Blocks: 56512
  Show dependency treegraph
Reported: 2011-10-30 14:27 UTC by Lior Kaplan
Modified: 2012-10-29 06:55 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

the problematic RTF file (25.08 KB, application/rtf)
2011-10-30 14:27 UTC, Lior Kaplan
a screen shot of the RTF file in LibO 3.4.3 (36.62 KB, image/png)
2011-10-30 14:28 UTC, Lior Kaplan
PDF generated by word from the RTF file (this is how it should look like in LibO) (79.94 KB, application/pdf)
2011-12-18 15:36 UTC, Lior Kaplan

Note You need to log in before you can comment on or make changes to this bug.
Description Lior Kaplan 2011-10-30 14:27:10 UTC
Created attachment 52928 [details]
the problematic RTF file


The attached RTF files isn't even readable when opened in LibO 3.4.3. I'm attaching the scrren shot of how it looks in LibO and a PDF which shows how it looks in Microsoft Word.
Comment 1 Lior Kaplan 2011-10-30 14:28:01 UTC
Created attachment 52929 [details]
a screen shot of the RTF file in LibO 3.4.3
Comment 2 Jean-Baptiste Faure 2011-12-18 08:35:09 UTC
Hi Lior, 

You forgot to attach the pdf showing how the rtf file looks in MS-Word.
Could you, please, attach the file ?

Side note: in LO 3.5.0 beta-1 under Ubuntu 10.04 x86_64, the RTF file looks empty :-(

Best regards. JBF
Comment 3 Lior Kaplan 2011-12-18 15:36:09 UTC
Created attachment 54562 [details]
PDF generated by word from the RTF file (this is how it should look like in LibO)
Comment 4 Lior Kaplan 2011-12-18 15:37:09 UTC
You're right, there's a regression in LibO 3.5.0 Beta1 comparing to 3.4.4 with how the RTF file looks like. In 3.4.4 it's almost empty and in 3.5.0 beta1 it's totally empty.

Also, I'm attaching the missing PDF file. Thanks for noticing.
Comment 5 Miklos Vajna 2011-12-29 15:32:40 UTC
That's because the document contains "Drawing Objects in Word 6.0/95 RTF" (\do destination), while the current RTF importer supports only Word 97 and newer, which is a different syntax. In fact the document only contains those, nothing else. :-)

As you can see, it wasn't really handled by the old RTF importer either + the RTF exporter never uses that old syntax. I implemented the parser for the 97+ syntax in about a week, so I guess in similar time would be needed for the 95 one as well. (Or a bit less.)

I'll keep this bug open as it contains a useful test document and someone interested may implement this feature (or hopefully I'll have time for it, but I can't give you any estimate on that).
Comment 6 Roman Eisele 2012-05-04 09:17:08 UTC
This is (primarily) a Writer issue, therefore changed 'Component' field
Comment 7 Miklos Vajna 2012-05-07 00:57:57 UTC
Slow progress on this: I've now implemented the following keywords in master:

- \dprect
- \dplinecor, \dplinecog, \dplinecob
- \dpfillbgcr, \dpfillbgcg, \dpfillbgcb

And now the rectangles from the document are mostly OK. Next step would be adding support for old-style textboxes.
Comment 8 Miklos Vajna 2012-10-19 10:38:21 UTC
I now did textboxes and polylines in master, I think the only remaining problem is the two missing pictures. I'll come back to that later.
Comment 9 Not Assigned 2012-10-27 11:10:10 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":


fdo#42407 fix RTF import of WMF images inside textframes

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:
Affected users are encouraged to test the fix and report feedback.
Comment 10 Miklos Vajna 2012-10-27 11:11:32 UTC
OK, I think this is now finally in a reasonable shape in master. Sadly various fixes were needed here and there, so I can't really backport this to -3-6.
Comment 11 Lior Kaplan 2012-10-28 00:47:37 UTC
Fix verified with master build - great work!

Would be nice to have Hebrew show correctly as well (on the top right side, near the string 510817018).
Comment 12 Miklos Vajna 2012-10-28 21:43:16 UTC
Can you please open a separate bugreport for that?

Comment 13 Lior Kaplan 2012-10-29 06:55:42 UTC
Done: Bug 56512