summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-11 10:30:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-11 18:10:16 +0100
commite58503b743d6dd5e100bfc1abb6a96f28d17d318 (patch)
tree68e5ed29b3092c901dadcaad7d2ead44b5d65799 /filter
parentLog just one line in cppuhelper::ServiceManager::preloadImplementations() (diff)
downloadcore-e58503b743d6dd5e100bfc1abb6a96f28d17d318.tar.gz
core-e58503b743d6dd5e100bfc1abb6a96f28d17d318.zip
Replace macro with function
...and move it into the only .cxx that uses it; making just enough of BitmapColor constexpr as is useful here Change-Id: I8a035f67f4b218dcef2f100814c62b25fb32d5be Reviewed-on: https://gerrit.libreoffice.org/47750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/source/graphicfilter/icgm/bitmap.cxx7
-rw-r--r--filter/source/graphicfilter/icgm/main.hxx2
2 files changed, 7 insertions, 2 deletions
diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx
index 3dc9d98dc668..4a99c2de3706 100644
--- a/filter/source/graphicfilter/icgm/bitmap.cxx
+++ b/filter/source/graphicfilter/icgm/bitmap.cxx
@@ -20,6 +20,13 @@
#include "main.hxx"
+namespace {
+
+constexpr BitmapColor BMCOL(sal_uInt32 _col) {
+ return BitmapColor( (sal_Int8)(_col >> 16 ), (sal_Int8)( _col >> 8 ), (sal_Int8)_col );
+}
+
+}
CGMBitmap::CGMBitmap( CGM& rCGM ) :
mpCGM ( &rCGM ),
diff --git a/filter/source/graphicfilter/icgm/main.hxx b/filter/source/graphicfilter/icgm/main.hxx
index d213b002a191..508c8f3ebf6b 100644
--- a/filter/source/graphicfilter/icgm/main.hxx
+++ b/filter/source/graphicfilter/icgm/main.hxx
@@ -22,8 +22,6 @@
#include "cgm.hxx"
-#define BMCOL( _col ) BitmapColor( (sal_Int8)(_col >> 16 ), (sal_Int8)( _col >> 8 ), (sal_Int8)_col )
-
#include <vcl/salbtype.hxx>
#include <tools/stream.hxx>
#include "bundles.hxx"