Bug 62284 - SVG import regression in LibreOffice 4.0 and above
Summary: SVG import regression in LibreOffice 4.0 and above
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
Depends on:
Blocks: 64457 64459 64460 64462
  Show dependency treegraph
 
Reported: 2013-03-13 10:16 UTC by Iacopo Benesperi
Modified: 2015-12-17 07:13 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Test image (48.16 KB, image/svg+xml)
2013-03-13 10:16 UTC, Iacopo Benesperi
Details
Test image 2 (36.87 KB, image/svg+xml)
2013-03-13 10:17 UTC, Iacopo Benesperi
Details
Correct layout of svg in edit preview 3.6.7 (7.93 KB, image/png)
2013-09-19 15:12 UTC, Uwe Dippel
Details
Faulty layout of svg in edit preview in 4.0.2.2 (9.10 KB, image/png)
2013-09-19 15:14 UTC, Uwe Dippel
Details
Cropped SVG image when inserted (176.18 KB, image/png)
2013-11-09 11:46 UTC, szotsaki
Details
SVG image shows as blank when inserted (64.31 KB, image/svg+xml)
2014-12-14 17:43 UTC, Marnen Laibow-Koser
Details
osx10.10.1 lo 4.5nightly (110.01 KB, image/png)
2014-12-15 10:21 UTC, retired
Details
ubuntu 14.10, LO 4.3.3 (95.53 KB, image/png)
2014-12-15 10:21 UTC, retired
Details
ODT created with 5.0.0.5 does not show SVG in presentation mode (572.02 KB, application/vnd.oasis.opendocument.presentation)
2015-08-27 08:08 UTC, Uwe Dippel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iacopo Benesperi 2013-03-13 10:16:34 UTC
Created attachment 76461 [details]
Test image

