Created attachment 85897 [details] File describing the problem Hello, If you read the attached file with Writer, you'll see the shadow came to the foreground. The reason is that the frame is initialised with transparency colour in writer. With my patch I put the white colour by default.
Created attachment 85898 [details] Proposed patch
No body confirmed the bug for now
Also, please submit the patch to gerrit for review: https://wiki.documentfoundation.org/Development/gerrit Thanks!
Quickly tested here: no regression found by 'make sw.check' and rendering is correct. 2 suggestions though: - change the "//Transparent by default" comment - attach a proper patch with authorship info (or even better, submit the patch to gerrit, with a reference to fdo#69407)
added version and plateform - Sophie
See the gerrit here: https://gerrit.libreoffice.org/#/c/5996/
Hi Matthieu, please do not change the version, it's important for QA, see https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Version, I put it back to the version the bug has been reported to you - Sophie
Created attachment 86144 [details] example that shows the background has to be transparent
see the above attachment example also though. That shows in word and writer at the moment the same way, i.e. graphic is visible through the transparent frame. If you set it to no-fill then that breaks. I think the problem instead is the drawing of the shadow. I reckon it should be clipped to draw only outside the frame area, and not "underneath" it.
@caolan: you're right - sorry I didn't think at this use case. After looking quickly at the code, it seems this isn't a bug, but a feature... See: void SwFrm::PaintShadow in paintfrm.cxx /// OD 23.08.2002 #99657# /// draw full shadow rectangle for frames with transparent drawn backgrounds. And if the last line of this function is changed from: lcl_PaintShadow(rRect, rOutRect, rShadow, bDrawFullShadowRectangle, bTop, bBottom, true, true); to: lcl_PaintShadow(rRect, rOutRect, rShadow, false, bTop, bBottom, true, true); Both test documents are rendered properly - of course this change could have other implications but hopefully it's a hint toward a better fix.
Hello, I would like to test the code you write, but I need to build a 4.0.5/4.0.6 version and the code is very different from the branch 4.1. Do you have any hint about correcting this bug in branch 4.0? Thanks very much. Matthieu.
To be more precise in the code I have /// OD 23.08.2002 #99657# - determine, if full shadow rectangle have to /// be drawn or only two shadow rectangles beside the frame. /// draw full shadow rectangle, if frame background is drawn transparent. /// Status Quo: /// SwLayoutFrm can have transparent drawn backgrounds. Thus, /// "asked" their frame format. bool bDrawFullShadowRectangle = ( IsLayoutFrm() && (static_cast<const SwLayoutFrm*>(this))->GetFmt()->IsBackgroundTransparent() ); .... if ( bDrawFullShadowRectangle ) { /// OD 06.08.2002 #99657# - draw full shadow rectangle .... For me it should be : if (! bDrawFullShadowRectangle ) { /// OD 06.08.2002 #99657# - draw full shadow rectangle Because if the background is transparent it shouldn't be a full shadow rectangle When I test it's good for both files.
Hello The previous code was not good, I made this gerrit https://gerrit.libreoffice.org/#/c/6316/ with a better without any regression.
Hi everyone, The bug is fixed. Please take in consideration this last commit: https://gerrit.libreoffice.org/#/c/6959/ --Mohamed-Ali
So setting to FIXED as of comment14.
fix has not landed in git ... si pending that, reopening
Hello, Is this bug has been fixed in version 4.3? Thanks Soufiane.
Comment on attachment 85898 [details] Proposed patch Marking patch obsolete as there is newer work on gerrit: https://gerrit.libreoffice.org/#/c/6316/ https://gerrit.libreoffice.org/#/c/6959/ https://gerrit.libreoffice.org/#/c/7019/ https://gerrit.libreoffice.org/#/c/7070/ None of which could be merged apparently, so leaving bug open.