Created attachment 142882 [details] svg file Steps to reproduce: 1. Open attached .SVG file -> General Error. General Input/Output error. How the file was created: 1. New blank Draw file 2. Export as .SVG The file can be inserted from Insert - Image Reproduced in Version: 6.2.0.0.alpha0+ Build ID: d60d695fcc5064e1f16842387fdce23456a64694 CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded
Regression introduced by: author Armin Le Grand <Armin.Le.Grand@cib.de> 2018-05-10 17:49:19 +0200 committer Armin Le Grand <Armin.Le.Grand@cib.de> 2018-05-18 20:11:35 +0200 commit 3ca7be09834a26fbd1c371deabd7a58111092676 (patch) tree 560c1ee287e529b8879bbc2375b5a48f87c65a51 parent c845135b7b605257b5c94b382d88627282cb05a3 (diff) Replace SVGFilter using SVGIO Bisected with: bibisect-linux64-6.1 Adding Cc: to Armin Le Grand
Hi Xisco - I can somehow not grap the testfile. When clickling, I get an empty page (saying https://bug-attachments.documentfoundation.org/attachment.cgi?id=142882)
(In reply to Armin Le Grand (CIB) from comment #2) > Hi Xisco - I can somehow not grap the testfile. When clickling, I get an > empty page (saying > https://bug-attachments.documentfoundation.org/attachment.cgi?id=142882) Yep, because you're browser is opening the file directly. You can either right click on it - save file, or follow the steps in the description. 1. New blank Draw file 2. Export as .SVG
@Xisco - thanks, Yes - shouldhave see that :) If the SVG is empty, no geometry gets imported. With no geometry, the import stops and creates no File. I think this is as it should be, except that the error message is not fitting to this case. What should happen with empty SVGs: - as currently - error - show some more meaningful message, but do not open empty Draw/Impress - quietly open some Draw/Impress, 'guess' a document size I am not sure...
Checked what libreoffice-6-0 did: Just opens an empty Draw. Is that the expected behaviour? Maybe we should ask UI/Design guys here...?
(In reply to Armin Le Grand (CIB) from comment #5) > Checked what libreoffice-6-0 did: Just opens an empty Draw. Is that the > expected behaviour? Maybe we should ask UI/Design guys here...? Let's ask
@Heiko: See comment 4 - what would you expect...?
We need an error message other than the "General Input/Output error" -- maybe "The SVG image is malformed". And that, rather than opening onto an empty Draw canvas.
Opening an empty file is not an error.
(In reply to Tomaz Vajngerl from comment #9) > Opening an empty file is not an error. Yep, I agree with Tomaz here!
(In reply to Tomaz Vajngerl from comment #9) > Opening an empty file is not an error. No, the point is because the "empty" SVG image has no defined dimension the import filter errors opening to Draw document. The "error" is for mishandling of the image--not the resulting empty document canvas.
(In reply to V Stuart Foote from comment #11) > No, the point is because the "empty" SVG image has no defined dimension... The svg file has well defined dimensions. It produces an area of width=210mm and height=297mm. If you open the file in a browser, you will notice, that this area is really used, because if your browser window is too small, it will generate scroll bars. And if you insert the svg file into an HTML document with a lot of text, then this area will become visible. Currently inserting the svg file into a Writer document, does not use this area, but sets it to "2". That is an error too. The file has an error. The attribute version="1.2" is wrong, it has to be version="1.1" (bug 105636). But the corrected file shows the same general error message and the same error, when inserting it into a Writer document. I suggest to generate an empty page with width and height as given in the outer most svg element, even if this page has no content.
The file must be correct because you saved it before with the same tool. And that was working in 6.0 but not anymore in 6.2. If you get basic information from a file, generally spoken, that means you recognize it as SVG but everything else is missing, I would apply standard properties and _inform_ the user with an info bar. But as Regina commented that's not the issue here.
May be related to tdf#118254 - look there, TeXMaths *may* produce those empty SVGs, so it gets no loaded document in it's processing. When looking at the comments I would say: -> Open empty Draw with the intended dimensions
I agree with: Open empty Draw with the intended dimensions
Checking how this can be obtained. Bet would probably be to add a HiddenGeometryPrimitive to the SVGFilter import when there is no content, that one containing a PolygonHairlinePrimitive. That way, the Size will be correct. For the SVGFGilter it will be necessary to avoid creating a SdrGrafObj when there is no GraphicContent, will try that. For Reginas note in comment 12 I need to check if this may already work as intended using the above mentined HiddenGeometryPrimitive/PolygonHairlinePrimitive combination...
Armin Le Grand committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=0613ce41da0b94bc481b94b8141afcf15df8abe7 tdf#118232 Allow load and insert of SVGs with no Geometry It will be available in 6.2.0. 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.
Done for master. Question: Should this be added to libreoffice-6-1..?
(In reply to Armin Le Grand (CIB) from comment #18) > Done for master. > Question: Should this be added to libreoffice-6-1..? My vote goes to the yes!
Armin Le Grand committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1ebbe4193f5a7ea928fd4940c2a62bcb773c4a00&h=libreoffice-6-1 tdf#118232 Allow load and insert of SVGs with no Geometry It will be available in 6.1.0.2. 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.
Verified in Version: 6.2.0.0.alpha0+ Build ID: dbf8ad9bc385411c349095dfa66345464b4215d6 CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded @Armin, Thanks for fixing this!!