diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-11-15 11:36:39 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-11-15 16:52:27 +0100 |
commit | 1b03d81bca698f0d1fa2dff7038c5d43196f8b61 (patch) | |
tree | c293966a3cbe18cd86ae6883b34b54e87978e5af /sw | |
parent | cb1fb692a9d3e571ed8347e2215c67ecde845be6 (diff) |
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/+/125225
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 4eb886a644f7..82d1d4fbcbb7 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -5776,25 +5776,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); |