Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | rectangle with gradient -> To Metafile -> Break fails | ||
---|---|---|---|
Product: | Draw | Reporter: | Regina Henschel <rb.henschel> |
Component: | editing | Assignee: | Armin Le Grand <Armin.Le.Grand> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | Normal | ||
Priority: | P3 | CC: | Armin.Le.Grand |
Version: | 4.1.0 | Keywords: | regression |
Target Milestone: | 4.2.0 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
Regina Henschel
2014-07-06 19:38:47 UTC
Indeed, happens as described, very strange. Taking a look... Same in AOO410 and AOO401. Works in AOO341, creates outline rect and a filled rect with the gradient as attribute (as expected). Digging deeper... This a surprising error; it's an ages-old error in the metafile importer (ImpSdrGDIMetaFileImport). The cases where a gradient is to be set at an SdrObject the FillStyle is simply set *wrong* to XFILL_HATCH instead of XFILL_GRADIENT. I wonder that this was never detected earlier, sigh. The next problem is that indeed 5 objects get created - GradientA - GradientB - black-filled rectangle - GradientC - outline This is because in the old days of VCL the gradients were painted by drawing the unmasked gradient (GradientB), XORing with black mask (black-filled rectangle) and painting the gradient again XORed (GradientC). Also a GradientEx action is in front of these (GradientA). Additionally all this is bracketed with two comment actions of type 'XGRAD_SEQ_BEGIN/XGRAD_SEQ_END' which the importer tries to use in DoAction( MetaCommentAction& rAct, ...), but this goes wrong since it implies that the Next() mechanism at the metafile action list (from tools) is used which is not the case. When correcting all this only one error remains: The object filled with the gradient has an outline. This happens due to the SfxItemSet being created to hold the attributes has no WhichID for XLineStyleItem, so setting this item at it just goes wrong. Changed that to use the SfxItemSet range from the target object, this cannot fail. Checking with these changes again (and doing some more tests)... "alg" committed SVN revision 1608485 into trunk: i125211 corrected beaking metafiles with gradient actions Checked, committed, done. This one is too dangerous for AOO411, as can be seen from how long it was undiscovered and how dangerous changes in that area are. |