Two weeks ago, I had the privilege to work on a fun project using company time – it was Novell HackWeek again. So I teamed up with friend & colleague Fridrich to finally get OOo its long-deserved built-in SVG import – in fact, this is the most voted-for feature of the whole project.
So we started off of kendy’s work in ooo-build, and hacked up a native C++ component (the external implementation unfortunately has strong dependencies on Java5 and Batik, and is GPL-licensed – but great work, and a piece still superior in import quality) that sucks in a DOM tree from the SVG file, subverts that into a temporary container for ODF styles (which, unfortunately, needs to be written before referencing them in a flat ODF file), and then pushes out events for a SAX parser, which has the nice side effect of making standalone svg-odf conversion trivial (in fact, a svg2odf command line tool is on my disk). This stuff has been committed to ooo-build.
What’s working? See for yourself:
What’s missing yet: text and gradients are clearly very noticeably lacking – though this is luckily totally unapparent from the screenshots
We’ll keep working on this in our spare time, so there’ll hopefully be updates soonish. It would just be great to take advantage of the vast amount of svg cliparts out there – without needing to convert them to png, as OOo currently does…