Bug 116589 - SVG not rendered correctly in Writer (face fill)
Summary: SVG not rendered correctly in Writer (face fill)
Status: RESOLVED DUPLICATE of bug 99115
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:svg, regression
Depends on:
Blocks: SVG-Import
  Show dependency treegraph
 
Reported: 2018-03-23 16:42 UTC by kurt forrester
Modified: 2018-03-26 20:37 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
SVG created with matplotlib (13.70 KB, image/svg+xml)
2018-03-23 16:42 UTC, kurt forrester
Details
with <style> in <defs> (1.08 KB, image/svg+xml)
2018-03-24 12:18 UTC, Regina Henschel
Details
without <style> in <defs> (1.09 KB, image/svg+xml)
2018-03-24 12:20 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kurt forrester 2018-03-23 16:42:44 UTC
Created attachment 140831 [details]
SVG created with matplotlib

When I insert an SVG into Writer (see attached SVG as an example) it is not correctly rendered (circle faces should be open). If the same SVG is opened in Chrome, Libreoffice Draw, Inkscape, ... it renders correctly.

Reporduce
1. Create new Writer document
2. Insert the attached image (via the file menu, Insert > Image...)
3. Circles on the vertexes are rendered with closed faces (filled) when they should be open.
4. Compare output in Chrome, Opera, Firefox, ...

Expected behaviour
1. Circles to be rendered correctly
Comment 1 V Stuart Foote 2018-03-23 19:47:57 UTC
Inserting the SVG exhibits the issue, opening the SVG (to Draw) renders the path correctly.
Comment 2 Regina Henschel 2018-03-24 12:18:13 UTC
Created attachment 140852 [details]
with <style> in <defs>
Comment 3 Regina Henschel 2018-03-24 12:20:24 UTC
Created attachment 140853 [details]
without <style> in <defs>

I have reduced the problem. The reason is in the <defs> element line#6 to #10 in the attached documents.
Comment 4 kurt forrester 2018-03-24 13:11:18 UTC
Excellent! Thanks for the diagnosis. Should this render correctly in Libreoffice or is it an illegal syntax/style element in the SVG format that I need matplotlib to look at?
Comment 5 kurt forrester 2018-03-24 13:28:11 UTC
Based on the comments thus far I have refined the issue further. It appears to be an issue with the * preceding the style definition.

Original

<defs>
  <style type="text/css">
*{stroke-linecap:butt;stroke-linejoin:round;}
  </style>
 </defs>

Fixed

<defs>
  <style type="text/css">
{stroke-linecap:butt;stroke-linejoin:round;}
  </style>
 </defs>
Comment 6 Regina Henschel 2018-03-24 13:43:00 UTC
According to https://validator.w3.org/#validate_by_upload all attached files are valid.

Indeed exchanging the selector * with selector 'path' solves the problem.

We have already bug 100198 about the selector *, so likely duplicate.
Comment 7 kurt forrester 2018-03-24 14:29:33 UTC
Thank you. I will manually edit the files to work around the issue and follow the bug you referenced to see when it is resolved.
Comment 8 Xisco Faulí 2018-03-26 20:37:10 UTC
Regression introduced by e17a730c0076b10678c860ae3285bc8a98282415 which is the same as in bug 99115
The problem is indeed the *

*** This bug has been marked as a duplicate of bug 99115 ***