Bug 106344 - Wrong coordinates of elements in VSS file
Summary: Wrong coordinates of elements in VSS file
Status: NEW
Alias: None
Product: Document Liberation Project
Classification: Unclassified
Component: libvisio (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:visio
Depends on:
Blocks: Visio
  Show dependency treegraph
 
Reported: 2017-03-05 21:29 UTC by kakwa
Modified: 2021-02-20 23:55 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
veeam 2d stencils png (117.69 KB, image/png)
2017-03-21 19:32 UTC, kakwa
Details
veeam 3d stencil png (140.03 KB, image/png)
2017-03-21 19:32 UTC, kakwa
Details
CCP Visio Stencil png (93.55 KB, image/png)
2017-03-21 19:33 UTC, kakwa
Details
DL20 Gen9 SFF front png (45.12 KB, image/png)
2017-03-21 19:34 UTC, kakwa
Details
veeam 2d stencils converted by libvisio2svg (135.62 KB, application/octet-stream)
2017-03-21 19:35 UTC, kakwa
Details
veeam 3d stencil converted by libvisio2svg (180.90 KB, application/octet-stream)
2017-03-21 19:36 UTC, kakwa
Details
CCP Visio Stencil converted by libvisio2svg (2.31 MB, application/gzip)
2017-03-21 19:37 UTC, kakwa
Details
HPE-Proliant-DL stencil converted by libvisio2svg (3.43 MB, application/octet-stream)
2017-03-21 19:38 UTC, kakwa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kakwa 2017-03-05 21:29:24 UTC
Hello,

I maintain a small tool called libvisio2svg: https://github.com/kakwa/libvisio2svg

This tool glues together libvisio/librevenge, libwmf and libemf2svg (another conversion library I maintain). This tool uses libvisio/librevenge to convert VSS and VSD file to SVG(s), and then, in a second pass, converts the EMF/WMF blobs commonly found in the output of libvisio/librevenge.

A user of mine had some issues with the following stencils:

- http://arcitura.com/system/application/visio/CCP_Visio_Stencil.zip
- https://www.veeam.com/vmware-esx-stencils-download.html#

With the CCP_Visio_Stencil the content is mostly one big EMF blob, and the coordinates seems wrong. For example, using vss2raw, I get for the first stencil:

- dimensions: "svg:height: 0.5377in, svg:width: 0.5370in"
- dimensions and position of the EMF blob: "svg:height: 0.5377in, svg:width: 0.5370in, svg:x: 48.0000in, svg:y: -10.5000in"

The EMF blob position (svg:x: 48.0000in, svg:y: -10.5000in) is weird, it places the blob well outside the borders of the image.

This problem affects all images of this VSS file.

It's a bit less systematic with the VEEAM stencils, but most of the coordinates are wrong to:
- dimension: "svg:height: 0.2613in, svg:width: 1.0018in"
- first point in path: 1.0016in, svg:y: -22.3309in

I also had some issues, with positions being slightly off with stencils like the Visiocafe HP ones 
- http://www.visiocafe.com/downloads/hp/HPE-ProLiant.zip

(For example "DL20 Gen9 SFF front" where the height should be ~2 times what it is).
Comment 1 Xisco Faulí 2017-03-14 09:15:46 UTC
Hi kakwa,
Could you please attach a screenshot showing how the documents should look like?
it would help us to understand the problem.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested screenshot is provided.
Comment 2 kakwa 2017-03-21 19:32:01 UTC
Created attachment 132053 [details]
veeam 2d stencils png
Comment 3 kakwa 2017-03-21 19:32:57 UTC
Created attachment 132054 [details]
veeam 3d stencil png
Comment 4 kakwa 2017-03-21 19:33:35 UTC
Created attachment 132055 [details]
CCP Visio Stencil png
Comment 5 kakwa 2017-03-21 19:34:34 UTC
Created attachment 132056 [details]
DL20 Gen9 SFF front png
Comment 6 kakwa 2017-03-21 19:35:59 UTC
Created attachment 132057 [details]
veeam 2d stencils converted by libvisio2svg
Comment 7 kakwa 2017-03-21 19:36:36 UTC
Created attachment 132058 [details]
veeam 3d stencil converted by libvisio2svg
Comment 8 kakwa 2017-03-21 19:37:35 UTC
Created attachment 132059 [details]
CCP Visio Stencil converted by libvisio2svg
Comment 9 kakwa 2017-03-21 19:38:45 UTC
Created attachment 132060 [details]
HPE-Proliant-DL stencil converted by libvisio2svg
Comment 10 kakwa 2017-03-21 19:40:42 UTC
I've added screenshot of the stencils, I've also added the resulting SVG from libvisio2svg tool.
Comment 11 kakwa 2017-03-21 20:10:53 UTC
OS: Debian sid

libvisio version: 0.1.5-4+b1
librevenge version: 0.0.4-6
Comment 12 kakwa 2017-03-29 07:55:57 UTC
Hello again,

There are also some issues with the MS Office Symbols:
https://www.microsoft.com/en-gb/download/details.aspx?id=35772

Most of stencils have alignment issues (some in 2012_Stencil_121412.vss, nearly all in s_*.vss (s_symbols_Databases_2014, s_symbols_Servers_2014...) stencils)

For example, with the archive icon in 2012_Stencil_121412.vss, vss2xhtml gives:

<svg:svg version="1.1" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="42.7500" height="58.5000" >
    <path xmlns="http://www.w3.org/2000/svg" d="  M-576.0000,58.5000 L-533.2500,58.5000 L-533.2500,0.0000 L-576.0000,0.0000 L-576.0000,58.5000 Z" style="fill-rule: evenodd; fill: #ffffff; "/>
    <path xmlns="http://www.w3.org/2000/svg" d="  M-574.5000,57.0000 L-534.7500,57.0000 L-534.7500,1.5000 L-574.5000,1.5000 L-574.5000,57.0000 Z" style="fill-rule: evenodd; fill: #808080; "/>
    <path xmlns="http://www.w3.org/2000/svg" d="  M-573.0000,55.5000 L-536.2500,55.5000 L-536.2500,3.0000 L-573.0000,3.0000 L-573.0000,55.5000 Z" style="fill-rule: evenodd; fill: #ffffff; "/>
    <path xmlns="http://www.w3.org/2000/svg" d="  M-569.2500,51.7500 L-540.0000,51.7500 L-540.0000,31.5000 L-569.2500,31.5000 L-569.2500,51.7500 Z" style="fill-rule: evenodd; fill: #808080; "/>
    <path xmlns="http://www.w3.org/2000/svg" d="  M-567.7500,50.2500 L-541.5000,50.2500 L-541.5000,33.0000 L-567.7500,33.0000 L-567.7500,50.2500 Z" style="fill-rule: evenodd; fill: #ffffff; "/>
    <path xmlns="http://www.w3.org/2000/svg" d="  M-555.7500,47.2500 L-553.5000,47.2500 L-553.5000,45.0000 L-555.7500,45.0000 L-555.7500,47.2500 Z" style="fill-rule: evenodd; fill: #808080; "/>
    <path xmlns="http://www.w3.org/2000/svg" d="  M-561.0000,42.7500 L-548.2500,42.7500 L-548.2500,41.2500 L-561.0000,41.2500 L-561.0000,42.7500 Z" style="fill-rule: evenodd; fill: #808080; "/>
    <path xmlns="http://www.w3.org/2000/svg" d="  M-569.2500,27.7500 L-540.0000,27.7500 L-540.0000,7.5000 L-569.2500,7.5000 L-569.2500,27.7500 Z" style="fill-rule: evenodd; fill: #808080; "/>
    <path xmlns="http://www.w3.org/2000/svg" d="  M-567.7500,26.2500 L-541.5000,26.2500 L-541.5000,9.0000 L-567.7500,9.0000 L-567.7500,26.2500 Z" style="fill-rule: evenodd; fill: #ffffff; "/>
    <path xmlns="http://www.w3.org/2000/svg" d="  M-555.7500,23.2500 L-553.5000,23.2500 L-553.5000,21.0000 L-555.7500,21.0000 L-555.7500,23.2500 Z" style="fill-rule: evenodd; fill: #808080; "/>
    <path xmlns="http://www.w3.org/2000/svg" d="  M-561.0000,18.7500 L-548.2500,18.7500 L-548.2500,17.2500 L-561.0000,17.2500 L-561.0000,18.7500 Z" style="fill-rule: evenodd; fill: #808080; "/>
</svg:svg>

The issue is the weird "-5xx" X coordinate like "L-561.0000,18.7500", I suspect either a missing "translate" record handling or mistakes in the origin computation.
Comment 13 Xisco Faulí 2018-11-26 19:11:36 UTC
Dear kakwa,
Could you please try to reproduce it with the latest version of LibreOffice
from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the bug is still present in the latest version.
Comment 14 kakwa 2018-11-28 13:13:10 UTC
Hello,

Testing with libvisio 0.1.6, which is the latest libvisio release as of today (2018/11/28), the issue is still present.

Looking at the commit history of the libvisio git, I see nothing indicative that there was a fix or a fix attempt.

Have a nice day and thank you.
Comment 15 kakwa 2018-11-28 13:43:12 UTC
Here is another vss that exhibit wrong coordinates: https://www.juniper.net/assets/visio-icons/juniper-mx-series-icons.zip

It's less dramatic, but the is an offset that puts half the drawing outside of the borders. (ex: 10x10GE_MIC.svg)
Comment 16 Valek Filippov 2021-02-20 23:55:09 UTC
CCP and veeam seem to be not available.

But at least "2012_Stencil_121412.vss" does have something less usual and worth investigation.