sw/source/core/layout/paintfrm.cxx |   33 ++++++++++++++++++---------------
 1 file changed, 18 insertions(+), 15 deletions(-)

New commits:
commit 1b03d81bca698f0d1fa2dff7038c5d43196f8b61
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:52:27 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/+/125225
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    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 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);

Reply via email to