sw/qa/extras/tiledrendering/tiledrendering.cxx |    4 ++--
 vcl/source/bitmap/BitmapReadAccess.cxx         |    5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 688051edf59a311371b84ea34db4991d3a164d52
Author:     Dennis Francis <[email protected]>
AuthorDate: Thu Nov 11 15:22:28 2021 +0530
Commit:     Dennis Francis <[email protected]>
CommitDate: Wed Jan 26 06:58:09 2022 +0100

    lok: copy over the alpha channel too for cairo...
    
    ...based svp-graphics
    
    Conflicts:
            vcl/source/gdi/bmpacc2.cxx
    
    Change-Id: I653a8e4048c712911f44f610e13c7f6c3e323de2
    (cherry picked from commit a9c473c3306e28462f9a1898a94277cf0adcbe5e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128891
    Tested-by: Jenkins
    Reviewed-by: Dennis Francis <[email protected]>

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index cc50ef8e9c83..b321ae9306a6 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -2879,7 +2879,7 @@ void SwTiledRenderingTest::testHighlightNumbering()
 
     // Yellow highlighting over numbering
     Color aColor(pAccess->GetPixel(103, 148));
-    CPPUNIT_ASSERT_EQUAL(COL_YELLOW, aColor);
+    CPPUNIT_ASSERT_EQUAL(Color(ColorTransparency, 0xFF, 0xFF, 0xFF, 0x00), 
aColor);
 }
 
 void SwTiledRenderingTest::testHighlightNumbering_shd()
@@ -2904,7 +2904,7 @@ void SwTiledRenderingTest::testHighlightNumbering_shd()
 
     // No highlighting over numbering - w:shd does not apply to numbering.
     Color aColor(pAccess->GetPixel(103, 148));
-    CPPUNIT_ASSERT_EQUAL(COL_WHITE, aColor);
+    CPPUNIT_ASSERT_EQUAL(Color(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF), 
aColor);
 }
 
 void SwTiledRenderingTest::testPilcrowRedlining()
diff --git a/vcl/source/bitmap/BitmapReadAccess.cxx 
b/vcl/source/bitmap/BitmapReadAccess.cxx
index 6e87debd1ec1..08c148a4d3fe 100644
--- a/vcl/source/bitmap/BitmapReadAccess.cxx
+++ b/vcl/source/bitmap/BitmapReadAccess.cxx
@@ -19,6 +19,7 @@
 
 #include <vcl/BitmapReadAccess.hxx>
 #include <vcl/BitmapTools.hxx>
+#include <comphelper/lok.hxx>
 
 #include <salbmp.hxx>
 #include <svdata.hxx>
@@ -457,6 +458,8 @@ BitmapColor 
BitmapReadAccess::GetPixelForN32BitTcBgrx(ConstScanline pScanline, t
     aBitmapColor.SetBlue(*pScanline++);
     aBitmapColor.SetGreen(*pScanline++);
     aBitmapColor.SetRed(*pScanline);
+    if (comphelper::LibreOfficeKit::isActive())
+        aBitmapColor.SetAlpha(0xFF - *(++pScanline));
 
     return aBitmapColor;
 }
@@ -480,7 +483,7 @@ void BitmapReadAccess::SetPixelForN32BitTcBgrx(Scanline 
pScanline, tools::Long n
     *pScanline++ = rBitmapColor.GetBlue();
     *pScanline++ = rBitmapColor.GetGreen();
     *pScanline++ = rBitmapColor.GetRed();
-    *pScanline = 0xFF;
+    *pScanline = (comphelper::LibreOfficeKit::isActive()) ? 0xFF - 
rBitmapColor.GetAlpha() : 0xFF;
 }
 
 BitmapColor BitmapReadAccess::GetPixelForN32BitTcRgba(ConstScanline pScanline, 
tools::Long nX,

Reply via email to