Issue 119750 - [From Symphony]Transparency setting of Fill color lost in cell comments.
Summary: [From Symphony]Transparency setting of Fill color lost in cell comments.
Alias: None
Product: Calc
Classification: Application
Component: formatting (show other issues)
Version: 3.4.0
Hardware: PC All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Armin Le Grand
QA Contact:
Depends on:
Blocks: 120823
  Show dependency tree
Reported: 2012-06-05 02:52 UTC by Li Lin Yi
Modified: 2017-05-20 10:31 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

Transparency setting of Fill color lost in cell comments (10.30 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-06-05 02:52 UTC, Li Lin Yi
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Li Lin Yi 2012-06-05 02:52:16 UTC
Created attachment 77958 [details]
Transparency setting of Fill color lost in cell comments

Steps to Reproduce:
1. Open the attached xlsx file to check the cell comments.
2. There are 5 cells which have cell comments. The comments setting describes in the cell comments.

Expected Results:
The fill color should be the same as it is described in the cell comments.

Actual Results: 
Check the last 3 cell comments. The transparency setting lost, whick should be 30%, 70% and 100%.

Build Date & Platform:
Build revision is Rev. 1327774. First found on windows vista.
Comment 1 Armin Le Grand 2012-09-18 05:34:23 UTC
ALG: Taking a look.
Comment 2 Armin Le Grand 2012-09-25 10:40:51 UTC
ALG: When converting to *.xls and importing, the transparencies are also missing. This is a missing feature in *.xls binary import and *.xlsx ooxml import.
Comment 3 Armin Le Grand 2012-09-25 11:25:07 UTC
ALG: BTW: Same in Symphony for *.xls, even worse for *.xlsx (comments are not imported at all).
Comment 4 Armin Le Grand 2012-09-26 11:09:33 UTC
ALG: Reason is that in ooxml MS format the 'opacity' values in this file (see in xl/drawings/vmlDrawing1.vml in the unzipped bugdoc) are *not* in percent asexpected by the importer. I tried to reproduce a file, but all tests generated percentage opacity values.
Looking at the used values shows they are strings with numbers which end with 'f' (or zero in one case). Calculating shows that these are relative to 65536 (which is 0xffff, or 2^16). This looks as if a MS version had errors in export.
Trying to interpret values first as percentage, then as relative to 0xffff (the documentation of ooxml does only say 'String', of course and MS can load the document)...
Comment 5 Armin Le Grand 2012-09-26 11:52:12 UTC
ALG: Added code to ooxml import (module oox) to handle opacity in special method lclDecodeOpacity, works well.
Another problem is that the object's shadow is visible behind the object when fill has transparency. To avoid that, create a shadow clipped on object bounds when this special comment shape is used. This is already prepared in ViewContactOfSdrCaptionObj::createViewIndependentPrimitive2DSequence, but needs to be extended.
Comment 6 Armin Le Grand 2012-09-26 12:15:12 UTC
ALG: Extra shadow for sc comments works well, added to even create shadow when comment is not filled at all (this is what excel does). Some more tests...
Comment 7 Armin Le Grand 2012-09-26 12:26:36 UTC
ALG: Looks good, done.
Comment 8 Armin Le Grand 2012-09-26 12:28:38 UTC
ALG: Commited with revision 1390434.
Comment 9 Shan Zhu 2012-10-08 09:38:41 UTC
Verified on AOO350m1 1391367. Passed.
Comment 10 Shenfeng Liu 2012-10-18 06:06:25 UTC
Update Target Milestone to AOO 3.5.0.