Bug 143082 - SVG export of slide shows blank in some apps, hides objects with <g visibility="hidden">
Summary: SVG export of slide shows blank in some apps, hides objects with <g visibilit...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.2.5.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: SVG-Save
  Show dependency treegraph
 
Reported: 2021-06-26 13:57 UTC by Stéphane Guillou (stragu)
Modified: 2021-11-08 16:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
example slide to export from Impress to SVG (15.08 KB, application/vnd.oasis.opendocument.presentation)
2021-06-26 13:59 UTC, Stéphane Guillou (stragu)
Details
SVG exported with LO Impress 7.3 (486.83 KB, image/svg+xml)
2021-06-26 14:02 UTC, Stéphane Guillou (stragu)
Details
svg exported by LibreOffice 7.1.3.2 (2.58 MB, image/svg+xml)
2021-06-29 15:15 UTC, Franklin Weng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2021-06-26 13:57:31 UTC
Description:
Exporting an Impress slide to SVG results in a file that looks blank to many applications, because of the <g visibility="hidden"> tags in the source.

Applications that show the objects:
- Firefox 89.0.1
- Gnome Web 3.28.6
- Chromium 91.0.4472.101
- Inkscape 1.1
- LibreOffice Impress 7.0, 7.2, 7.3
- other LibreOffice components insert the SVG as expected

However, other applications don't show the objects:
- gThumb 3.6.1
- thumbnails in Nautilus (Gnome Files) 3.26.4
- GIMP 2.10.24
- Sozi 20.05.09
- Draw.io 14.6.13

Draw does not have the same issue when exporting SVGs.

Steps to Reproduce:
1. Open Impress
2. Add various objects to slide (shapes, images, text boxes...)
3. File > Export...
4. Export to SVG
5. Open the file in another application

Alternatively, start at step 3 with attachment 173218 [details]

Actual Results:
Some applications don't show the objects (gThumb, Sozi, GIMP...)

Expected Results:
All applications that support SVGs should show all objects.


Reproducible: Always


User Profile Reset: No



Additional Info:
Editing the source of the SVG and replacing all occurrences of:

g visibility="hidden"

With:

g visibility="visible"

... results in a file that displays properly in all applications.

Tested on:

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: f446a203fa2897bab8ae7686c948a8bf060675c6
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-24_15:16:38
Calc: threaded

Version: 7.2.0.0.beta1 / LibreOffice Community
Build ID: c6974f7afec4cd5195617ae48c6ef9aacfe85ddd
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 7.0.6.2
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 1 Stéphane Guillou (stragu) 2021-06-26 13:59:11 UTC
Created attachment 173222 [details]
example slide to export from Impress to SVG

Another slide to export from Impress to SVG, with a variety of objects included. All objects are affected.
Comment 2 Stéphane Guillou (stragu) 2021-06-26 14:02:19 UTC
Created attachment 173223 [details]
SVG exported with LO Impress 7.3

Example exported SVG, with <g visibility="hidden"> objects.
Comment 3 Franklin Weng 2021-06-29 15:15:57 UTC
Created attachment 173272 [details]
svg exported by LibreOffice 7.1.3.2


The same problem, couldn't see anything in Sozi.

svg exported from:

Version: 7.1.3.2 / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: kf5
Locale: zh-TW (zh_TW.UTF-8); UI: zh-TW
Calc: threaded

Also visibility is set as hidden
Comment 4 Franklin Weng 2021-06-29 15:53:13 UTC
Manually changing (with text editor) from visibility="hidden" to visibility="inherit" could make it shown in Sozi.
Comment 5 Stéphane Guillou (stragu) 2021-07-01 11:55:04 UTC
Marking as "NEW" as was confirmed by Franklin in Comment 3.
Comment 6 Franklin Weng 2021-07-04 08:50:15 UTC
By updating the CSS style of *all* objects, assign "visibility" to "visible" in Inkscape, objects can be shown in Sozi.

So please take a look the CSS style of exported objects.
Comment 7 Stéphane Guillou (stragu) 2021-07-06 01:59:51 UTC
Reproduced on Windows 10 as well: visibility of objects is set to "hidden".

Version: 7.0.6.2 (x64)
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-AU (en_AU); UI: en-US
Calc: threaded
Comment 8 Stéphane Guillou (stragu) 2021-07-08 10:53:26 UTC
Reproduced with older version too:

Version: 6.2.5.2
Build ID: 1ec314fa52f458adc18c4f025c545a4e8b22c159
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded