diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-05-17 12:30:17 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2016-05-18 02:08:00 +0000 |
commit | 378576a9082d64f0ae2becae8a7e2528999bd7a5 (patch) | |
tree | d6dd4504ad4049d291ce38aabeff19edaecc27e5 /starmath/inc/node.hxx | |
parent | f688acfdae00ebdd891737e533d54368810185e1 (diff) |
Convert ATTR_* to scoped enum
Change-Id: Icbf19ca281c260ba0795c7a8e5745d1e603ac8a5
Reviewed-on: https://gerrit.libreoffice.org/25050
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/inc/node.hxx')
-rw-r--r-- | starmath/inc/node.hxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index da58c57351b0..00b457d8d9d5 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -33,8 +33,16 @@ #include <vector> #include <deque> -#define ATTR_BOLD 0x0001 -#define ATTR_ITALIC 0x0002 +enum class FontAttribute { + None = 0x0000, + Bold = 0x0001, + Italic = 0x0002 +}; + +namespace o3tl +{ + template<> struct typed_flags<FontAttribute> : is_typed_flags<FontAttribute, 0x0003> {}; +} enum class FontSizeType { @@ -104,7 +112,7 @@ class SmNode : public SmRect SmScaleMode meScaleMode; RectHorAlign meRectHorAlign; FontChangeMask mnFlags; - sal_uInt16 mnAttributes; + FontAttribute mnAttributes; bool mbIsPhantom; bool mbIsSelected; @@ -132,14 +140,14 @@ public: virtual const SmNode * GetLeftMost() const; FontChangeMask &Flags() { return mnFlags; } - sal_uInt16 & Attributes() { return mnAttributes; } + FontAttribute &Attributes() { return mnAttributes; } bool IsPhantom() const { return mbIsPhantom; } void SetPhantom(bool bIsPhantom); void SetColor(const Color &rColor); - void SetAttribut(sal_uInt16 nAttrib); - void ClearAttribut(sal_uInt16 nAttrib); + void SetAttribut(FontAttribute nAttrib); + void ClearAttribut(FontAttribute nAttrib); const SmFace & GetFont() const { return maFace; }; SmFace & GetFont() { return maFace; }; |