summaryrefslogtreecommitdiffstats
path: root/include/vcl/bitmap.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-06 09:00:50 +0200
committerNoel Grandin <noel@peralex.com>2015-05-06 09:01:31 +0200
commit662fc8eaa94d766104bced33c18b4718722c6692 (patch)
treebdf3c702a3e1991e6e20cfd2d10615bf844930df /include/vcl/bitmap.hxx
parentconvert BMP_SCALE constant to scoped enum (diff)
downloadcore-662fc8eaa94d766104bced33c18b4718722c6692.tar.gz
core-662fc8eaa94d766104bced33c18b4718722c6692.zip
convert BMP_MIRROR constants to scoped enum
and fix bug in svx/source/xoutdev/_xoutbmp.cxx,XOutBitmap::MirrorGraphic where it was not correctly translating between different flags types. Change-Id: I78b4965544da2aa54b67ec18307fa54c8ffc3aee
Diffstat (limited to 'include/vcl/bitmap.hxx')
-rw-r--r--include/vcl/bitmap.hxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index be7d4eb293d7..5e75b69626d9 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -28,10 +28,18 @@
#include <vcl/mapmod.hxx>
#include <vcl/region.hxx>
#include <vcl/scopedbitmapaccess.hxx>
+#include <o3tl/typed_flags_set.hxx>
-#define BMP_MIRROR_NONE 0x00000000UL
-#define BMP_MIRROR_HORZ 0x00000001UL
-#define BMP_MIRROR_VERT 0x00000002UL
+enum class BmpMirrorFlags
+{
+ NONE = 0x00,
+ Horizontal = 0x01,
+ Vertical = 0x02,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<BmpMirrorFlags> : is_typed_flags<BmpMirrorFlags, 0x03> {};
+}
enum class BmpScaleFlag
@@ -534,7 +542,7 @@ public:
@return true, if the operation was completed successfully.
*/
- bool Mirror( sal_uLong nMirrorFlags );
+ bool Mirror( BmpMirrorFlags nMirrorFlags );
/** Scale the bitmap