When I try to import an SVG and then save it out again from the document, I always get a 0-byte file. If I open the document, the SVG is embedded correctly, so the only problem is that it doesn't save.
It occurs with any SVG I've tested.
I tested with "flat_logo.svg" on "LibreOffice 3.6\program" folder and it also not works for me. Confirmed this bug.
Created attachment 80512 [details]
Example files (ODG/ODT/SVG/DOCX) showing problem only relates to DOCX.
This bug suffers from a lack of detail. Presumably the initial description and first comment refer to inserting an SVG into a Writer document (ODT). If this is the case, then by and large the problem no longer appears reproducable under GNU/Linux TDF/LO v18.104.22.168.
flat_logo (Inkscape) SVG examples
The SVG referenced in comment #1 (for v22.214.171.124) has been generated in Inkscape. Inserting this into Writer generates both an SVG and corresponding PNG (both as expected) in the Pictures/ directory of an ODT. Saving the ODT as a DOCX generates the requisite PNG in the word/media/ directory. There is no SVG but that is related to bug #51510.
square_circle_triangle (Draw) SVG examples
The ODG was created in Draw and exported as the corresponding SVG. Inserting the SVG into Writer generates both an SVG and corresponding PNG (both as expected) in the Pictures/ directory of an ODT. Saving the ODT as a DOCX generates an 8 byte PNG in the word/media/ directory:
$ ls -l image1.png
-rw-r--r-- 1 oweng users 8 Jun 8 07:06 image1.png
$ file image1.png
image1.png: PNG image data
$ file -bi image1.png
$ hexdump -n 128 -C image1.png
00000000 89 50 4e 47 0d 0a 1a 0a |.PNG....|
$ hexdump -n 128 -c image1.png
0000000 211 P N G \r \n 032 \n
This would appear to be the only situation (under the current version of LO) where this bug still applies. Tests for Adobe Illustrator generated SVGs are available in bug #51510 and work as expected.
If it now saves correctly as an ODT, then this specific bug is fixed. It didn't work at all for any OpenDocument format then. Whether you wish to leave it open to reference the DOCX export bug is up to you.
this really fixed for ODT/ODG formats. i checked it in LO 6.1 beta 2
but if you save image from DOCX to SVG, then Inkscape shows error about zero size of SVG file
this bug didn't have any CC. I added you, men
What do you think about this bug now? may be create a new different bug about export image to SVG from DOCX?
Let's keep this alive. It was DOCX-only already in 2013 as Owen confirmed.
Hi I think this is the problem from bug 51510
*** This bug has been marked as a duplicate of bug 51510 ***