diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-12 14:03:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-13 12:02:20 +0200 |
commit | 7bf1e66ac51a582527b35b852586cf7474bc7ba8 (patch) | |
tree | b74f9d4ab878fe517542fd4e13dfea9e49b8725e /include/oox | |
parent | 93d58279cd56fd026db4dfb68d04fc22edba1abc (diff) |
convert AX_FONTDATA to o3tl::typed_flags
Change-Id: If51119fbdde4b1d923b794d126fdae99ca238f81
Reviewed-on: https://gerrit.libreoffice.org/36463
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/oox')
-rw-r--r-- | include/oox/ole/axfontdata.hxx | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/include/oox/ole/axfontdata.hxx b/include/oox/ole/axfontdata.hxx index c255747357fa..fa79aef9d1a9 100644 --- a/include/oox/ole/axfontdata.hxx +++ b/include/oox/ole/axfontdata.hxx @@ -23,22 +23,29 @@ #include <oox/dllapi.h> #include <rtl/ustring.hxx> #include <sal/types.h> +#include <o3tl/typed_flags_set.hxx> namespace oox { class BinaryInputStream; class BinaryOutputStream; } +enum class AxFontFlags { + NONE = 0x00000000, + Bold = 0x00000001, + Italic = 0x00000002, + Underline = 0x00000004, + Strikeout = 0x00000008, + Disabled = 0x00002000, + AutoColor = 0x40000000, +}; +namespace o3tl { + template<> struct typed_flags<AxFontFlags> : is_typed_flags<AxFontFlags, 0x4000200f> {}; +} + namespace oox { namespace ole { -const sal_uInt32 AX_FONTDATA_BOLD = 0x00000001; -const sal_uInt32 AX_FONTDATA_ITALIC = 0x00000002; -const sal_uInt32 AX_FONTDATA_UNDERLINE = 0x00000004; -const sal_uInt32 AX_FONTDATA_STRIKEOUT = 0x00000008; -const sal_uInt32 AX_FONTDATA_DISABLED = 0x00002000; -const sal_uInt32 AX_FONTDATA_AUTOCOLOR = 0x40000000; - enum class AxHorizontalAlign { Left = 1, Right = 2, Center = 3 }; @@ -46,8 +53,8 @@ enum class AxHorizontalAlign { /** All entries of a font property. */ struct OOX_DLLPUBLIC AxFontData { - OUString maFontName; ///< Name of the used font. - sal_uInt32 mnFontEffects; ///< Font effect flags. + OUString maFontName; ///< Name of the used font. + AxFontFlags mnFontEffects; ///< Font effect flags. sal_Int32 mnFontHeight; ///< Height of the font (not really twips, see code). sal_Int32 mnFontCharSet; ///< Windows character set of the font. AxHorizontalAlign mnHorAlign; ///< Horizontal text alignment. |