Bug 122750 - Why was SVM removed from Export?
Summary: Why was SVM removed from Export?
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
6.0.7.3 release
Hardware: x86-64 (AMD64) Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-16 03:22 UTC by Frank Zimmerman
Modified: 2019-01-20 19:56 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
rotated drawing (18.88 KB, application/octet-stream)
2019-01-19 23:26 UTC, Frank Zimmerman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Zimmerman 2019-01-16 03:22:04 UTC
Description:
Maybe this is not a bug, but "by design". But I have to complain that SVM is no longer available as an export format in LibreOffice Draw 6.0.7.3 (it was probably dropped around 6.0).

The reason why this format was so useful is that it was the ONLY format that reliably worked for taking diagrams from DRAW and importing into WRITER.

SVG export sometimes works, but often fails with more complex text formatting, or for certain objects (like curly brackets...I think it includes an extra dot).

EMF doesn't always work, any white areas added to label backgrounds in arrows fail to show, among others.

SVM was the ONLY format that always worked with everything: text, objects, gradients, etc. Now it's gone from DRAW.

My only workaround for drawings that won't export properly to EMF or SVG is to export the drawing to PDF, then import the PDF into Inkscape, and then export to SVG. This usually works, but it's an extra step.

Why do we have to remove stuff that works?

Steps to Reproduce:
Example A:
1. Create New DRAW page.
2. Insert curly brace from Symbols.
3. Rotate 90 degrees.
4. Export to SVG.
5. Import to WRITER.

Example B:
1. Create New DRAW Page.
2. Insert an Arrow with a stem.
3. Double-click the stem to add a label.
4. Type some text.
5. Select the text and apply a white Highlight (background).
6. Export to EMF and SVG.
7. Import either of these into WRITER.

Actual Results:
Example A: Brace has an extra black dot beside it.
Example B: The Highlight is not showing and the stem of the arrow goes through the text.

Expected Results:
No black dot, highlighting to be still applied.


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
These are two simple examples. I usually work with more complex diagrams that have many elements and blocks of text, so I would have to look through my past work to find a better example, if there is any interest in this problem. For me, at least, SVM export in DRAW would be very useful.

Please note that I've also tried copy/pasting a drawing from DRAW into WRITER and this does not often give a good result, so export/import seems to be necessary, except for the most simple elements.
Comment 1 Julien Nabet 2019-01-16 07:50:09 UTC
On Win7 with LO 6.1.4, I could reproduce this.

Xisco/Heiko: any thoughts?
Comment 2 Frank Zimmerman 2019-01-19 23:26:10 UTC
Created attachment 148444 [details]
rotated drawing

If you really want to have fun, try exporting this rotated ODG diagram to SVG. The text gets really messed up. However, it will export to EMF just fine.
Comment 3 Regina Henschel 2019-01-20 18:00:33 UTC
It was removed in bug 92925 from the UI, but it is still used as internal format.

Format SVM is a undocumented, proprietary format, and such should not be used for storing.

Workarounds in case you need a stored svm-file:
1) Open the file in LO5.1.6, that has still export to SVM and is available as portable.
2) Copy the drawing to clipboard and import it as "GDI" into a Writer document. That produces a png-file and a SVM-file. To get access to them, unzip the Writer document and open the subfolder "Pictures". Besides some different header bytes it is the same as the old SVM export.
3) Make a copy of the odg-file, open it and convert the drawing to "Metafile". Save the file, then same as 2)

So, in case you do not need a stored svm-file, copy&paste as "GDI" should give the desired result.

Unfortunately paste with "Drawing format" is currently very buggy. I have not searched whether your special text problems have already a bug report.

SVG-export has currently the problem, that there is no special SVG-export for drawings, but all the stuff needed for a slide show is added and makes the SVG unusable for drawings. But that is a different issue.
Comment 4 Frank Zimmerman 2019-01-20 19:56:46 UTC
Regina,

Thanks for the detailed explanation.

I have tested out the options you mention, and they DO work. Probably the best step in my case is to do:

1. In LO Draw: Ctrl-A to select the whole drawing
2. Right-click, Convert->to Metafile
3. Ctrl-C to copy the drawing
4. In LO Writer: Ctrl-V to paste the drawing.

This transfers the SVM file (created in Step 2) into the Writer document, and saves me all the export/import to/from non-perfect formats. And, by unzipping the Draw file resulting from Step 2, or the Writer file resulting from Step 4, I can get to the SVM if I need it.

So thanks very much for the solution.

I have to say though, that in the bug you mentioned, removing SVM was not part of the original proposition, but added by someone as a side-comment. It's a shame it was not kept, as it is a reliable format for transferring between LO components.

I also question the philosophy of your statement, "Format SVM is a undocumented, proprietary format, and such should not be used for storing." We, the end-user, should not use it, but the program uses it internally? Why shouldn't we use it, if it works better than any other export format? It may not be apparent to all end-users that you can do the "convert to metafile, copy/paste, instead". Why shouldn't there be more than one way to "skin a cat"?