User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 Build Identifier: 349f4923e265d76cfd76627796dc93e99e0b5d02 Miklos, Looks like there's an error in your transparency conversion math. 70 -> 30 and 30 -> 70. https://cgit.freedesktop.org/libreoffice/core/commit/?id=ecfcee8b05e45ec82dec6ed417e9ac53d4d7b4ff Reproducible: Always Steps to Reproduce: 1. Create a file with transparency in MSO 2. Save 3. Open in LO Actual Results: the complement of the transparency ( 1-transparency) Expected Results: same transparency. Reset User Profile?No
Created attachment 127815 [details] Example of the Bug The transparency calculation only works for .5 ( 1-.5=.5). Other values give the complement. .7 -> .3.
Miklos, --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -655,7 +655,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap, } if (maBlipProps.moAlphaModFix.has()) - rPropMap.setProperty(ShapeProperty::FillTransparency, static_cast<sal_Int16>(maBlipProps.moAlphaModFix.get() / PER_PERCENT)); + rPropMap.setProperty(ShapeProperty::FillTransparency, static_cast<sal_Int16>(100 - (maBlipProps.moAlphaModFix.get() / PER_PERCENT))); } break; Fixed the import conversion. Is the right place to do the conversion? Do you need to use const like PER_PERCENT or is 100 OK here? Can you take care of applying this fix or do you want me to submit a patch?
Best if you submit to gerrit, along with a matching testcase. Based on testTdf100830 in sw/qa/extras/ooxmlimport/ooxmlimport.cxx, hopefully you can add a new test easily. If needed, of course I can help. :-)
lbenes committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ade43e6a86e4f864e771f4b3008a428bc10fa55f tdf#102997 Fix Error in OOXML Transparency Conversion Math 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.
lbenes committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=24998064599e3371208ad8ae4b149d754828d35b&h=libreoffice-5-2 tdf#102997 Fix Error in OOXML Transparency Conversion Math 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.