Bug 100830 - FILEOPEN: OOXML - Transparency Not Imported for Bitmap Filled Shapes
Summary: FILEOPEN: OOXML - Transparency Not Imported for Bitmap Filled Shapes
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: interoperability target:5.3.0 target:...
Keywords: bibisected, bisected, filter:ooxml, regression
Depends on:
Blocks: WPS-Support
  Show dependency treegraph
 
Reported: 2016-07-10 07:08 UTC by Yousuf Philips (jay) (retired)
Modified: 2018-10-22 21:55 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
sample (58.15 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-07-10 07:08 UTC, Yousuf Philips (jay) (retired)
Details
sample pptx file affected (56.29 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2016-09-14 08:03 UTC, Luke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2016-07-10 07:08:11 UTC
Created attachment 126147 [details]
sample

Steps:
1) Open attached document
2) Right-click on shape and click Area in context menu
3) Notice in the transparency tab that it is set to 'No transparency'
4) Open it in MS Word and it has a 50% transparency

Version: 5.3.0.0.alpha0+
Build ID: 54f2a4184d1296814e64cfeab1d06ae90d002357
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-07-08_01:43:14
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 Buovjaga 2016-07-17 09:10:33 UTC
Confirmed.

64-bit, KDE Plasma 5
Build ID: 5.1.4.2 Arch Linux build-1
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Comment 2 Aron Budea 2016-08-15 21:20:30 UTC
This is somewhat of a regression, at least the transparency setting.
v4.2.0.4: transparency is set to 50%, but Heiko's face is not shown, only the oval outline. Same if transparency is set to No transparency.
v4.3.0.4: transparency is set to No transparency, Heiko's face is shown. If transparency is set to 50%, face is not shown, only the oval outline.
v5.2.0.4: transparency is set to No transparency, Heiko's face is shown. If transparency is set to 50%, transparency is adjusted properly.

I'd say, let's consider it a regression for the import of transparency setting (noting that there were other issues that were fixed later).

After this is fixed, test export of transparency as well.
Comment 3 Aron Budea 2016-08-16 08:02:23 UTC Comment hidden (bibisection)
Comment 4 Aron Budea 2016-08-16 08:03:55 UTC
Adding Miklos to the CC, based on the commit details below.
Miklos, I understand this is not particularly useful, because the commit only enables wps. Anyway, please take a look and see if it's enough of a hint or not.

 c506f2e2ba98a68692da4aa726d93464926d36e6 is the first bad commit
commit c506f2e2ba98a68692da4aa726d93464926d36e6
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Thu May 28 17:36:37 2015 +0800

    source-hash-57450afb768c085df0ba2344aa94b5f843060178
    
    commit 57450afb768c085df0ba2344aa94b5f843060178
    Author:     Miklos Vajna <vmiklos@collabora.co.uk>
    AuthorDate: Tue Dec 3 11:59:42 2013 +0100
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Tue Dec 3 15:39:04 2013 +0100
    
        DOCX import: declare wps as a supported feature
    
        This means in case we hit an mc:AlternateContent element, we will read
        the mc:Choice branch of it, in case wps is the required feature, not the
        mc:Fallback one, which contains the information in VML format (after a
        lossy conversion).
    
        Change-Id: I476156bd1a39927dda903d14540155d1e62a211e
Comment 5 Luke 2016-09-14 08:03:29 UTC
Created attachment 127327 [details]
sample pptx file affected

Transparency values are not imported for all bitmap filled DrawingML objects. This affects all OOXML formats.

Miklos,
Do you want to track the general issue here or just this specific regression?
Comment 6 Xisco Faulí 2016-09-26 09:26:19 UTC
Adding Cc: to Miklos Vajna
Comment 7 Miklos Vajna 2016-09-30 22:54:56 UTC
Luke,

Let's please use this bug just for the regression. Needless to say the drawingML import fix will also affect all formats, it won't be for DOCX only.
Comment 8 Commit Notification 2016-10-04 09:46:36 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#100830 drawingML import: handle <a:alphaModFix>

It will be available in 5.3.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.
Comment 9 Luke 2016-10-05 04:32:59 UTC
Miklos,
Thanks for fixing this regression. I'm happy to report that your fix works for all OOXML documents not just .docx. 

Unfortunately, there appears to be an error in your transparency conversion math. 70 -> 30 and 30 -> 70. It only gives the correct value for 50%. I think you can fix it by subtracting from one on the import. See Bug 102997.
Comment 10 Commit Notification 2016-10-14 12:56:23 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=21122a831aee1d548c9c539b27f15588675ceee5&h=libreoffice-5-2

tdf#100830 drawingML import: handle <a:alphaModFix>

It will be available in 5.2.4.

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.