Issue 125189 - Derivation of FillStyle for Writer Frames goes wrong in special case
Summary: Derivation of FillStyle for Writer Frames goes wrong in special case
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: 4.2.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.2.0
Assignee: Armin Le Grand
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-02 11:57 UTC by Armin Le Grand
Modified: 2017-05-20 10:35 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Armin Le Grand 2014-07-02 11:57:27 UTC
To Reproduce:
- New Writer doc in AOO410
- Add a frame, fill with some color
- Add a Frame *inside* the 1st frame, also fill with color, 100% transparent
- save, load with AOO trunk
-> color is derived from parent frame while it should not be

Other way:
- New Writer in AOO trunk
- Add a frame, fill with some color
- Add a Frame *inside* the 1st frame, also fill with color, 100% transparent
-> color is derived from parent frame while it should not be
Comment 1 Armin Le Grand 2014-07-02 12:03:23 UTC
Grepping. Reason is that the 0xff transparency value in SvxBrushItem's Color is used in a special way. Transparency there is only allowed for 0x00 to 0xfe. The value 0xff is 'no fill' and means to derive the color from parent.
The change to full DrawingLayer FillStyle already does a good conversion, 0xff creates a XFILL_NONE and other values create XFILL_COLOR (or as needed) with 100% transparency. The decision if the fill is derivated from it's parent frame is based on SdrAllFillAttributesHelper which already has optimized 100% transparence to no fill, thus being correct for painting but not for evaluating the derivation condition.
Thus two changes needed:
- Base the derivation condition on XFillStyleItem directly
- Adapt helpers getSvxBrushItemFromSourceSet/setSvxBrushItemAsFillAttributesToTargetSet to transparency values in the range [0x00 .. 0xfe]
Comment 2 Armin Le Grand 2014-07-02 16:05:27 UTC
Had to adapt some more places, did extensive checks with forward and backward compatibility. Preparing commit...
Comment 3 SVN Robot 2014-07-02 16:06:42 UTC
"alg" committed SVN revision 1607407 into trunk:
i125189 corrected used transparency and handling to values used in the fallba...
Comment 4 Armin Le Grand 2014-07-02 16:08:20 UTC
Committed, done.