Bug 107608 - FILEOPEN PPTX: pattern fill has transparent background instead of white background
Summary: FILEOPEN PPTX: pattern fill has transparent background instead of white backg...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.2 all versions
Hardware: All All
: medium normal
Assignee: Tamás Zolnai
URL:
Whiteboard: target:6.1.0
Keywords: difficultyBeginner, easyHack, filter:pptx, skillCpp
Depends on:
Blocks: PPTX
  Show dependency treegraph
 
Reported: 2017-05-03 22:24 UTC by Ofir
Modified: 2018-01-26 11:30 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
PPTX created with PowerPoint 2013 showing the issue (33.90 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2017-05-03 22:24 UTC, Ofir
Details
PDF exported from PowerPoint showing the expected result (169.62 KB, application/pdf)
2017-05-03 22:25 UTC, Ofir
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ofir 2017-05-03 22:24:06 UTC
Description:
The rectangle in the middle has a pattern fill with white background in PowerPoint 2013.
In impress the rectangle has a transparent background.

Steps to Reproduce:
1. Open the attached PPTX in Impress

Actual Results:  
The rectangle has transparent background.

Expected Results:
The rectangle should have white background.


Reproducible: Always

User Profile Reset: Yes

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Comment 1 Ofir 2017-05-03 22:24:47 UTC
Created attachment 133051 [details]
PPTX created with PowerPoint 2013 showing the issue
Comment 2 Ofir 2017-05-03 22:25:12 UTC
Created attachment 133052 [details]
PDF exported from PowerPoint showing the expected result
Comment 3 Xisco Faulí 2017-05-04 08:42:33 UTC
Confirmed in

Version: 5.4.0.0.alpha1+
Build ID: f12096272e684ddcd8ffa4e34dcb0a680cc594c2
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Somewhere in 4.2 development the box changed from complete white to pattern without background
Comment 4 Tamás Zolnai 2017-08-15 01:13:02 UTC
Let's turn this into a easy hack. The code is here:
oox/source/drawingml/fillproperties.cxx
Comment 5 Xisco Faulí 2017-08-16 01:29:46 UTC
I guess we need to add support for hatches with background: https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/fillproperties.cxx#669
Comment 6 Tamás Zolnai 2017-08-16 01:38:49 UTC
(In reply to Xisco Faulí from comment #5)
> I guess we need to add support for hatches with background:
> https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/
> fillproperties.cxx#669

We already have support for that (check the area tab's hatch page). Those comments are obsolete.

More code pointer to find out how to set that background is here (hatch page):
cui/source/tabpages/tphatch.cxx
Comment 7 Tamás Zolnai 2017-12-11 22:19:06 UTC
Hi guys,

Export part of the same hatch (pattern fill) background is implemented now:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=54dfb9ff07a41d9249302ac2ed0a005d0a8114d4
Same two API properties (FillBackground,FillColor) should be used by the import code.
Comment 8 Xisco Faulí 2018-01-14 03:23:06 UTC Comment hidden (obsolete)
Comment 9 Thomas Beatty 2018-01-14 03:31:18 UTC
Sorry no. Have had too much work recently. I can be taken off.
Comment 10 Commit Notification 2018-01-26 11:29:28 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=232251e11aecf051bc0e2a915e5af6c0d3650469

tdf#107608: PPTX: Import pattern fill background color

It will be available in 6.1.0.

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

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