The attached document relies on 1x bit mask clipping to ensure the gradient is contained within the shape from the drawinglayer: #5 0x00007fffe05ab768 in drawinglayer::impBufferDevice::paint (this=0x7fffffff84f0, fTrans=0) at /data/opt/libreoffice/master/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx:336 #6 0x00007fffe05c4226 in drawinglayer::processor2d::VclProcessor2D::RenderMaskPrimitive2DPixel (this=0x1a4d070, rMaskCandidate=...) at /data/opt/libreoffice/master/drawinglayer/source/processor2d/vclprocessor2d.cxx:910 Unfortunately the headless backend mangles the palette of the bitmap by mis-allocating the colors; a trivial fix but horrible to find chasing through basebmp. The use of uninitialized data to provide the palette colors being rather unfortunate ;-) Thankfully an easy fix.
Created attachment 116665 [details] Gradient test document
Ancient bug - amazing really ;-) pushed fix to gerrit: https://gerrit.libreoffice.org/16382
Michael Meeks committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b1b8419d34379dcca31e85ca78957fcf1656b178 tdf#92194 - fix headless masking operations in vcl. It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Meeks committed a patch related to this issue. It has been pushed to "libreoffice-5-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=88b77c0b1866db0d729cc2c15b5d8d4f01e9630d&h=libreoffice-5-0 tdf#92194 - fix headless masking operations in vcl. It will be available in 5.0.0.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.