Problem description : The problem is under some conditions, RTF saver doesn't add image to the file. Steps to reproduce: 1. Open the RTF at this url with https://bugs.freedesktop.org/attachment.cgi?id=52627 . 2. Open the presentation at this url https://bugs.freedesktop.org/attachment.cgi?id=53215 3. Edit the mask of the presentation and copy the LibreOffice Logo. 4. Past the logo in the rtf 5. Save the RTF and close the ODP The resulted RTF have'nt the LibO Logo, the rtf file is still considered as opened (lock file) and contain some strange characters
I reproduce the problem with master under Ubuntu 10.04 x86_64 : LibreOffice 3.5.0 Build ID: dc06023-82728f1-ca7e6f5-3b66bd0-3cbbc64 - the second picture does not appears in the file opened by the master - strange characters are there - the size of the modified RTF file is smaller than the original ! But: - no problem for me with lock - the modified RTF file opens quite well in Abiword 2.8.2 Best regards. JBF
Based on the above comment, it's highly possible this is not an export but an import bug. :) Will have a look.
I can reproduce the problem -- at least partially -- with LibreOffice 3.5.0 [beta 0] Build-ID: ef91e38-b1d4df6-090bcba-45cf606-05891e7 running on MacOS X 10.6.8 German. Observations: - yes, the second picture does not appears in the RTF file; - yes, the size of the modified RTF file is smaller than the original. But: -- no problems for me with file locking etc. -- I’m not sure about the “strange characters” reported by Arnaud and Jean-Baptiste. Of course there are strange-looking things in the file, i.e. many MERGEFIELD items and «$commentaires.Libelle» placeholders. But this is not what you are talking about, is it? @Arnaud Versini, @Jean-Baptiste Faure: what kind of “strange characters” do you see in the RTF file, and where exactly?
Additional hint: the reduced file size is NOT related to the image-copy problem. Proof: if I just 1) open the sample RTF document with LibreOffice 3.5.0 beta 0, 2) add a space character somewhere, 3) save the document, 4) delete the space character again, 5) save the document again, the file size changes from 90.213 bytes (original) to 60.498 bytes (after saving). The sample document with the inserted (but invisible or invalid) LibreOffice logo is 62.288 bytes in size. This is another evidence for the idea suggested by comments #1 and #2 that the image is there (inside the file), it just gets not imported correctly by LibreOffice 3.5.0 beta 0 again from the changed RTF file.
No strange characters anymore with LO 3.5.0 beta1. It seems the problem is in the format of the clipboard: if I choose paste as bitmap (4th item in dropdown list of past button) or GDI metafile (3rd button) then the picture is present when the file is reopen. Both other picture formats seems to be unknown for RTF format. If my guess is correct then two first formats should be converted to bitmap when saving the file in RTF format. Best regards. JBF
Created attachment 56597 [details] Test document So the problem is unrelated to copy&paste but an export bug: the attached document can be saved to doc without problems, but the resulting rtf doesn't have a picture at all.
More details: the picture is not exported as it's considered as a shape, and the "binary picture data" (pib in rtf) of shapes is not exported. (In fact even the old rtf exporter in go-oo 3.2.x didn't export it.) I'll check how hard would it be to implement this.
Fixed in master: http://cgit.freedesktop.org/libreoffice/core/commit/?id=32fa7e9208b2053d2ff7743b88b0c0edacb8a7e7
fixed in libreoffice-3-5: http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=d2e2e3817376787f1804ee808bd37cc99815799a
Working as expected in LO 3.5.1 confirmed. Closing. Thank you.