Bug 78232 - Embedding PyGal SVG gives black box, but inkscape has no trouble
Summary: Embedding PyGal SVG gives black box, but inkscape has no trouble
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Libreoffice (show other bugs)
Version: 4.2.4.1 rc
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-03 21:30 UTC by tim-libreoffice
Modified: 2014-10-28 00:52 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
PyGal generated chart, SVG test file (20.89 KB, image/svg)
2014-05-03 21:30 UTC, tim-libreoffice
Details
Inkscape converted to "Plain SVG" (22.15 KB, image/svg+xml)
2014-05-03 21:30 UTC, tim-libreoffice
Details
Both files inserted into a document (PyGal's first, InkScape's second) (37.78 KB, image/png)
2014-05-03 21:31 UTC, tim-libreoffice
Details

Description tim-libreoffice 2014-05-03 21:30:04 UTC
Created attachment 98387 [details]
PyGal generated chart, SVG test file

I'm generating charts using the PyGal library which can be found here:
  http://pygal.org/

I like the ability to build scalable images that can work in both LibreOffice and the web.  Unfortunately, LibreOffice is failing to display the charts I generate.  

When I insert a PyGal generated SVG image (in either calc or write), I get just a black box.  If I instead open the SVG in inkscape, the chart looks fine.  From inkscape I can then save the image as "Plain SVG" in a second file, and then LibreOffice can handle the output of that.

I'm attaching 3 files:
- A PyGal generated SVG
- The Inkscape converted version of the SVG
- A screenshot of what both versions of the SVG look like in calc file


I have compared the SVG source of the two files a bit to see what is different.  The PyGal one has some JavaScript, but stripping this out has no effect on the display in either program.  One big difference is that the PyGal SVG seems to define most styles in a <style> tag and then applies those via classes to the XML file's elements.  The Inkscape "Plain SVG" version seems to have copied all of those style specifications down to each element individually.  So perhaps there are bugs in LibreOffice's interpretation of styles.

Note that I have tested for this issue in several recent versions of LibreOffice.  It exists in all.
Comment 1 tim-libreoffice 2014-05-03 21:30:57 UTC
Created attachment 98388 [details]
Inkscape converted to "Plain SVG"
Comment 2 tim-libreoffice 2014-05-03 21:31:46 UTC
Created attachment 98389 [details]
Both files inserted into a document (PyGal's first, InkScape's second)
Comment 3 steve ... 2014-10-28 00:52:28 UTC
Download SVG test file. Insert SVG into writer > black box.

Confirmed -> NEW with LO 4.3.3.1 on OSX 10.10, thus OS -> ALL.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.