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)
5.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:svg, regression
Depends on:
Blocks: SVG-Save
  Show dependency treegraph
 
Reported: 2021-06-26 13:57 UTC by Stéphane Guillou (stragu)
Modified: 2024-01-02 01:53 UTC (History)
6 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
Comment 9 QA Administrators 2023-11-09 03:16:16 UTC Comment hidden (obsolete)
Comment 10 Stéphane Guillou (stragu) 2023-11-09 10:37:02 UTC
Repro in recent trunk build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ff3fb42b48c70ba5788507a6177bf0a9f3b50fdb
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

as well as in 6.0.0.3.

Regression as 5.0.0.5 would export with all objects visible (only a master slide number element has the hidden property). (And file would be about a tenth in size.)
Comment 11 raal 2023-12-23 14:16:35 UTC
This seems to have begun at the below commit in bibisect repository/OS bibisect-linux-64-5.2.
Adding Cc: to Marco Cecchetti ; Could you possibly take a look at this one?
Thanks
 ec0e5b057dc3cbbda20e94e608eb7005432d6b68 is the first bad commit
commit ec0e5b057dc3cbbda20e94e608eb7005432d6b68
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Thu Dec 7 10:57:55 2017 +0100

    source 154521777f8c551f10ffbe414891df9d2a529ae3

20459: svg export: no more an experimental feature | https://gerrit.libreoffice.org/c/core/+/20459
Comment 12 Aron Budea 2023-12-24 16:19:39 UTC
@raal Thanks for bibisecting this, it might be worth to check further with experimental mode turned on.
Comment 13 Aron Budea 2024-01-02 01:20:37 UTC
(In reply to Aron Budea from comment #12)
> @raal Thanks for bibisecting this, it might be worth to check further with
> experimental mode turned on.
I have verified that experimental mode makes no difference, the regressing commit is the same.