Created attachment 119282 [details] screenshot of 5.1alpha I have a very simple test SVG with two boxes, one filled with yellow and the other filled with a very simple two-colour linear gradient, the linear gradient is drawn as filled black in Writer. I see bug #47439 but it seems to be about more complex linear gradients which render in the wrong direction and miss >2 colour points.
Created attachment 119283 [details] screenshot of expected rendering Expected rendering
Created attachment 119284 [details] svg test file SVG test file, the xml is: [code] <?xml version="1.0" encoding="utf-8"?> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="841.9px" height="595.3px" viewBox="0 0 841.9 595.3" style="enable-background:new 0 0 841.9 595.3;" xml:space="preserve" > <style type="text/css"> .st0{fill:#FFF200;stroke:#FFF200;stroke-miterlimit:10;} .st1{fill:url(#SVGID_1_);stroke:#000000;stroke-miterlimit:10;} </style> <rect x="70.3" y="48.3" class="st0" width="332.5" height="278.6"/> <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="432.1587" y1="340.3492" x2="770.254" y2="340.3492"> <stop offset="0" style="stop-color:#DBDBDB"/> <stop offset="1" style="stop-color:#737373"/> </linearGradient> <rect x="432.2" y="214.2" class="st1" width="338.1" height="252.4"/> </svg> [/code]
Confirmed on insert to Writer. Could not find a duplicate either. Another recent report: bug 94588 Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+ Build ID: f830600ece806ec365a4839e79afabe183c5e36d TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-10-06_22:49:09 Locale: en-US (fi_FI)
The problem is that SVG filter doesn't support styles defined inside <style type="text/css">
*** Bug 64276 has been marked as a duplicate of this bug. ***
*** Bug 78232 has been marked as a duplicate of this bug. ***
*** Bug 79854 has been marked as a duplicate of this bug. ***
*** Bug 53096 has been marked as a duplicate of this bug. ***
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.1.6 or 5.2.3 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20170103
This bug persists in macOS LO5.3 (tested using my test.svg attached to this bug report). Version: 5.3.0.1 Build ID: 3b800451b1d0c48045de03b5b3c7bbbac87f20d9 CPU Threads: 4; OS Version: Mac OS X 10.12.2; UI Render: GL; Layout Engine: new; Locale: en-GB (en_GB.UTF-8); Calc: group
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
still repro in Version: 6.3.0.0.alpha0+ (x64) Build ID: 3c964980da07892a02d5ac721d80558c459532d0 CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; TinderBox: Win-x86_64@42, Branch:master, Time: 2018-12-12_03:38:09 Locale: ru-RU (ru_RU); UI-Language: en-US Calc: threaded
The summary < FILEOPEN: SVG: <style type="text/css"> isn't supported > is no longer true. SVGIO supports <style type="text/css"> see https://opengrok.libreoffice.org/xref/core/svgio/source/svgreader/svgnode.cxx?r=b8db9688#207 However, 'st1' class contains an URL element fill:url(#SVGID_1_) pointing to id="SVGID_1_" and the library doesn't support that.
*** Bug 99562 has been marked as a duplicate of this bug. ***
*** Bug 127376 has been marked as a duplicate of this bug. ***
Created attachment 154261 [details] URL is not supported inside style type="text/css"> as this SVG shows, fill="url(#SVGID_1_)" works if declared in the element but not if done inside the class
I found the reason why it's failing. The svg files are read from top to bottom, so if we have something like <style type="text/css"> .st1{fill:url(#SVGID_1_);stroke:#000000;stroke-miterlimit:10;} </style> on top of the document, pNode in https://opengrok.libreoffice.org/xref/core/svgio/source/svgreader/svgstyleattributes.cxx?r=ec3a14ba#1339 is null because the element #SVGID_1 is not in the mapper yet. Moving the style block to the bottom would fix the issue...
taking
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ab1479956568b0d9a6022133cf651f846293aa46 tdf#94765: SVGIO: Look for gradient/pattern ids once the file... It will be available in 6.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I confirm that bug 103154 has been fixed in master.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-6-3": https://git.libreoffice.org/core/commit/92267cdb1a45e1f40199136849feb692f7e06d0e tdf#94765: SVGIO: Look for gradient/pattern ids once the file... It will be available in 6.3.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Commit Notification from comment #21) > Xisco Fauli committed a patch related to this issue. > It has been pushed to "libreoffice-6-3": > > https://git.libreoffice.org/core/commit/ > 92267cdb1a45e1f40199136849feb692f7e06d0e > > tdf#94765: SVGIO: Look for gradient/pattern ids once the file... > > It will be available in 6.3.3. > > The patch should be included in the daily builds available at > https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More > information about daily builds can be found at: > https://wiki.documentfoundation.org/Testing_Daily_Builds > > Affected users are encouraged to test the fix and report feedback. Just to inform on the positive results after using a patched version. On prior versions of Libreoffice, all Unifi/Ubiquiti SVGs in the following SVG pack were rendered mostly black: https://help.ubnt.com/hc/en-us/articles/204911374-Ubiquiti-Icons-and-Images-for-Diagrams Version: Nightly 2019/10/18 6.3.4.0.0+ There are still some issues with SVGs, but this particular one seems fixed. It is a shame that it appears impossible to make these SVGs useful in previous versions of Libreoffice. I have even created an extension, and still they are rendered mostly black.