Bug 149651 - FILEOPEN PPTX Use bg fill shape has black fill in master slide view
Summary: FILEOPEN PPTX Use bg fill shape has black fill in master slide view
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Armin Le Grand
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-21 09:04 UTC by Gabor Kelemen (allotropia)
Modified: 2022-07-01 06:36 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the issue (143.90 KB, image/png)
2022-06-21 09:04 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2022-06-21 09:04:43 UTC
Created attachment 180864 [details]
Screenshot of the issue

After the patches in  bug 128150 the attachment 178732 [details] of bug 147852 looks differently bad in master view: it has solid black background instead of seeing through it to the slide background - which happens correctly in the normal slides view.

1, Open attachment 178732 [details] 
2, Go to the master slides view

The shape in the middle top of the slide master has black fill.
Comment 1 Armin Le Grand 2022-06-23 09:59:04 UTC
Happens as described. Taking a look...
Comment 2 Armin Le Grand 2022-06-24 08:42:11 UTC
Debugged, looks as if that's caused by the fallback in SlideBackgroundFillPrimitive2D when no MasterPage is available. The used color (black here) comes obviously from createPolyPolygonFillPrimitive where rFill.getColor() is used. That again was not initialized in createNewSdrFillAttribute like it does get for a real fill.
It maybe needed to be initialized. It also maybe that we need no fallback at all. Need to check/experiment more what others do...
Comment 3 Armin Le Grand 2022-06-24 09:25:19 UTC
Others doing lots of strange things here - OMG. But one after the other...
(a) In MasterPageView, SlideBGFill uses SlideBG, too
(b) In PageView, *no* DrawObject of MasterPage shines through at all
(c) In PageView, SlideBGFill is not limited to Page, but gets extended beyond
  (c1) Solid -> simple
  (c2) Gradient -> strange & varying beyond page, sometimes mirrors, ends at ca. 5x page size (?!?)
  (c3) Picture: Only TopLeft aligned overlaps perfectly (btw blending alpha additionally, so adding up...). For all other aligns the obj with SlideBGFill does it's own, non-page-aligned fill
  (c4) Pattern: simple since always aligned by others

Especially Picture is doing *strange* things that would be hard to emulate I guess ...

This task is about (a), so try to get the SlideBGFill also right in MasterPageView...
Comment 4 Armin Le Grand 2022-06-27 10:52:17 UTC
Solution on https://gerrit.libreoffice.org/c/core/+/136487.
Had to adapt massively to get where needed. Most aspects solved, may need some finetuning in (c2) and/or (c3), but basic solution is ready
Comment 5 Commit Notification 2022-06-27 15:24:06 UTC
Armin Le Grand (allotropia) committed a patch related to this issue.
It has been pushed to "master":

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

tdf#149651 Correct the MasterPageBackgroundFill mode

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 6 Gabor Kelemen (allotropia) 2022-07-01 06:36:07 UTC
Looks good now in:

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 8f9fd6806ccfbf381a383efe5d143ead86ee49de
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (hu_HU.UTF-8); UI: en-US
Calc: threaded