Bug 128150 - FILEOPEN: Shape in master slide is white using useBgFill=1
Summary: FILEOPEN: Shape in master slide is white using useBgFill=1
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Samuel Mehrbrodt (allotropia)
URL:
Whiteboard: target:7.5.0 target:7.4.0.2 target:7....
Keywords: filter:pptx
: 147852 (view as bug list)
Depends on:
Blocks: Area-Fill-Tab PPTX-MasterSlide
  Show dependency treegraph
 
Reported: 2019-10-15 07:49 UTC by Xisco Faulí
Modified: 2023-12-04 12:19 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


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
sample ODP to illustrate difference between None and Use Background fills (33.66 KB, application/vnd.oasis.opendocument.presentation)
2023-09-07 12:56 UTC, Stéphane Guillou (stragu)
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.
Comment 19 Commit Notification 2022-11-21 09:05:55 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "master":

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

tdf#149803 tdf#128150 PPTX: export UseBgFill of custom shapes

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 20 Commit Notification 2022-11-25 09:06:05 UTC
Tibor Nagy committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/869e9e0dfe1cf7f263994468d5c3604b9c9c86c6

tdf#149803 tdf#128150 PPTX: export UseBgFill of custom shapes

It will be available in 7.4.4.

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 21 Heiko Tietze 2023-05-03 12:56:15 UTC
This option has a lot of flaws. It is in unclear relation to None, doesn't no fill means to see through the object at the background?, is undocumented, when toggling on it activates None too, and it breaks the design HIG, the dialog wont fit on small screens anymore.

Is it possible to add it as checkbox to the None-tab or rather as radio button with two states that clearly describe the difference?
Comment 22 Stéphane Guillou (stragu) 2023-09-05 13:26:16 UTC
(In reply to Heiko Tietze from comment #21)
> This option has a lot of flaws. It is in unclear relation to None, doesn't
> no fill means to see through the object at the background?, is undocumented,
> when toggling on it activates None too, and it breaks the design HIG, the
> dialog wont fit on small screens anymore.
> 
> Is it possible to add it as checkbox to the None-tab or rather as radio
> button with two states that clearly describe the difference?

I now have https://gerrit.libreoffice.org/c/help/+/156544 for documenting, and reported bug 157101 for the dialog width.

Verified the fix in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 410632ac4b8a280e0993e665ffa9cfede8326b49
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 23 Stéphane Guillou (stragu) 2023-09-07 12:56:07 UTC
Created attachment 189415 [details]
sample ODP to illustrate difference between None and Use Background fills

Created with 24.2.
Comment 24 Stéphane Guillou (stragu) 2023-09-13 09:01:10 UTC
(Repro as described in 4.0. Interestingly, in OOo 3.3, I don't reproduce, but I am unsure if it qualifies as a regression.)

(It is already in release notes, so marking as such: https://wiki.documentfoundation.org/ReleaseNotes/7.4#Impress_&_Draw)

(In reply to Heiko Tietze from comment #21)
> [...] It is in unclear relation to None, doesn't
> no fill means to see through the object at the background? [...]

Users not seeing the difference between the two might be because of bug 157221.

Please see https://gerrit.libreoffice.org/c/help/+/156544 if you have comments on how to best describe the feature.
Comment 25 Commit Notification 2023-09-22 16:41:32 UTC
Stéphane Guillou committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/a4952ec1b49ab70ba0271b5ff3f5e34e0405c82d

tdf#128150: document Use Background fill
Comment 26 Commit Notification 2023-10-02 17:35:25 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/e0a3eafc3fabcdceab8324073548a0117908ef51

tdf#128150 (related) Illustrate "use background"