Bryce Harrington wrote:
On Fri, Apr 14, 2006 at 03:51:13AM -0500, Bob Jamison wrote:
Just FYI, for the next week or so we will be working on ODF drawing (.odg) output from Inkscape. If anyone is interested in helping map svg elements to office:drawing elements, we would certainly appreciate it. Here is an initial export of the tiger.svgz file to odg. Please note that it is a -very- early example, and most things require a lot of tweaking. This is paths-only, which will evolve into smarter exports later. Note that a lot of the style attributes still need to be translated, too. Also note that the coordinates were flipped in the Y-direction, so I fixed it manually.
This is great news! OpenOffice support has been a really long standing issue.
One question though - given Eric's nice progress with UberConverter recently, would you consider adding the ODF support at that level?
The benefit would be that your ODF work would then have broader applicability beyond SVG, to XAR and other formats. As well, having it as an extension rather than core code could make it a bit easier for others (like Xara) to help work on it with you (this is definitely a feature they'd be interested in sharing).
Of course, there's a few considerations, such as that it would be less easy to reuse existing Inkscape internals (such as the matrix code), and that you're not as familiar with UberConverter as you would be going directly to SVG. However, despite these challenges, I think in the larger scheme of things it would give a greater amount of benefit.
Yes, such a converter would be immensely useful, and worthy of contributions.
A couple of months ago, I wrote a Java class for experimenting with converting directly from an SVG file to an ODF office:drawing file. I'd like to donate it, but I'm afraid it doesn't do a very good job. Without a presentation model, it has insufficient information to do a high-fidelity load-and-save.
Doing this internally, odf-output has access to all of the information for the desktop, document, repr tree, and SPObject tree. I can read directly from it, bypass the SVG format, and write ODF directly from Inkscape's memory. You can't beat that! It's called "cheating!" ;-)
bob (ishmal)
p.s.: A lib that can convert anything to anything would necessarily need an internal format-neutral presentation model for reading and writing. I know of exactly two libs that do that: Imagemagick for bitmaps, and Batik for svg/ps/pdf/latex/etc. Imagemagick is large, and Batik is HUGE. It would take a lot of work, and I would gladly contribute to it.