Bug 115549 - Slide background not exported to SVG
Summary: Slide background not exported to SVG
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
6.0.1.1 release
Hardware: All All
: medium normal
Assignee: Gülşah Köse
URL:
Whiteboard: target:6.3.0
Keywords:
Depends on:
Blocks: SVG-Save
  Show dependency treegraph
 
Reported: 2018-02-08 14:08 UTC by Simon Phipps
Modified: 2019-02-28 13:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
OSI introductory slides, which show the bug on several slides (6.23 MB, application/vnd.oasis.opendocument.presentation)
2018-02-08 14:08 UTC, Simon Phipps
Details
Sample ODP with gradient background (16.14 KB, application/vnd.oasis.opendocument.presentation)
2018-02-15 04:43 UTC, Aron Budea
Details
a gradient background exported correctly (303.07 KB, image/svg+xml)
2019-01-30 22:20 UTC, Marco Cecchetti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Phipps 2018-02-08 14:08:31 UTC
Created attachment 139694 [details]
OSI introductory slides, which show the bug on several slides

An ODP file created in LibreOffice has white text on a dark background for slide 1. It looks OK in edit mode, but when it's presented full screen the dark fill is missing so the text is invisible too, giving the appearance of a blank slide. I've also seen it happen intermittently on the other slides in the attachment but slide 1 always fails. I've tried the 6.0.0.3 version on documentfoundation.org and the newest Collabora release.
Comment 1 Telesto 2018-02-08 16:07:32 UTC
Thanks for reporting, marking as duplicate

*** This bug has been marked as a duplicate of bug 93789 ***
Comment 2 Aron Budea 2018-02-15 04:42:54 UTC
Let's keep this separate, as it's not the same issue as in core: in online, slide background isn't rendered in presentation mode.

LOOLWSD master.. (git hash: baa3e09b)
LOKit   LibreOfficeDev 6.1.0.0.alpha0 (git hash: 09fcdbd)
Comment 3 Aron Budea 2018-02-15 04:43:56 UTC
Created attachment 139917 [details]
Sample ODP with gradient background

Here's a single-slide sample with gradient background.
Comment 4 Andras Timar 2018-02-16 22:54:23 UTC
This is an SVG export filter bug.
Comment 5 Aron Budea 2018-02-17 00:25:44 UTC
Right, unfortunately Draw doesn't import the SVG properly, I had to use Inkscape for that, but can see there that the SVG has no background color.
Comment 6 Gülşah Köse 2019-01-30 19:06:56 UTC
I've tested that bug on
* LibreOffice 6.0.7.3 Build ID: 1:6.0.7-0ubuntu0.18.04.2
* LibreOfficeDev 6.3.0.0.alpha0 1e38d5b976dacd8b42b8330b4b9635a058ffe20b
* Collabora OfficeDev 6.0.10.21 5e87c9f6d6ca5ea46755516c477170d60930f597

and its work for me. Duplicated bug has commits and status "verified fixed". It should be closed. But i don't know which tag should be applied. @Aron can you help?
Comment 7 Aron Budea 2019-01-30 19:26:04 UTC
(In reply to Gülşah Köse from comment #6)
> and its work for me. Duplicated bug has commits and status "verified fixed".
> It should be closed. But i don't know which tag should be applied. @Aron can
> you help?
Oops, the title was left ambiguous, the original issue was raised for online, and online plays slideshows by exporting the presentations to SVG format. This SVG export is what doesn't keep the background, not the actual slideshow (in desktop).
Comment 8 Gülşah Köse 2019-01-30 19:35:36 UTC
Bug is reproducable on

LOOLWSD master.. (git hash: ec24337b)
LOKit LibreOfficeDev 6.3.0.0.alpha0 (git hash: 1e38d5b)
Comment 9 Marco Cecchetti 2019-01-30 22:18:25 UTC
(In reply to Aron Budea from comment #7)
> (In reply to Gülşah Köse from comment #6)
> > and its work for me. Duplicated bug has commits and status "verified fixed".
> > It should be closed. But i don't know which tag should be applied. @Aron can
> > you help?
> Oops, the title was left ambiguous, the original issue was raised for
> online, and online plays slideshows by exporting the presentations to SVG
> format. This SVG export is what doesn't keep the background, not the actual
> slideshow (in desktop).

I spent my GSoC 2013 working on the SVG export filter, so I think the relevant code is in svgexport.cxx: SVGFilter::implExportPage (// In case the page has a background object we append it ...), mpObjects for background is populated by SVGFilter::implCreateObjectsFromBackground which is invoked by SVGFilter::implCreateObjects. If I remember correctly the background is exported as an object of the page not of the master page (custom background per slide). That ifdef is there by several years, but it could be worth to check if it is still enabled, before looking for more complicated root causes.

I'm going to attach an old SVG exported slide with the background exported correctly, in case it could be useful for comparison (<g id="bg-id1" class="Background"> is the element that is currently missing)
Comment 10 Marco Cecchetti 2019-01-30 22:20:44 UTC
Created attachment 148782 [details]
a gradient background exported correctly
Comment 11 Gülşah Köse 2019-01-31 05:59:47 UTC
@marco Thanks for your helpful comments.
Comment 12 Commit Notification 2019-01-31 15:06:41 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/6d7d1fe6cf205d34cc8889e503c727b19c513c94%5E%21

tdf#115549 Enable handling background object.

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2019-02-28 13:10:16 UTC
Gülşah Köse committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/740748d4470ce3f1db3fcbef729a5dc98c0b9569%5E%21

tdf#115549 Check xPropset is exist.

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.