Bug 37072 - Another SVG-drawing is badly imported
Summary: Another SVG-drawing is badly imported
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
3.3.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-10 07:43 UTC by gleppert
Modified: 2014-07-25 16:08 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
svg-testfile-saved-as-inkscape-svg.svg (97.92 KB, image/svg+xml)
2011-05-10 07:43 UTC, gleppert
Details
svg-testfile-saved-as-normal-svg.svg (80.50 KB, image/svg+xml)
2011-05-10 07:44 UTC, gleppert
Details
test file saved as inkscape svg (107.69 KB, image/svg+xml)
2011-12-22 09:20 UTC, mathog
Details
test file saved as plain svg from within inkscape (87.59 KB, image/svg+xml)
2011-12-22 09:25 UTC, mathog
Details
test file as inkscape svg once opened in LODraw, screen shot (86.49 KB, image/png)
2011-12-22 09:26 UTC, mathog
Details
insert SVG with 3.5.0b2, move to impress, save as PPT (35.59 KB, image/png)
2012-01-19 08:52 UTC, mathog
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gleppert 2011-05-10 07:43:24 UTC
Created attachment 46547 [details]
svg-testfile-saved-as-inkscape-svg.svg

I have no real luck with the SVG files, I want to use in LibreOffice. Additional to bug 36890, I have another SVG-drawing which is badly imported in LO. Please have a look at the attachment. If you import it in LibreOffice
(Draw, Writer,..), the result is wrong counting in total five errors:

*There is some strange wavy line in the left top corner
*The fine lines between the North African states are missing
*All writing in the drawing is missing
*There is some strange black bar visible on the left side
*The lines are drawn much fatter compared to the original.

Steps to reproduce:
* Start LibreOffice, open e.g. a Writer document
* Insert -> Image -> From File and choose attached .svg-file.
* Result: The drawing looks different and wrong.

Additional remarks:
* The files were produced in Inkscape. Attached are two files, one is saved as "Inkscape SVG", the other one is saved as "normal svg" file.
* The svg-drawing looks perfectly in Inkscape, Opera and Chrome/Chromium. In Firefox and eye of gnome, almost everything looks perfect, although I also see there this strange black bar on the left side.


System: Ubuntu 10.10/Gnome 2, LibreOffice 3.3.2 PPA, German UI, Intel 32-Bit.
Comment 1 gleppert 2011-05-10 07:44:07 UTC
Created attachment 46548 [details]
svg-testfile-saved-as-normal-svg.svg
Comment 2 Noel Power 2011-05-10 14:06:05 UTC
assigning to thorsten ( who I think still wants to get svg files ) but who maybe might want to reassign back to the list
Comment 3 tester8 2011-07-03 10:05:16 UTC
Reproduced with

LO 3.4.1 (OOO340m1 (Build:101))
Ubuntu 10.04.2 x86
Linux 2.6.32-32-generic Russian UI

with both images.
Comment 4 mathog 2011-12-22 09:20:35 UTC
Created attachment 54707 [details]
test file saved as inkscape svg

