summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-20 14:15:36 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-22 17:51:13 +0000
commiteaba47bce44a373116b0583dc293c8c3238b7bea (patch)
tree3af5cb6724fcc1e2e61fd154eb616bc0a2f1ddd1 /include
parentc093af75202f6c9d8e6ae7d8e933b82da6f2c11b (diff)
Convert XOUTBMP to scoped enum
Change-Id: I8d10cdc78ca73d86bdc9aa08fca591f6eb85eb9e Reviewed-on: https://gerrit.libreoffice.org/25196 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/svx/xoutbmp.hxx33
1 files changed, 19 insertions, 14 deletions
diff --git a/include/svx/xoutbmp.hxx b/include/svx/xoutbmp.hxx
index 37dfb307701c..c694625092a0 100644
--- a/include/svx/xoutbmp.hxx
+++ b/include/svx/xoutbmp.hxx
@@ -24,19 +24,24 @@
#include <com/sun/star/uno/Sequence.h>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <svx/svxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
-#define XOUTBMP_MIRROR_HORZ 0x00000001L
-#define XOUTBMP_MIRROR_VERT 0x00000010L
-
-#define XOUTBMP_CONTOUR_HORZ 0x00000001L
-#define XOUTBMP_CONTOUR_VERT 0x00000002L
-#define XOUTBMP_CONTOUR_EDGEDETECT 0x00000004L
-#define XOUTBMP_DONT_ADD_EXTENSION 0x00000008L
-
-#define XOUTBMP_DONT_EXPAND_FILENAME 0x10000000L
-#define XOUTBMP_USE_GIF_IF_POSSIBLE 0x20000000L
-#define XOUTBMP_USE_GIF_IF_SENSIBLE 0x40000000L
-#define XOUTBMP_USE_NATIVE_IF_POSSIBLE 0x80000000L
+enum class XOutFlags {
+ NONE = 0x00000000,
+ MirrorHorz = 0x00000001,
+ MirrorVert = 0x00000010,
+ ContourHorz = 0x00000001,
+ ContourVert = 0x00000002,
+ ContourEdgeDetect = 0x00000004,
+ DontAddExtension = 0x00000008,
+ DontExpandFilename = 0x00010000,
+ UseGifIfPossible = 0x00020000,
+ UseGifIfSensible = 0x00040000,
+ UseNativeIfPossible = 0x00080000,
+};
+namespace o3tl {
+ template<> struct typed_flags<XOutFlags> : is_typed_flags<XOutFlags, 0x000f001f> {};
+}
class GraphicFilter;
class VirtualDevice;
@@ -54,7 +59,7 @@ public:
static Graphic MirrorGraphic( const Graphic& rGraphic, const BmpMirrorFlags nMirrorFlags );
static Animation MirrorAnimation( const Animation& rAnimation, bool bHMirr, bool bVMirr );
static sal_uInt16 WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
- const OUString& rFilterName, const sal_uIntPtr nFlags = 0L,
+ const OUString& rFilterName, const XOutFlags nFlags = XOutFlags::NONE,
const Size* pMtfSize_100TH_MM = nullptr );
static bool GraphicToBase64(const Graphic& rGraphic, OUString& rOUString);
@@ -64,7 +69,7 @@ public:
static Bitmap DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold );
- static tools::Polygon GetCountour( const Bitmap& rBmp, const sal_uIntPtr nContourFlags,
+ static tools::Polygon GetCountour( const Bitmap& rBmp, const XOutFlags nContourFlags,
const sal_uInt8 cEdgeDetectThreshold = 50,
const Rectangle* pWorkRect = nullptr );
};