Bug 128150 - FILEOPEN: Shape in master slide is white using useBgFill=1
Summary: FILEOPEN: Shape in master slide is white using useBgFill=1
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Samuel Mehrbrodt (allotropia)
URL:
Whiteboard: target:7.5.0 target:7.4.0.2
Keywords: filter:pptx
: 147852 (view as bug list)
Depends on:
Blocks: PPTX-MasterSlide
  Show dependency treegraph
 
Reported: 2019-10-15 07:49 UTC by Xisco Faulí
Modified: 2022-09-27 08:36 UTC (History)
8 users (show)

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


Attachments
comparison MSO 2010 and LibreOffice 6.4 Master (303.76 KB, image/png)
2019-10-15 07:49 UTC, Xisco Faulí
Details
another sample where the shape is copy&paste from the master slide (81.77 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-10-15 22:16 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2019-10-15 07:49:58 UTC
Created attachment 155012 [details]
comparison MSO 2010 and LibreOffice 6.4 Master

Steps to reproduce:
1. Open attachment 154750 [details] from bug 105695

-> Shape in the master slide is white. See comparison image

Reproduced in

Version: 6.4.0.0.alpha0+
Build ID: 4704acf63f4fed3a99fc95ff63c82eb5a9ae3908
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

and

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 1 Xisco Faulí 2019-10-15 16:36:05 UTC
This is similar to bug 93868, however in the file attached in bug 93868, the <p:sp useBgFill="1"> is defined in ./ppt/slideMasters/slideMaster1.xml while in the file attached here, <p:sp useBgFill="1"> is defined in ./ppt/slideLayouts/slideLayout1.xml
Comment 2 Xisco Faulí 2019-10-15 22:15:41 UTC
So it seems the problem happens when the shape is copy&paste from a slide to the master slide or vice versa
Comment 3 Xisco Faulí 2019-10-15 22:16:18 UTC
Created attachment 155025 [details]
another sample where the shape is copy&paste from the master slide
Comment 4 raal 2019-10-30 06:11:50 UTC
Confirm with Version: 6.4.0.0.alpha1+
Build ID: c4d760b9edf0399955d30a0dfbe5f7b1b1ed37cb
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3;
Comment 5 Xisco Faulí 2022-03-10 12:38:10 UTC
Still reproduced in

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 53560aa06462f1cf04d69acafed20da971bc5c27
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 6 Xisco Faulí 2022-03-10 17:04:03 UTC
it works fine if

if (pBackgroundPropertiesPtr)
{   
    pShape->getFillProperties().assignUsed(*pBackgroundPropertiesPtr);
}   

is removed in oox/source/ppt/pptshapegroupcontext.cxx

@Miklos, you have done some work in this area before, I thought you might be interested
Comment 7 Gabor Kelemen (allotropia) 2022-04-24 07:18:23 UTC
(In reply to Xisco Faulí from comment #6)
> it works fine if
> 
> if (pBackgroundPropertiesPtr)
> {   
>     pShape->getFillProperties().assignUsed(*pBackgroundPropertiesPtr);
> }   
> 
> is removed in oox/source/ppt/pptshapegroupcontext.cxx
> 
> @Miklos, you have done some work in this area before, I thought you might be
> interested

That also fixes bug 147852 - instead of copying the background fill, the shape becomes transparent, revealing the background fill. So far so good.

However the problem starts with attachment 118360 [details] from bug 93868 - there we have a white rectangle shape on the master slide before the background and below the "use bg fill" shape.
So turning the "use bg fill" shape transparent actually reveals everything behind it, even other shapes. 
So that attachment becomes unreadable again, because the white rectangle is in front of the dark background.

I'm afraid we should really implement this window-to-background feature and add it to ODF.
In the short term the above hack can work - I think it's more common to not have another shape between the "use bg fill" shapes and the bg.
Comment 8 Commit Notification 2022-06-16 13:45:18 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c4cf2e82e8d0aaef9b1daedc033d6edf647e5284

tdf#128150 Add OOXML import/export for "use background fill"

It will be available in 7.5.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 9 Commit Notification 2022-06-20 08:36:38 UTC
Armin Le Grand (Allotropia) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/50394abcc36a73c0205e6cb69d925c66c25f81f2

tdf#128150 Implement/add SlideBackgroundFill visualization

It will be available in 7.5.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 10 Commit Notification 2022-06-20 08:37:48 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9c2c48f14535e58cad0453fef584400ee703aecc

tdf#128150 xmloff: ODF import/export of fill-use-slide-background

It will be available in 7.5.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 11 Samuel Mehrbrodt (allotropia) 2022-06-20 12:44:40 UTC
*** Bug 147852 has been marked as a duplicate of this bug. ***
Comment 12 Commit Notification 2022-06-21 05:54:32 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2185eb10147723bbf1b7966f995dc01d64c5e6c8

tdf#128150 Only show "Use background" btn in Impress & Draw

It will be available in 7.5.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 Gabor Kelemen (allotropia) 2022-06-21 08:58:57 UTC
Some quick testing:

1. Open attachment 154750 [details] from bug 105695  // comment #0
and others cause an endless loop with the debug message:

warn:legacy.osl:5706:5706:vcl/source/outdev/bitmap.cxx:249: CopyBits with zero or negative width or height

other examples:
attachment 130845 [details] from bug 105695 (simplified attachment 154738 [details] from the same bug also loops for a while and crashes after ~1 minute, but without the CopyBits warning - this might be a different issue. Just filed bug 149650 about it)
attachment 118360 [details] from bug 93868

On the other hand, attachment 155025 [details] from comment #3  (which is a variant of attachment 118360 [details]) still does not show the text visible.
Comment 14 Commit Notification 2022-06-22 14:54:55 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ecfb133598df609037263e06949acbbf520622b3

tdf#128150 Adapt sidebar to new "use slide background" property

It will be available in 7.5.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 15 Commit Notification 2022-06-23 08:03:27 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5491a82854e3e6dd2dbb4b0012cb4bbeb4ee22e0

tdf#128150 Disable UseSlideBackground item when setting style back to None

It will be available in 7.5.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 16 Commit Notification 2022-06-24 06:12:49 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/adc536e9efc77690df62177aa722f9252bdbf96b

tdf#128150 Properly show/hide widgets when "use slide background" is selected

It will be available in 7.5.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 17 Gabor Kelemen (allotropia) 2022-07-01 07:07:27 UTC
Checking in current master, this looks good now:

* attachment 154750 [details] from bug 105695 has no white filled rectangle, text readable
* attachment 155025 [details] is readable (based on the one from bug 93868)

I'd say it's OK to close this now, can't find a still bad looking example in the related bugs: bug 127964 bug 123684 bug 105150
Comment 18 Commit Notification 2022-07-08 08:38:32 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/c723398b879bc0733642854913470bcb6275ae17

tdf#128150 Fix PPTX slide background fill mode for shapes

It will be available in 7.4.0.2.

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.