Created attachment 179444 [details] File generated with OOo2.1 Open attached file. It has a shape 'Octagon Bevel' and a screenshot of this shape in OpenOffice.org 2.1. You see the same error, when you compare the thumbnail of this shape in Gallery section 'shapes' with an actually inserted shape. The shape is also available in the set "Symbol shapes" in the toolbar. It is a principle error in rendering shapes of type "col-n1234567". Fortunately only for this shape the error is such obvious. The other shape of this kind in the UI is "Diamond Bevel". For more details about this type of shape see https://bz.apache.org/ooo/show_bug.cgi?id=33139. This report is the LO version of bug report https://bz.apache.org/ooo/show_bug.cgi?id=80216.
Reproduced in Version: 7.4.0.0.alpha0+ / LibreOffice Community Build ID: b812150696c574aea0a173d11f178e8d458b1a3e CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3 Locale: es-ES (es_ES.UTF-8); UI: en-US Calc: threaded and LibreOffice 3.3
Created attachment 179647 [details] How Bevel shapes looked in various versions The attached file has in the first row the shapes. Left side is the shape "Square Bevel" (= quad-bevel = mso_sptBevel). On the right side are the shapes "Octagon Bevel" (= col-60da8460) and "Diamond Bevel" (= col-502ad400). The next rows contain screenshots, how these shapes look in various versions. All three use for shading nColorData. "Square Bevel" gets it from assignment, "Octagon Bevel" and "Diamond Bevel" gets it from the type. The shape "Octagon Bevel" has the color encoding 60da8460. The starting number 6 gives the number of color changes. The changes are then 0=original color 0%, d=-30%, a=-60%, 8=-80%, 4=40%, 6=60%, 0 unused. A negative value means darken, a positive value lighten. The segments of the shape are drawn in the order center (I), top-right and bottom-left (II), right and bottom (III), bottom-right (IV), left and top (V), left-top (VI). Between OOo 2.1 (about June 2006) and OOo2.4.3 (about August 2007) the way changed how the geometry of the shape is transformed to PolyPolygons. The changes are likely in fix for AOO bug #i76201 (Armin). Now a segment, which has stroke and fill are rendered by two PolyPolygons, one for the stroke and one for the fill. The center segment of shape "Octagon Bevel" has no stroke, but the others have stroke and fill. The last color change is repeated, if there are more PolyPolygons than color changes. So you get: Color change | OOo2.1 | new way 0% | (I) | (I) -30% | (II) | (II) stroke -60% | (III) | (II) fill -80% | (IV) | (III) stroke 40% | (V) | (III) fill 60% | (VI) | (IV) stroke 60% | | (IV) fill 60% | | (V) stroke 60% | | (V) fill 60% | | (VI) stroke 60% | | (VI) fill My solution is to skip those PolyPolygons which are not filled. After applying my solution the shadings are still not the same as in OOo2.1. The reason is, that the way, how the color adaption is calculated was changed, likely in fix for AOO bug #i102797 (Thorsten). Those changes were made to get rendering of shapes with darken/lighten parts nearer to rendering in PowerPoint. Because that is necessary for shapes of type "mso-", I think it should not be changed. My suggestion is to live with the too dark colors in shape type "col-60da8460" and "col-502ad400", but in our preset group "Symbol Shapes" and in Gallery themes "private://gallery/hidden/imgppt" and "Shapes" replace the shapes "Octagon Bevel" and "Diamond Bevel" with shapes that uses only shades compatible with OOXML. I'll write a new bug for that.
Follow up report is bug 148655. Patch is in https://gerrit.libreoffice.org/c/core/+/133132.
Another option to avoid the too dark segments would be a change in code, so that the Type values "col-502ad400" and "col-60da8460" are only used to detect the shapes "Diamond Bevel" and "Octagon Bevel" and then set their actual ColorData directly, same as done for the "mso_spt*" Types around line #778 in EnhancedCustomShape2d.cxx.
Created attachment 179666 [details] Variants with 2 darken values The too dark shadings are introduced with #i102797. https://bz.apache.org/ooo/show_bug.cgi?id=102797 https://cgit.freedesktop.org/libreoffice/core/diff/svx/source/customshapes/EnhancedCustomShape2d.cxx?id=c048fcfc8b1c68a0d652e17847a40804cb955940 That introduces a new method for calculating the shading. The ColorData of the "mso_spt*" shapes are adapted to the new calculation. But there was no change for other shape types. In the long run, the shapes "Octagon Bevel" and "Diamond Bevel" should be replaced by ones that contain the shading information inside the <enhanced-path> element. ColorData allows 7 grades of lighten and 8 grades of darken. But OOXML and our API for element <enhanced-path> has only 2 grades of lighten and 2 grades of darken. "Diamond Bevel" has 2 lighten and 2 darken values. That works directly. But "Octagon Bevel" has 2 lighten and 3 darken values. Some variants to reduce it are shown in the attachment. The current version of the patch uses variant B.
Regina Henschel committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d5fb8d502e77c1dfc77b2c7bdda4bb1540f3ddaf tdf#148501 color shades only for filled PolyPolygons It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Regina Henschel committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/a9d8f86488dcd44bef4d6f8cee1d6c803f237f9c tdf#148501 color shades only for filled PolyPolygons It will be available in 7.3.4. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.