[Libreoffice-commits] core.git: vcl/source
Noel (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 13 11:53:44 UTC 2020
vcl/source/gdi/salmisc.cxx | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
New commits:
commit 811b77e0f63b91eeb05311c724e3e209bff30f68
Author: Noel <noelgrandin at gmail.com>
AuthorDate: Thu Nov 12 09:34:23 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Nov 13 12:52:48 2020 +0100
remove unused #ifdef
been this way since
commit 8ab086b6cc054501bfbf7ef6fa509c393691e860
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date: Mon Sep 18 16:07:07 2000 +0000
initial import
Change-Id: I878f45163fc0836c786acc12f11d9cd704e4cd64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105624
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 14af546fca67..65ac13656db6 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -41,23 +41,13 @@ while( ( nActY < nHeight1 ) && ( pMapY[ nActY + 1 ] == nMapY ) )
nActY++; \
}
-#define TC_TO_PAL_COLORS 4096
+constexpr int TC_TO_PAL_COLORS = 4096;
static tools::Long ImplIndexFromColor( const BitmapColor& rCol )
{
-#if TC_TO_PAL_COLORS == 4096
-
- return( ( ( static_cast<tools::Long>(rCol.GetBlue()) >> 4) << 8 ) |
+ return ( ( static_cast<tools::Long>(rCol.GetBlue()) >> 4) << 8 ) |
( ( static_cast<tools::Long>(rCol.GetGreen()) >> 4 ) << 4 ) |
- ( static_cast<tools::Long>(rCol.GetRed()) >> 4 ) );
-
-#elif TC_TO_PAL_COLORS == 32768
-
- return( ( ( (tools::Long) rCol.GetBlue() >> 3) << 10 ) |
- ( ( (tools::Long) rCol.GetGreen() >> 3 ) << 5 ) |
- ( (tools::Long) rCol.GetRed() >> 3 ) );
-
-#endif
+ ( static_cast<tools::Long>(rCol.GetRed()) >> 4 );
}
static void ImplPALToPAL( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer,
More information about the Libreoffice-commits
mailing list