summaryrefslogtreecommitdiff
path: root/include/vcl
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
parentb13fbd19b7282a1210a2e14bb5ede9ecdf944c1c (diff)
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')
-rw-r--r--include/vcl/animate.hxx2
-rw-r--r--include/vcl/bitmap.hxx16
-rw-r--r--include/vcl/bitmapex.hxx2
-rw-r--r--include/vcl/gdimtf.hxx5
-rw-r--r--include/vcl/outdev.hxx2
5 files changed, 16 insertions, 11 deletions
diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx
index 74a527fc5c84..1f2a6b8b3920 100644
--- a/include/vcl/animate.hxx
+++ b/include/vcl/animate.hxx
@@ -183,7 +183,7 @@ public:
BmpReduce eReduce = BMP_REDUCE_SIMPLE );
bool Invert();
- bool Mirror( sal_uLong nMirrorFlags );
+ bool Mirror( BmpMirrorFlags nMirrorFlags );
bool Adjust(
short nLuminancePercent = 0,
short nContrastPercent = 0,
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
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index d7b08e087779..13afdcd46153 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -223,7 +223,7 @@ public:
@return true, if the operation was completed successfully.
*/
- bool Mirror( sal_uLong nMirrorFlags );
+ bool Mirror( BmpMirrorFlags nMirrorFlags );
/** Scale the bitmap
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index bc8da88cdd9e..8baa116eea95 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -53,9 +53,6 @@ class Gradient;
#define METAFILE_LABEL_NOTFOUND GDI_METAFILE_LABEL_NOTFOUND
#endif
-#define MTF_MIRROR_HORZ 0x00000001UL
-#define MTF_MIRROR_VERT 0x00000002UL
-
enum MtfConversion
{
MTF_CONVERSION_NONE = 0,
@@ -132,7 +129,7 @@ public:
bool operator!=( const GDIMetaFile& rMtf ) const { return !( *this == rMtf ); }
void Clear();
- bool Mirror( sal_uLong nMirrorFlags );
+ bool Mirror( BmpMirrorFlags nMirrorFlags );
void Move( long nX, long nY );
// additional Move method getting specifics how to handle MapMode( MAP_PIXEL )
void Move( long nX, long nY, long nDPIX, long nDPIY );
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index ea284f2764cf..66bcccb8febc 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -245,7 +245,7 @@ namespace vcl {
class FontInfo;
}
-sal_uLong AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix );
+BmpMirrorFlags AdjustTwoRect( SalTwoRect& rTwoRect, const Size& rSizePix );
void AdjustTwoRect( SalTwoRect& rTwoRect, const Rectangle& rValidSrcRect );
extern const sal_uLong nVCLRLut[ 6 ];