On 14/09/2011 16:49, Alexandre Prokoudine wrote:
During this GSoC a LibreOffice student and her mentor implemented support for VSD, binary Microsoft Visio documents, that Microsoft never bothered to publish a specification on. The student managed to do far more that she expected and ended up with a nice C++ library for parsing VSD called libvisio that supports all geometric primitives, formatted text, embedded stencils, all kinds of fills and strokes etc. The long story is here: http://libregraphicsworld.org/articles.php?article_id=41
Now, the short story is that the libvisio library (currently at v0.0.7) has a tool called vsd2xhtml which converts VSD to SVG documents and embeds them into XHTML documents. So it looks like it's possible to write an extension for loading VSD directly to Inkscape. Otherwise you have to do some text editing to get an SVG out of that XHTML.
Howevere there is a party trick involved. Since VSD files are often multipage, the convertor dumps every page into same XHTML file one by one. So if someone decides to have a go at it, I think it would rather be loader similar to our PDF loader which provides preview for letting a user to choose a page for importing.
Yesterday, Fridrich Strba shared a patch on #inkscape (irc) to add internal support in Inkscape for VSD files, based on libvisio.
With the patch, VSD files can be opened directly with Inkscape. For multi-page documents, an import options dialog ('Page Selector') allows to preview and select an individual page.
On behalf of Fridrich, I just added the patch to the bug tracker:
Bug #1015572 [Patch] import "Microsoft Visio Diagram (*.vsd)" files https://bugs.launchpad.net/inkscape/+bug/1015572
He is now asking for someone familiar with Inkscape's code and GTK+ to take over and redo the import options dialog (it could then be reused for libcdr as well).
Many thanks to Fridrich for developing and sharing the patch!
~suv
p.s. Initial tests with current trunk (on OS X) look great :) http://dl.dropbox.com/u/65084033/irc/inkscape-r11505-visio-import-1.png