Bug 105588 - SVG exported from Impress or Draw cannot be correctly inserted as an image into another document
Summary: SVG exported from Impress or Draw cannot be correctly inserted as an image in...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.2.4.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
Depends on:
Blocks: SVG-Save
  Show dependency treegraph
 
Reported: 2017-01-28 22:34 UTC by peter.sebregondi
Modified: 2019-05-15 12:05 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description peter.sebregondi 2017-01-28 22:34:47 UTC
Description:
I have opened a pptx in Impress. Then I have exported a drawing group as a selection in SVG format. 
This SVG (created by Impress) can be opened in the Windows Edge browser and looks good. 
However, when I try to insert this SVG in a docx or odt in Writer, only a little anchor and a little green square are shown. The anchor and the square disappear when I click into the text.

A test with an Inkscape SVG showed that it can be inserted in both a docx and an odt in Writer.
Disabling OpenGL did not help. 
So, inserting an Inkscape SVG in Writer works, but inserting an Impress SVG works not. 

Steps to Reproduce:
1.Steps are described in the description.
2.I went through the same steps 4x
3.

Actual Results:  
See description

Expected Results:
Writer should have successfully inserted the Impress-SVG both in docx and odt.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36
Comment 1 V Stuart Foote 2017-01-29 01:12:57 UTC
On Windows 10 Pro 64-bit en-US with
Version: 5.3.0.3 (x64)
Build ID: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
Locale: en-US (en_US); Calc: group

Confirmed. But it is not limited to opening a PPTX document into Impress and selecting draw objects.

Rather you can simply create a new blank slide, adding Draw objects with text annotation, and Text boxes--selection of a group of objects and Exporting as SVG results in an .SVG image that does not cleanly render back to a Draw or Writer document canvas.

But issue also happens when exporting the entire slide--so not limited to export of selection ( http://opengrok.libreoffice.org/xref/core/filter/source/svg/svgfilter.cxx#228 ) rather it seems more like some import filter misformatting reading the extent of the SVG

Edge, Internet Explorer, Firefox have no issue with opening the SVG. Imagemagik's IMDisplay viewer renders it blank. Inkscape opens it but with large pixel counts, e.g. 22k x 30k size. 

Draw will open the SVG (either the selection or the full slide) but no text annotations.

Inserting the SVG in LO modules: it reads a diminutive extent on the document canvas for Writer as noted in OP, while insert into Draw or Impress shows nothing.

So not clear if the issue is the export filter, or the import filter or a combination of both.
Comment 2 Iain Waugh 2017-01-29 05:57:03 UTC
I am also seeing this bug.  It used to work in LibreOffice v5.1.3, but wasn't working in 5.2.1.

As a side note, a Draw SVG export from v5.1.3 uses 24kB; the same export from v5.2.1 uses 300kB.  Most of the extra size is taken up with Javascript.
Comment 3 Regina Henschel 2017-01-29 22:55:29 UTC
Search for attribute "visibility" in the svg file. It has the wrong value "hidden". Exchange for example
<g visibility="hidden">
with
<g visibility="visible">

Then the import should work.

Please report back, whether such repaired svg will import in your case too.
Comment 4 V Stuart Foote 2017-01-30 02:47:20 UTC
(In reply to Regina Henschel from comment #3)
> Search for attribute "visibility" in the svg file. It has the wrong value
> "hidden". Exchange for example
> <g visibility="hidden">
> with
> <g visibility="visible">
> 
> Then the import should work.
> 
> Please report back, whether such repaired svg will import in your case too.

Yes. If I edit the SVG in text editor (VI) and set the <g class="SlideGroup"> object's <g visibility="hidden"> to <g visibility="visible"> the SVG inserts into Draw/Impress and Writer cleanly.

Checked a 5.1.6.2 export to SVG, the <g visibility=""> is not set.
Comment 5 peter.sebregondi 2017-01-30 10:08:47 UTC
Exporting a selection of a pptx slide in Impress does not work anymore. 
A 366KB SVG is created, but both Microsoft Edge and Chrome bring the same error message: "An unexpected error occurred. The presentation engine will be stopped". 
However, exporting the whole slide still works, it creates a 367KB SVG.
Comment 6 peter.sebregondi 2017-01-30 11:07:07 UTC
On another PC, in Writer 5.1.0.3, the Impress5.2.4.2-selection-SVG was inserted in a docx, but only the text, no graphical elements such as shapes.
Comment 7 peter.sebregondi 2017-01-30 16:39:39 UTC
An Impress 5.2.5.1 selection SVG export (from a pptx drawing group) is shown correctly in Inkscape 0.92.
Chrome and Edge cannot handle this selection SVG, however.
Comment 8 peter.sebregondi 2017-01-30 19:45:21 UTC
Writer 5.2.5.1 does not insert any SVG that was exported from a pptx in Impress 5.2.5.1.
Comment 9 Regina Henschel 2017-01-31 14:25:19 UTC
There exist several problems in svg export. I have written the bugs 105636, 105639, 105641 and 105642 for some of them. So this bug should be for the false "hidden" value.

This false value is set in method SVGFilter::implExportDrawPages in file filter/source/svg/svgexport.cxx around line 1503.

Unfortunately setting the default to "visible" will show all slides together when the file is opened in a browser. So that would not fix the problem.

I expected, that the first slide - and in case of a selection of single objects the only one - is set to "visible" and only the other slides are set to "hidden".

I think, that there is a real bug, because the comment there,
 "// In case the exported slides are more than one the initial
  // visibility of each slide is set to 'hidden'. "
indicates, that the expected behavior was intended for a selection of objects. But it doesn't work.
Comment 10 QA Administrators 2018-02-01 03:44:38 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug