diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-09-10 22:15:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-11 09:09:35 +0200 |
commit | e83201a5fcfa7470cdad76c93c497e71b1caa7f4 (patch) | |
tree | 7e242be8e4d140b306148df1e166da22233a3206 /include | |
parent | 51f4691e7f4f3bceac1d5ec9cbbf37de7e71e471 (diff) |
convert IMAP_OBJ to scoped enum
Change-Id: Id265c098a173b2daf581568779d99c7574f067c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102406
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/imapcirc.hxx | 2 | ||||
-rw-r--r-- | include/vcl/imapobj.hxx | 13 | ||||
-rw-r--r-- | include/vcl/imappoly.hxx | 2 | ||||
-rw-r--r-- | include/vcl/imaprect.hxx | 2 |
4 files changed, 11 insertions, 8 deletions
diff --git a/include/vcl/imapcirc.hxx b/include/vcl/imapcirc.hxx index 11e369d09621..0be06dff8cd3 100644 --- a/include/vcl/imapcirc.hxx +++ b/include/vcl/imapcirc.hxx @@ -49,7 +49,7 @@ public: bool bActive = true, bool bPixelCoords = true ); - virtual sal_uInt16 GetType() const override; + virtual IMapObjectType GetType() const override; virtual bool IsHit( const Point& rPoint ) const override; Point GetCenter( bool bPixelCoords = true ) const; diff --git a/include/vcl/imapobj.hxx b/include/vcl/imapobj.hxx index 982e350547e2..14a7a647e884 100644 --- a/include/vcl/imapobj.hxx +++ b/include/vcl/imapobj.hxx @@ -26,11 +26,14 @@ class Point; class SvStream; -#define IMAP_OBJ_RECTANGLE (sal_uInt16(0x0001)) -#define IMAP_OBJ_CIRCLE (sal_uInt16(0x0002)) -#define IMAP_OBJ_POLYGON (sal_uInt16(0x0003)) -#define IMAP_OBJ_VERSION (sal_uInt16(0x0005)) +enum class IMapObjectType +{ + Rectangle = 1, + Circle = 2, + Polygon = 3 +}; +#define IMAP_OBJ_VERSION (sal_uInt16(0x0005)) #define IMAGE_MAP_VERSION (sal_uInt16(0x0001)) #define IMAPMAGIC "SDIMAP" @@ -90,7 +93,7 @@ public: IMapObject & operator =(IMapObject const &) = default; IMapObject & operator =(IMapObject &&) = default; - virtual sal_uInt16 GetType() const = 0; + virtual IMapObjectType GetType() const = 0; virtual bool IsHit( const Point& rPoint ) const = 0; void Write ( SvStream& rOStm ) const; diff --git a/include/vcl/imappoly.hxx b/include/vcl/imappoly.hxx index 7bf48b6d5aa7..5a9e80c27a69 100644 --- a/include/vcl/imappoly.hxx +++ b/include/vcl/imappoly.hxx @@ -49,7 +49,7 @@ public: bool bActive = true, bool bPixelCoords = true ); - virtual sal_uInt16 GetType() const override; + virtual IMapObjectType GetType() const override; virtual bool IsHit( const Point& rPoint ) const override; tools::Polygon GetPolygon( bool bPixelCoords = true ) const; diff --git a/include/vcl/imaprect.hxx b/include/vcl/imaprect.hxx index 9f9ab842a71b..5870779f4912 100644 --- a/include/vcl/imaprect.hxx +++ b/include/vcl/imaprect.hxx @@ -47,7 +47,7 @@ public: bool bActive = true, bool bPixelCoords = true ); - virtual sal_uInt16 GetType() const override; + virtual IMapObjectType GetType() const override; virtual bool IsHit( const Point& rPoint ) const override; tools::Rectangle GetRectangle( bool bPixelCoords = true ) const; |