Bug Hunting Session
Bug 111786 - PPTX export: Shape's line transparency is not exported
Summary: PPTX export: Shape's line transparency is not exported
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.4 all versions
Hardware: All All
: medium normal
Assignee: Tamás Zolnai
URL:
Whiteboard: target:6.1.0
Keywords: difficultyInteresting, easyHack, filter:pptx, skillCpp
Depends on:
Blocks: OOXML-Shapes PPTX
  Show dependency treegraph
 
Reported: 2017-08-14 02:48 UTC by Tamás Zolnai
Modified: 2018-01-30 06:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document with transparent line (10.75 KB, application/vnd.oasis.opendocument.presentation)
2017-08-14 02:48 UTC, Tamás Zolnai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamás Zolnai 2017-08-14 02:48:24 UTC
Description:
Shape's line properties are exported to PPTX files, but it seems the transparency value is not. Transparency value is supported by MSO.

Steps to Reproduce:
1. Open attached ODP with transparent line
2. Save it to PPTX file
3. Open the file with LO or MSO

Actual Results:  
Line transparency is gone.

Expected Results:
Line transparency should be save to PPTX file.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
Comment 1 Tamás Zolnai 2017-08-14 02:48:49 UTC
Created attachment 135532 [details]
Test document with transparent line
Comment 2 Xisco Faulí 2017-08-14 09:50:52 UTC
Confirmed in

Version: 6.0.0.0.alpha0+
Build ID: ef2e6260fad38e26c8591ea88ded348db618270d
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

and 

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

is the problem the same as in bug 91668?
Comment 3 Tamás Zolnai 2017-08-14 09:56:21 UTC
> is the problem the same as in bug 91668?

I don't think that. Line properties and image properties are handled separately.
Comment 4 Tamás Zolnai 2017-08-14 23:26:38 UTC
Let's turn it into a easy hack. The code is here:
oox/source/export/drawingml.cxx
Check DrawingML::WriteOutline(...) method
Comment 5 Ekansh Jha 2017-12-06 15:36:25 UTC
I looked into the code and was unfortunate to find anything related to transpaency in this function. It will be very helpful if I can get a little help in this matter.
Comment 6 Tamás Zolnai 2017-12-08 01:30:09 UTC
Some more code pointers:
PPTX export code uses UNO API to get properties from the document modell. Line API properties are defined here:
offapi/com/sun/star/drawing/LineProperties.idl
These properties are get by GetProperty() calls. This GetProperty() method sets the property to the mAny variable from which you can convert the actual value to the right type (see other parts of the drawingml.cxx file how it works). So with this GetProperty() you can get the actualy line trasparency for the current object.
About how to export the transparency value you should check WriteSolidFill() method which is called from WriteOutline() method. It has an nAlpha paramter which is a kind of transparency value.
Comment 7 Xisco Faulí 2018-01-27 03:25:18 UTC Comment hidden (obsolete)
Comment 8 Commit Notification 2018-01-28 13:35:19 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=69acbf1994a2fd8606b119e7716996fb103b75c8

tdf#111786: PPTX export: Shape's line transparency is not exported

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.