Bug 60471 - SVG images written by Adobe Illustrator SVG Export Plug-In are not loaded in 4.0.0
Summary: SVG images written by Adobe Illustrator SVG Export Plug-In are not loaded in ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: bibisected40 target:4.1.0 target:4.0.1
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-02-08 06:43 UTC by Bastián Díaz
Modified: 2017-03-20 05:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Image LO 4.0 (336.47 KB, image/png)
2013-02-09 04:26 UTC, Bastián Díaz
Details
Image LO 3.6 (117.17 KB, image/png)
2013-02-09 04:27 UTC, Bastián Díaz
Details
ODP (206.33 KB, application/vnd.oasis.opendocument.presentation)
2013-02-09 04:28 UTC, Bastián Díaz
Details
SVG Tux (218.90 KB, image/svg+xml)
2013-02-09 04:28 UTC, Bastián Díaz
Details
SVG IBM SPSS (8.22 KB, image/svg+xml)
2013-02-09 04:29 UTC, Bastián Díaz
Details
bibisect40 log (2.81 KB, text/plain)
2013-02-10 19:42 UTC, Jorendc
Details
terminal output (4.42 KB, text/plain)
2013-02-10 19:49 UTC, Jorendc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bastián Díaz 2013-02-08 06:43:46 UTC
I upgraded to LibreOffice 4.0 on GNU / Linux (Fedora) and Windows 7 and I have noticed that in all my writings and presentations, graphics in SVG format are not displayed (graphics when viewed in LibreOffice 3.6).

This affects all LibreOffice modules.

thanks
Comment 1 Marcos Souza 2013-02-08 11:33:04 UTC
Hi Bastián,

I tried to open a SVG format in Draw and it only shows the page in Black color.

I tested this on Linux using master branch(updated last night).

Do you have the same behavior? Can you post a file and/or provide a print screen showing what error occurs in your LO?

Thanks since now!
Comment 2 Bastián Díaz 2013-02-09 04:23:47 UTC
(In reply to comment #1)

Hi, sorry for not providing more information above.

System Information:

Fedora 18, GNOME 3.6.2, LibreOffice 4.0.0.3 (Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89)

Conducting more thorough testing, I found that some SVG format files are not displayed in LO 4.0 (which when viewed in 3.6).

Attachment 2 screenshots: One are shown as images in LO Version 3.6.3.2 (Build ID: 3.6.3.2-8.fc18) and another as seen in AS 4.0 (an image is displayed and the other not) → are representative examples.

Also attached SVG files and presentation in ODP.

I remember that this also happens in Windows 7.

thanks
Comment 3 Bastián Díaz 2013-02-09 04:26:54 UTC
Created attachment 74463 [details]
Image LO 4.0
Comment 4 Bastián Díaz 2013-02-09 04:27:38 UTC
Created attachment 74465 [details]
Image LO 3.6
Comment 5 Bastián Díaz 2013-02-09 04:28:10 UTC
Created attachment 74466 [details]
ODP
Comment 6 Bastián Díaz 2013-02-09 04:28:56 UTC
Created attachment 74467 [details]
SVG Tux
Comment 7 Bastián Díaz 2013-02-09 04:29:27 UTC
Created attachment 74468 [details]
SVG IBM SPSS
Comment 8 team.gaming 2013-02-10 18:14:30 UTC
I can confirm this problem.
For me the following svg file doesnt work anymore: http://upload.wikimedia.org/wikipedia/commons/e/e3/Bundesadler_Bundesorgane.svg
Comment 9 Jorendc 2013-02-10 19:31:32 UTC
I can confirm this using Linux Mint 14 x64 using LibreOffice 4.1.0.0.alpha0+ (Build ID: 80cbc04c2cbe25ebdfe2f22bb2e5ba62728e963).

I can reproduce this behavior using Mac OSX 10.8.2 LibreOffice 4.0.0.3 rc3, I CAN'T reproduce this using LibreOffice 3.6.4.2. Therefore I can confirm this is a regression.

When I save the odp using Mac OSX and LibreOffice 4.0.0.3 rc3 , and reopen it using LibreOffice 3.6.4.2 the image is still there. So NO loss of data, it's just not displayed.

I'll bibisect this one.
Comment 10 Jorendc 2013-02-10 19:42:20 UTC
Created attachment 74563 [details]
bibisect40 log
Comment 11 Jorendc 2013-02-10 19:49:55 UTC
Created attachment 74564 [details]
terminal output
Comment 12 Robinson Tryon (qubit) 2013-02-12 10:49:13 UTC
Clarify language of title:

"do not display images in SVG format" -> "After upgrade from 3.6 -> 4.0, SVG images no longer display properly"
Comment 13 team.gaming 2013-02-12 17:13:30 UTC
Qubit, not exactly. It is a general issue of LibreOffice 4 so a clean install has the same problem
Comment 14 Robinson Tryon (qubit) 2013-02-12 18:05:14 UTC
Clarify title further (upgrade not necessary):

"After upgrade from 3.6 -> 4.0, SVG images no longer display properly" -> "SVG images do not display properly in 4.0"
Comment 15 Michael Stahl (allotropia) 2013-02-13 15:35:05 UTC
problem is that SPSS\ IBM.svg contains an internal entity declaration:
 
 <!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In  -->
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
 ]>

that one is not actually used, but google finds other SVG files
from the same producer where it is used:

 <!DOCTYPE svg PUBLIC [...]
   <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
   <!ENTITY ns_svg "http://www.w3.org/2000/svg">
   <!ENTITY ns_xlink "http://www.w3.org/1999/xlink">
 ]>
 <svg [...] xmlns:xlink="&ns_xlink;" xmlns="&ns_svg;" [...] >

apparently it's hip to define namespaces in this convoluted manner
or something.

since version 3.5.something, the SaxExpatParser in LO refuses to load
files with internal XML entities to prevent trivial DoS via
recursive entities.  this was not a problem so far because no ODF or
OOXML producer writes these.

LO 3.6 and earlier did not use SaxExpatParser to import SVG.

so apparently we have to enable SaxExpatParser to handle internal
XML entities when reading SVG files; done that on master.
Comment 16 Not Assigned 2013-02-13 15:39:51 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fcb1e4d8433b49686cd8e53c699dd5d6503ea314

fdo#60471: svgio, sax: enable internal entity declarations for SVG



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 17 team.gaming 2013-02-15 09:56:59 UTC
The file I am using is created by Illustrator 11 (not 14), so please dont be too specific. 

It seems it is just a problem with the extra markup in the svg file (the files are valid) and maybe with SVG files created by Illustrator (any version) due to the extra markup and they should also work in LO4 as they are valid (W3C checked)
Comment 18 Michael Stahl (allotropia) 2013-02-15 10:05:37 UTC
ok then other versions are affected too...

of course the SVG files are not in any way invalid (AFAIK),
it's just that using internal XML entities adds complexity
that is entirely gratuitous.
Comment 19 Not Assigned 2013-02-15 10:37:47 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e9461ceb78c759e5f1cffbaad7b1b25491ed3807&h=libreoffice-4-0

fdo#60471: svgio, sax: enable internal entity declarations for SVG


It will be available in LibreOffice 4.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 20 vihsa 2017-03-20 05:53:11 UTC
verified.
Version: 5.4.0.0.alpha0+ / Build ID: febc116 / ls-4001 / android 5.1

the images are appearing similar to lo 3.6 screenshot attachment.