Hi,
I'm working on my Master thesis and using svg images for drawings. While writing it I've stepped up from LibreOffice 3.5 to 3.6 and now 4.0. With LO 4.0 (both 4.0.0.3 and 4.0.1.2) I started having problems while importing svg images, i.e. images that were displayed fine in LO 3.6 are not displayed correctly in LO 4.0. Going back to LO 3.6 solved the problem (for both, I'm using the version downloaded from the LO website).

I'm attaching two of the images that are having problems. For one of them (esipt.svg) I have the font (FreeSans) used inside the image installed in my system, for the other no (helvetica). I'm using linux as a main system but the problem is present in Windows 7, too.

Steps to reproduce:
0. If needed, install GNU FreeFonts: http://ftp.gnu.org/gnu/freefont/
1. Open images in Inkscape: everything's ok.
2. Import images in LO 3.6: everything is displayed correctly.
3. Import images in LO 4.0: esipt.svg has characters in the three chemical structures bigger than expected, the other one is totally messed up.
Comment 1 Iacopo Benesperi 2013-03-13 10:17:08 UTC
Created attachment 76462 [details]
Test image 2
Comment 2 Thomas van der Meulen [retired] 2013-03-13 13:53:32 UTC
Thank you for reporthing this bug,
I can reproduce this bug running LibreOffice 4.0.1.2 on Windows 7. 
This is a annouing bug so i will set the importance high.
Comment 3 ape 2013-03-20 12:02:01 UTC
Look at bug 62461 please.
Comment 4 Uwe Dippel 2013-09-19 15:12:49 UTC
Created attachment 86150 [details]
Correct layout of svg in edit preview 3.6.7
Comment 5 Uwe Dippel 2013-09-19 15:14:17 UTC
Created attachment 86151 [details]
Faulty layout of svg in edit preview in 4.0.2.2
Comment 6 Uwe Dippel 2013-09-19 15:16:02 UTC
I *think* I can confirm this.
Mine is not chemistry, but perfectly okay simple electric circuit diagrams. I made maybe hundred, inserted into the presentation (LO 3.7.X.X) one year ago, came out okay, and now with 4.0.2.2 they are garbled, parts missing, especially with parts close to the borders being cropped. But also positions of elements have changed. 

I have inserted a screenshot of the edit preview in 4.0.2.2 ('faulty') of the same identical presentation file and the edit preview in 3.6.7. ('correct').

Make that a bad regression, and to me this is not 'major', but a blocker. I have a dozen presentations, with hundreds of image files - either svg or eps - and both formats do not come out in any proper sense. They don't allow proper export to PDF neither with 4.0.2.2. 
This software should not have been released. Over.
Comment 7 giovanni.vecchi 2013-11-05 09:39:04 UTC
I can confirm that in 4.1.2.3 version I can't import SVG file into a new LibreOffice Draw gallery; steps to reproduce:

- Start a new Draw project
- Put the check on Tools -> Gallery
- From Gallery pane click on "New Theme" button
- From Files pane click on "Find files" button
- Choose folder where SVG files are contained and click on "OK" button
- Click on "Add all" button and next to "OK" button
- New Theme is created but no SVG files are imported

I'm using SVG Cisco icons: http://www.cisco.com/web/about/ac50/ac47/3015_eps.zip

It's a really annoying bug, I would very happy if you will fix it!

Thanks a lot.
Comment 8 szotsaki 2013-11-09 11:46:01 UTC
Created attachment 88926 [details]
Cropped SVG image when inserted

LibreOffice 4.1.1.2 also crops some SVG pictures.

The attached file shows that the NVIDIA logo is cropped after inserting. Resizing just magnifies the cropped part.

URL to the logo: http://upload.wikimedia.org/wikipedia/en/2/21/Nvidia_logo.svg
Comment 9 Owen Genat (retired) 2013-12-08 07:02:25 UTC
I have added some test files (SVGs of small electrical circuit symbols) here:

https://bugs.freedesktop.org/show_bug.cgi?id=67039#c6

That particular bug exhibited a regression problem that appears to be covered by this report (and another issue that is not). I suppose it could be added to the Blocks list for this bug, although the test files are probably more important. Keyword "regression" added.
Comment 10 Goyo 2014-08-28 21:06:17 UTC
Can someone change the status to confirmed?
Comment 11 Goyo 2014-10-10 17:01:05 UTC
I tested every svg files attached to or linked from this report with LO 4.3.2. Issues when inserting into documents (Insert > Picture > From file) have been fixed. Issues when opening in draw remain.
Comment 12 Owen Genat (retired) 2014-10-11 00:36:05 UTC
(In reply to Goyo from comment #11)
> I tested every svg files attached to or linked from this report with LO
> 4.3.2. Issues when inserting into documents (Insert > Picture > From file)
> have been fixed. Issues when opening in draw remain.

Yes. The problem with this report is that the "regression" in handling related to use of Insert > Picture > From file has now been resolved. The open-using-Draw behaviour is not a regression, but rather is a problem Inherited from OOo, as indicated in bug 67039.

I personally feel this general (not handled correctly) bug should be RESOLVED. It would be more helpful to have a series of more specific SVG bugs that each deal with individual handling aspects i.e., area fill as in the linked bug.
Comment 13 Owen Genat (retired) 2014-10-11 04:19:39 UTC
(In reply to Owen Genat from comment #12)
> I personally feel this general (not handled correctly) bug should be
> RESOLVED. It would be more helpful to have a series of more specific SVG
> bugs that each deal with individual handling aspects i.e., area fill as in
> the linked bug.

To clarify, these are the elements of attachment 76461 [details] and attachment 76462 [details] that are not as expected when these SVGs are imported (via File > Open):

- Text not displayed (bug 32248).
- Subscripted numbers not displayed (bug 64462 - which actually uses attachment 76462 [details]).
- Text position inaccurate (which may be bug 79153).
Comment 14 Marnen Laibow-Koser 2014-12-14 17:42:27 UTC
(In reply to Goyo from comment #11)
> I tested every svg files attached to or linked from this report with LO
> 4.3.2. Issues when inserting into documents (Insert > Picture > From file)
> have been fixed.

I'm still having problems importing SVG files in LO 4.3.4.1 (Mac OS X 10.10). I'll attach the file I'm having trouble with.
Comment 15 Marnen Laibow-Koser 2014-12-14 17:43:35 UTC
Created attachment 110836 [details]
SVG image shows as blank when inserted

The attached file is valid according to the W3C's validator, and displays correctly (as music notation) in Chrome, but shows as blank in when imported into LibreOffice 4.3.4.1 on Mac OS X 10.10.
Comment 16 Regina Henschel 2014-12-14 21:06:49 UTC
(In reply to Marnen Laibow-Koser from comment #15)
> Created attachment 110836 [details]
> SVG image shows as blank when inserted
> 
> The attached file is valid according to the W3C's validator, and displays
> correctly (as music notation) in Chrome, but shows as blank in when imported
> into LibreOffice 4.3.4.1 on Mac OS X 10.10.

The problem has nothing to do with file>open. Therefore I have written a new issue 87309.
Comment 17 retired 2014-12-15 10:20:23 UTC
Hi all,

I think it's not a good idea to gather all SVG issues in a single bug.  That way it's hard to stay focussed and keep track of how things are evolving.
So to move this forward I tested the two SVGs from original poster.

OSX 10.10.1 LO Version: 4.5.0.0.alpha0+
Build ID: aba7f4c0a3527ce0cee6e18385cf69778052402d
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2014-12-15_06:44:56
Locale: de_

Working fine, Screenshot attached.

Ubuntu 14.10, LO 4.3.3: working fine, screenshot attached.


Comment 10/11: Can we close this bug and start with a clean new if anything draw related is remaining unresolved? Import from file in writer works for me.

If issues with that remain, maybe also create a new bug. The two svgs from OP did open and insert fine for me on Ubuntu and OSX.

Regina has opened a new issue. So what's with this thing here? Renaming title and changing the bug to make it "fit" a remaining different problem than originally reported is not a good idea I honestly think.
Comment 18 retired 2014-12-15 10:21:17 UTC
Created attachment 110851 [details]
osx10.10.1 lo 4.5nightly
Comment 19 retired 2014-12-15 10:21:57 UTC
Created attachment 110852 [details]
ubuntu 14.10, LO 4.3.3
Comment 20 V Stuart Foote 2015-01-10 18:59:04 UTC
Closing--issue of OP resolved. Comment 7 was invalid (eps not svg) and SVGs are using the import filter for insertion into gallery rather than the Draw fileOpen filter.

Specific issues handling SVG as in comment 13, with addition of latest unspecified "currentColor" mishandled issue of bug 87309.

Closing this Resolved Worksforme (there have been multiple commits to insert filter handling SVGs).
Comment 21 Uwe Dippel 2015-08-27 08:08:45 UTC
Created attachment 118216 [details]
ODT created with 5.0.0.5 does not show SVG in presentation mode
Comment 22 Uwe Dippel 2015-08-27 08:10:02 UTC
[I was one of the earlier commentators]

I am on LibreOffice 5.0.0.5 which is supposed to be 'okay'. I created a new slide in a set of slides, added a .svg.
It shows in edit mode, but in presentation mode the slide is and remains empty of any indication of an image.

Therefore, I think the best choice is to reopen this bug, because it has not been resolved.
Comment 23 Goyo 2015-08-27 08:47:59 UTC
I cannot replicate the problem (LO 5.0.0.5 from TDF, Windows 7). It looks the same in edit or presentation mode, with a graph filling most of the slide.

In any case I suggest leaving this bug closed and open a new one with your specific issue. This one is getting quite confusing and seems to mix several, unrelated issues.
Comment 24 Buovjaga 2015-08-27 09:06:34 UTC
Goyo is right. Better to start with a clean slate (this has so many comments already). Setting back to WFM.
Comment 25 Robinson Tryon (qubit) 2015-12-17 07:13:32 UTC
Migrating Whiteboard tags to Keywords: (bibisectRequest)
[NinjaEdit]