summaryrefslogtreecommitdiff
path: root/canvas
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-05-25 22:16:50 +0200
committerMichael Stahl <mstahl@redhat.com>2016-05-25 23:47:21 +0200
commit03ddce193b3a031d9156775a8ee94206ba5b39ce (patch)
tree00b37356355a0e9b12a0e4a9209a35f6e5cfb44c /canvas
parentaa7772a80bca16df21b24c3632fce8244d6055bf (diff)
canvas: replace BOOST_PP usage
Change-Id: I46bb4aba6c08fb753b22242069ef0b00d4c77f12
Diffstat (limited to 'canvas')
-rw-r--r--canvas/source/directx/dx_canvasbitmap.cxx28
1 files changed, 11 insertions, 17 deletions
diff --git a/canvas/source/directx/dx_canvasbitmap.cxx b/canvas/source/directx/dx_canvasbitmap.cxx
index 2af84a56dbab..e2e249a9da47 100644
--- a/canvas/source/directx/dx_canvasbitmap.cxx
+++ b/canvas/source/directx/dx_canvasbitmap.cxx
@@ -22,9 +22,6 @@
#include <cctype>
#include <memory>
-#include <boost/preprocessor/repetition.hpp>
-#include <boost/preprocessor/iteration/local.hpp>
-
#include <cppuhelper/supportsservice.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/bitmapex.hxx>
@@ -64,6 +61,16 @@ namespace dxcanvas
{
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[256];
+ AlphaDIB()
+ : bmiHeader({0,0,0,1,8,BI_RGB,0,0,0,0,0})
+ {
+ for (size_t i = 0; i < 256; ++i)
+ {
+ // this here fills palette with grey level colors, starting
+ // from 0,0,0 up to 255,255,255
+ bmiColors[i] = { i,i,i,i };
+ }
+ }
};
uno::Any SAL_CALL CanvasBitmap::getFastPropertyValue( sal_Int32 nHandle ) throw (uno::RuntimeException)
@@ -158,20 +165,7 @@ namespace dxcanvas
}
else
{
- static AlphaDIB aDIB=
- {
- {0,0,0,1,8,BI_RGB,0,0,0,0,0},
- {
- // this here fills palette with grey
- // level colors, starting from 0,0,0
- // up to 255,255,255
-#define BOOST_PP_LOCAL_MACRO(n_) \
- BOOST_PP_COMMA_IF(n_) \
- {n_,n_,n_,n_}
-#define BOOST_PP_LOCAL_LIMITS (0, 255)
-#include BOOST_PP_LOCAL_ITERATE()
- }
- };
+ static AlphaDIB aDIB;
// need to copy&convert the bitmap, since dx
// canvas uses inline alpha channel