Hover-over VSS symbols shows VSS file name not symbol name

Bug #1676144 reported by Christopher Hoskin on 2017-03-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Low
Patrick Storz

Bug Description

When hovering over a symbol from a Microsoft Visio Stencil, I see the name of the stencil file, not the individual symbol.

Steps to reproduce:

Download Visio Stencils, e.g.

https://www.microsoft.com/en-gb/download/details.aspx?id=35772

Extract and copy to /usr/share/inkscape/symbols

Choose Object/Symbols from the Inkscape menu and choose symbol set "2012_Stencil_121412.vss".

Hover over the first symbol. 2012Stencil121412_0 is displayed instead of "3rd-Party_Call_Center_Solution".

It should be possible to extract the symbol name from the VSS file as libvisio2svg [0] does this.

This is with Inkscape 0.92.

Thanks.

Christopher Hoskin

[0] https://github.com/kakwa/libvisio2svg

Patrick Storz (ede123) wrote :

We're using "libvisio" [1,2] for importing VSS files, not the one you mentioned.

There seems to be an "m_names" field in class "VSDShape" though [3], so it might be possible to implement (needs further investigation though).

[1] https://wiki.documentfoundation.org/DLP/Libraries/libvisio
[2] https://github.com/LibreOffice/libvisio/
[3] https://github.com/LibreOffice/libvisio/blob/master/src/lib/VSDStencils.h#L50

Hello,

Maintainer of libvisio2svg here.

For reference, in case that helps you:

To recover the title of each symbol, I've created a very basic librevenge generator:

https://github.com/kakwa/libvisio2svg/blob/master/src/lib/visio2svg/TitleGenerator.cpp
https://github.com/kakwa/libvisio2svg/blob/master/inc/visio2svg/TitleGenerator.h

The README.md explains how to use it:
https://github.com/kakwa/libvisio2svg/blob/master/README.md#recover-symbol-titles

Then, in a post-treatment loop, I use libxml2 to insert a <title>[symbol title]</title> inside the SVG generated by libvisio/librevenge.

It's not very efficient as the vss/vsd file is parsed two times, but it works.

By the way, I also do some other things in this post-treatment loop:
* converting emf blobs to svg
* converting wmf blobs to svg
* adding optional re-scaling

Patrick Storz (ede123) wrote :

Wow, great, thanks for the input! I figured we'd need to do some additional work, good to know you already took care of it. :-)

Have you considered getting this code implemented upstream? I assume having titles for stencils would be a common use case, so why not have it included in the default generator?

FYI, the relevant code section used in Inkscape is at [1]; nothing fancy, really just the default RVNGSVGDrawingGenerator at this point.

[1] http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/src/ui/dialog/symbols.cpp#L474

Patrick Storz (ede123) wrote :

I just committed a fix in
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/15615

It works fine with some sample files I grabbed from the internet, but since I'm not working with Visio stencils myself please test the implementation for any issues or potential regressions.

Testing build is available from
http://download.tuxfamily.org/inkscape/win64/inkscape_r15615_win64_MSYS2.7z

Changed in inkscape:
status: New → In Progress
status: In Progress → Fix Committed
assignee: nobody → Eduard Braun (eduard-braun2)
jazzynico (jazzynico) on 2017-04-06
Changed in inkscape:
importance: Undecided → Low
milestone: none → 0.93
tags: added: symbols
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers