sw/source/core/layout/paintfrm.cxx | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-)
New commits: commit 8cfc86c652bc02eca2733498d4459bd24de2158b Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Mon Nov 15 11:36:39 2021 +0100 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Mon Nov 15 16:53:53 2021 +0100 disable Writer shadow hack in LOK case LOK redraws always with new content, so there's no need to rewrite any possible previous content, and this breaks transparency in LOK case. Change-Id: I1df3fe738f5ac1290720f0e18d6d391e220eb8ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125133 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 554ddc4bbc44..9abc517a2a4f 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -5851,25 +5851,28 @@ enum PaintArea {LEFT, RIGHT, TOP, BOTTOM}; /// Wrapper around pOut->DrawBitmapEx. static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoint, const Size& aSize, const BitmapEx& rBitmapEx, PaintArea eArea) { - // The problem is that if we get called multiple times and the color is - // partly transparent, then the result will get darker and darker. To avoid - // this, always paint the background color before doing the real paint. - tools::Rectangle aRect(aPoint, aSize); - - if (!aRect.IsEmpty()) + if(!comphelper::LibreOfficeKit::isActive()) { - switch (eArea) + // The problem is that if we get called multiple times and the color is + // partly transparent, then the result will get darker and darker. To avoid + // this, always paint the background color before doing the real paint. + tools::Rectangle aRect(aPoint, aSize); + + if (!aRect.IsEmpty()) { - case LEFT: aRect.SetLeft( aRect.Right() - 1 ); break; - case RIGHT: aRect.SetRight( aRect.Left() + 1 ); break; - case TOP: aRect.SetTop( aRect.Bottom() - 1 ); break; - case BOTTOM: aRect.SetBottom( aRect.Top() + 1 ); break; + switch (eArea) + { + case LEFT: aRect.SetLeft( aRect.Right() - 1 ); break; + case RIGHT: aRect.SetRight( aRect.Left() + 1 ); break; + case TOP: aRect.SetTop( aRect.Bottom() - 1 ); break; + case BOTTOM: aRect.SetBottom( aRect.Top() + 1 ); break; + } } - } - pOut->SetFillColor(SwViewOption::GetAppBackgroundColor()); - pOut->SetLineColor(); - pOut->DrawRect(pOut->PixelToLogic(aRect)); + pOut->SetFillColor(SwViewOption::GetAppBackgroundColor()); + pOut->SetLineColor(); + pOut->DrawRect(pOut->PixelToLogic(aRect)); + } // Tiled render if necessary tools::Rectangle aComplete(aPoint, aSize);