Here is another example of a file which imports very poorly into LODraw.  This variant is an Inkscape svg, and at least some of it comes through.  But the text is lost, patterns are lost, arrow heads come off and cluster in the upper left corner.  There is also a scale issue (line widths go up by 1.25, probably due to inkscape's 90 dpi internal setting.)
Comment 5 mathog 2011-12-22 09:25:17 UTC
Created attachment 54708 [details]
test file saved as plain svg from within inkscape

This is the same svg, but saved as "plain svg".  LODraw 3.4.4 cannot open it: if opened with "open with" from the Windows explorer the message "General error.  General input/output error" results; if opened with "insert -> file" the message "The file could not be loaded!" results.  It is especially odd that the plain svg one is so incompatible, since it opens and displays perfectly in every browser I tried it with.
Comment 6 mathog 2011-12-22 09:26:13 UTC
Created attachment 54709 [details]
test file as inkscape svg once opened in LODraw, screen shot
Comment 7 mathog 2011-12-22 09:34:11 UTC
All of my tests were done with:

OS:       Windows XP SP3, 32 bit
LODraw:   3.4.4
Inkscape: 0.48.2 r9819.
Comment 8 tester8 2012-01-01 13:22:34 UTC
LOdev 3.5.0beta2 
4ca392c-760cc4d-f39cf3d-1b2857e-60db978
Ubuntu 10.04.3 x86
Linux 2.6.32-37-generic Russian UI

Writer
Ideal rendering of all 4 images.
The only problem is strange black bar on the left side, I also see it in eog.

Draw
first file  - all the same problems as in description excluding last one.
second file - no text, no arrow heads, lost gradients and patterns in right bottom corner.
Comment 9 mathog 2012-01-17 13:23:03 UTC
Tester8:  you need to look beyond the way it looks right after it imports.  3.5.0b2 does something very different than 3.4.4.  Earlier versions of LODraw imported/inserted the SVG as objects which were then rendered to produce the view.  In 3.5.0b2 the insert converts to a bitmap, and that bitmap itself is the view.  There is no way to get from the bitmap back to an object representation.  So if you want to insert a bitmap, yes it works, but of course you could always have just exported it as a bitmap from the other drawing program (or a browser) if that was the ultimate intent.  If you want to insert as objects into LODraw 3.5.0b2 is of no use.
Comment 10 Thorsten Behrens (allotropia) 2012-01-19 02:21:52 UTC
(In reply to comment #9)
> So if you want to insert a bitmap, yes it works, but of course
> you could always have just exported it as a bitmap from the other drawing
> program (or a browser) if that was the ultimate intent.
>
Small correction - the bitmap rendering is dynamical, i.e. it adapts to screen size and resolution. And the original svg file is kept inside the ODF container.
Comment 11 mathog 2012-01-19 08:52:21 UTC
Created attachment 55797 [details]
insert SVG with 3.5.0b2, move to impress, save as PPT

It is only scalable while inside LO.  Export to any other format and it becomes a bitmap.  I need to get these diagrams into ppt (because that is what the end users have) and as you can see in the attachment, it ends up as a pretty ugly bitmap when saved in .ppt format.  This is why objects need to stay as objects, so that they remain "Scalable __VECTOR__ Graphics" when passed from application to application. As iffy as "insert picture" was for SVG in 3.4.4, at least those objects that did insert would transfer properly into a .ppt file, so that they were still objects when they finally ended up in PowerPoint.

Strange, I just noticed that the "save as picture" from PowerPoint made it into a black and white bitmap.  Never seen that happen before.  When the .ppt file was viewed in PowerPoint it was a color bitmap, not a bw bitmap.
Comment 12 Gerry 2013-04-30 18:59:27 UTC
The issues on SVG handling described in this bug report are still valid for LO 4.0.0.3 on Ubuntu 12.10.

Looking at attachment "svg-testfile-saved-as-normal-svg.svg":
* Import of SVG in Draw looses fine lines between North-African states, the words in the agenda are gone and there is a black box in the left bottom corner which should not be there.
* Inserting as picture in Writer is better, but the strange black box is still there.

Looking at attachment "test file saved as plain svg from within inkscape":
* Import of SVG in Draw: In LO 4.0.0.3 it is still not good. All text is lost. Some patterns are missing. The arrows of the lines in the left top corner are gone.
* Inserting as picture in Writer: This works quite fine. Besides a black box, which should not be there the SVG is imported very good.
Comment 13 Thorsten Behrens (allotropia) 2013-09-12 16:14:37 UTC
Apologies for not having gotten around fixing this bug yet; unfortunately in future I'll have even less time at my disposal for this, so I'm freeing up ownership for other volunteers to take over.
Comment 14 Gerry 2013-11-28 13:52:37 UTC
Problems with SVGs confirmed in LibreOffice 4.2Beta1 on Ubuntu 13.04:

FILE 1 + 2 ( svg-testfile-saved-as-*-svg.svg):
- inserting as image in Writer: Import is almost perfect, but there is still the strange black bar on the left side. In comparison: Firefox, Chrome, Inkscape display this file perfectly. Indeed EOG also shows this strange black bar.
- opening in Draw: all text is gone. There is also this strange black bar. Everything imported nicely.

File 4 (test-file-saved-as-plain-svg-from-within-inkscape.svg):
- inserting as image in Writer: import almost perfect, but a strange black bar is there at the bottom (over the red-green-blue circles). Everything else is imported nicely. Chrome, Firefox and Inkscape import the SVG nicely. EOG shows a wrong black bar in another position.
- opening in Draw: all text gone. all patterns and some gradients gone. arrows are tiny in the left top corner, and some other problems.
Comment 15 Regina Henschel 2013-12-03 19:36:49 UTC
The missing text in case of File > Open is already tracked in bug 32248. So this issue should focus on the black rectangle, bottom right, in file bounding_line4_plain.svg.
Comment 16 Jorendc 2014-07-25 16:08:34 UTC
(In reply to comment #15)
> The missing text in case of File > Open is already tracked in bug 32248. So
> this issue should focus on the black rectangle, bottom right, in file
> bounding_line4_plain.svg.

Which I can't reproduce anymore, tested using Linux Mint 17 x64 with LibreOffice Version: 4.2.5.2 -> marking as RESOLVED WORKSFORME.