Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||SVG file not rendered correctly - style in grouping overrides too much?|
|Product:||Writer||Reporter:||Anders Sjöström <anders.sjostrom>|
|Component:||open-import||Assignee:||Armin Le Grand <Armin.Le.Grand>|
|Status:||CLOSED FIXED||QA Contact:|
|Priority:||P3||CC:||anders.sjostrom, Armin.Le.Grand, phoenix.wanglf, rb.henschel|
|OS:||Mac OS X 10.7|
|Issue Type:||DEFECT||Latest Confirmation in:||---|
Description Anders Sjöström 2012-10-15 15:27:20 UTC
Created attachment 79777 [details] Wrong.svg I have found a SVG file that is rendered differently in Open Office than in Firefox 16 or Inkscape 0.48 etc. This is the file Wrong.svg. Note that the rectangle should not be dashed. I use Insert->Picture-From file... to import it. I have removed a grouping from the file, and after that the file renders as expected. This file is Correct.svg. Look at the picture OpenOffice_rendering.png which demonstrates how OpenOffice renders the files for me. In other tools both files renderes as the top one. Look at the picture Inkscape XML Editor.png which shows the attributes present on the grouping tag that only the troubled SVG file has. It would seem that it is the one thing that causes the problem. Both SVG files are created by Inkscape, saved as plain svg.
Comment 2 Anders Sjöström 2012-10-15 15:28:12 UTC
Created attachment 79779 [details] Inkscape XML Editor.png
Comment 3 Anders Sjöström 2012-10-15 15:28:33 UTC
Created attachment 79780 [details] OpenOffice_rendering.png
Comment 5 Armin Le Grand 2012-10-16 11:24:03 UTC
ALG: Taking over, need to check this.
Comment 6 Armin Le Grand 2012-10-30 15:05:27 UTC
ALG: Anders, good catch! The StrokeDasharrays were imported correctly with the styles, but their state were used inconsequently. Being empty made the get method to look for the parent, so it indicated that it was *not* set. The 'none' case was not recognized this way and the parent style was used. I have added a boolean to the styles to be able to remember when the StrokeDasharray was set to empty by purpose, in that case the get method will no longer travel the parent style chain to find a set StrokeDasharray. All works well then. Looked for some other 'none' defines in SVG1.2, but seems to be okay.
Comment 7 SVN Robot 2012-10-30 15:06:18 UTC
"alg" committed SVN revision 1403730 into trunk: #121221# added boolean state to remember when the StrokeDasharray was set to ...
Comment 8 Armin Le Grand 2012-10-30 15:06:36 UTC
ALG: Okay, done.
Comment 9 Li Feng Wang 2012-11-08 06:25:57 UTC
Verified pass, can render this svg normally as firefox.