Apache OpenOffice (AOO) Bugzilla – Issue 125189
Derivation of FillStyle for Writer Frames goes wrong in special case
Last modified: 2017-05-20 10:35:17 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
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]
Had to adapt some more places, did extensive checks with forward and backward compatibility. Preparing commit...
"alg" committed SVN revision 1607407 into trunk: i125189 corrected used transparency and handling to values used in the fallba...
Committed, done.