[Libreoffice-commits] core.git: include/vcl svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 13 21:40:24 UTC 2019


 include/vcl/bitmapaccess.hxx   |    5 -----
 svx/source/svdraw/svdoashp.cxx |    3 ++-
 2 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 9c6519398fb5efbe662ae6f9abfffa80ef821a63
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Feb 13 21:37:45 2019 +0100
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Wed Feb 13 22:39:50 2019 +0100

    remove GetLuminance from BitmapReadAccess
    
    It's not really that important shortcut function as the function
    is used only twice in the whole code base.
    
    Change-Id: Idf25ded6320f766bc66beec0ee272a62765303ba
    Reviewed-on: https://gerrit.libreoffice.org/67792
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/include/vcl/bitmapaccess.hxx b/include/vcl/bitmapaccess.hxx
index cb4c8cb6ad0e..d7b1f2838bad 100644
--- a/include/vcl/bitmapaccess.hxx
+++ b/include/vcl/bitmapaccess.hxx
@@ -215,11 +215,6 @@ public:
         return GetPixel(nY, nX).GetBlueOrIndex();
     }
 
-    sal_uInt8 GetLuminance(long nY, long nX) const
-    {
-        return GetColor(nY, nX).GetLuminance();
-    }
-
     /** Get the interpolated color at coordinates fY, fX; if outside, return rFallback */
     BitmapColor GetInterpolatedColorWithFallback( double fY, double fX, const BitmapColor& rFallback ) const;
 
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 0e9435871639..0a1539c570b4 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -361,7 +361,8 @@ static SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const S
                     {
                         for(long x(0); x < pReadAccess->Width(); x++)
                         {
-                            sal_uInt16 nLuminance(static_cast<sal_uInt16>(pReadAccess->GetLuminance(y, x)) + 1);
+                            const BitmapColor aColor = pReadAccess->GetColor(y, x);
+                            sal_uInt16 nLuminance(static_cast<sal_uInt16>(aColor.GetLuminance()) + 1);
                             const Color aDestColor(
                                 static_cast<sal_uInt8>((nLuminance * static_cast<sal_uInt16>(aShadowColor.GetRed())) >> 8),
                                 static_cast<sal_uInt8>((nLuminance * static_cast<sal_uInt16>(aShadowColor.GetGreen())) >> 8),


More information about the Libreoffice-commits mailing list