Using LibreOffice 3 RC 1, if you insert an image on a document, move it to the left-hand side of the page, right click and choose Optimal Page Wrap, and then type some text to the right of the image, and then save it in the RTF format and open it in MS Office, MS Word Viewer or AbiWord, the wrapping is not preserved. Re-opening in LO the formatting is preserved.
Miklos, could you have a look at this one?
Created attachment 41422 [details]
writer document reproducing the issue
Steven, could you please confirm that the document I attached reproduces the issue? Just to make sure we're talking about the same one.
And yes, looks like it opens in Writer correctly as it implements the flymaincnt5 command group, which is not part of the spec, so nothing else supports that. Given that the WW8 export handles this, it should not be too hard to fix this.
I downloaded the file you attached, it was an odt. It opened in LibO, I saved it as an RTF file and it works beautifully; renders fine in Word Viewer 97 and 2003 and Abiword. I hope the fix isn't difficult to implement!
(In reply to comment #4)
> I downloaded the file you attached, it was an odt. It opened in LibO, I saved
> it as an RTF file and it works beautifully; renders fine in Word Viewer 97 and
> 2003 and Abiword. I hope the fix isn't difficult to implement!
Oh! Wait a minute, no it's not rendering properly. Sorry, the graphic was so small I didn't notice it at first! The words are lined up at the bottom of the graphic in other programs. So, you have successfully reproduce the issue.
Created attachment 41900 [details]
Here's a screenshot from MS Word Viewer 2003
As you can see, it ***not*** rendering the same as in LibO.
OK, here is my analysis so far. The RTF written by LO is not imported correctly in MSO as LO emits an LO-specific RTF extension to handle the situation. This is not a new bug, the old RTF export had the same issue. (I tested it with Go-OO 3.2.x) If you export the test document as DOC and open it in MSO then it's fine. If you export this doc as RTF in MSO then you get an RTF document which can't be imported properly by LO.
So there are two issues here:
1) I have to figure out what is a document that is opened by both MSO and LO.
2) Modify the exporter to emit such a document.
As a start, I'll give 1) a try tonight.
Created attachment 41928 [details]
This RTF file demonstrates some problems with import too
This was created in AbiWord and renders fine in MS Word Viewers. When opening in LibO, the photo shows up, but looks like it's anchored to the edge of the page and looks like some of the text appears in front of the image. Interesting.
Yep, that's what I wrote above - we have an import problem here as well. Though I want to fix the export part of it, as I'm not familiar with the import codebase at the moment.
I was wrong, the current situation is worse than in Go-OO 3.2.x.
This file reproduces the problem:
I'm attaching a patch that does not fix wrapping, but at least makes the picture visible, as 3.2.x did.
Created attachment 41945 [details]
partial fix that addresses the regression from go-oo 3.2.x
The .orig file is the output of the current exporter. The .rtf file is something Steven wants (it's handmade). The diff is the diff of the two files. As you can see we could just replace the nonstandard flymaincnt+shppict+nonshppict block with a standard shp+shpinst+shprslt, but the current importer can't understand that, and I don't want to break it.
To sum up, that's all I can do for now, I think.
Cedric, could you please have a look at the import part? (Don't worry, it never worked, so I consider it a feature that would be nice to have.)
Is this bug fixed in LO 3.5.0-beta1 ? It seems that saving the file to RTF change the anchor of the picture from "to paragraph" to "as character". Does that means that RTF can handle only anchor "as character" ?
Best regards. JBF
I *think* older RTF did not support, but recently you can wrap the picture to a shape and then you can have it. This new feature of Word is not supported by the exporter/importer, though ATM.
Import is now working beautifully. Export is behaving differently -- when rendered in Word the photo is moved below some of the text. IMO, export has gotten worse -- I think it would be better to behave as before, lining text up along the bottom of the photo.
FWIW, when I right click on the file in Windows Explorer I have the option of opening with LibreOffice Calc. That's an interesting choice.
I guess I should've mentioned I looking at wrap.rtf, the attachment labeled "This RTF file demonstrates some problems with import too".
Just test in LO 4 beta 2, to reproduce open wrap.rtf (attached). Just Save As, and keep the RTF format, close the document and reopen.
If you also did this mistake in other Bugs please undo your Version changes there!
This bug has not been touched by its owner for a long time. To make it clearer which bugs should be fixed by someone else please take following action:
- If you are the owner, and you are actively working on the bug, please give it an update.
- If you are the owner, and you do not plan to work on it in the near future,
please reassign it to the default assignee and change its status to NEW.
Bug not assigned to anyone, but had status ASSIGNED. Lets mark it as NEW
added as blocker for meta bug 81234 ([META] RTF filter issues)
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":
fdo#32613 RTF export: implemented anchored picture export
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.
Migrating Whiteboard tags to Keywords: (filter:rtf)