[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/qa vcl/source

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Thu Mar 28 08:15:09 UTC 2019


 sw/qa/extras/ooxmlexport/ooxmlexport10.cxx |    2 +-
 vcl/source/gdi/bitmapex.cxx                |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 06a3fa162cddc351bd77f5a8327730b4f4dfbee3
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Mar 13 17:23:42 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Mar 28 09:14:45 2019 +0100

    fix transparency handling in BitmapEx::GetPixelColor()
    
    Apparently the Color class uses transparency as the opposite
    of the normally used meaning of opacity, so transparency 255
    means transparent.
    
    Change-Id: I3a76c2c93d98ad3c850017d3fd569b04dc6c19c8
    Reviewed-on: https://gerrit.libreoffice.org/69211
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    (cherry picked from commit 6cf42adde156ab9931641feacaa523c3d8991ac7)
    Reviewed-on: https://gerrit.libreoffice.org/69671
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index 009b77069055..6bd4debbb768 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -584,7 +584,7 @@ DECLARE_OOXMLEXPORT_TEST(testMsoBrightnessContrast, "msobrightnesscontrast.docx"
     CPPUNIT_ASSERT_EQUAL(58L, aBitmap.GetSizePixel().Width());
     CPPUNIT_ASSERT_EQUAL(320L, aBitmap.GetSizePixel().Height());
     Color aColor(aBitmap.GetPixelColor(20, 30));
-    CPPUNIT_ASSERT_EQUAL(Color( 255, 0xce, 0xce, 0xce ), aColor);
+    CPPUNIT_ASSERT_EQUAL(Color( 0xce, 0xce, 0xce ), aColor);
 }
 
 DECLARE_OOXMLEXPORT_TEST(testChartSize, "chart-size.docx")
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index d5cf8178c34f..b89719c70b42 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -757,7 +757,7 @@ Color BitmapEx::GetPixelColor(sal_Int32 nX, sal_Int32 nY) const
         aColor.SetTransparency( pAlphaReadAccess->GetPixel( nY, nX ).GetIndex() );
     }
     else
-        aColor.SetTransparency(255);
+        aColor.SetTransparency( 0 );
     return aColor;
 }
 


More information about the Libreoffice-commits mailing list