From 7bf1e66ac51a582527b35b852586cf7474bc7ba8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 12 Apr 2017 14:03:04 +0200 Subject: convert AX_FONTDATA to o3tl::typed_flags Change-Id: If51119fbdde4b1d923b794d126fdae99ca238f81 Reviewed-on: https://gerrit.libreoffice.org/36463 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/oox/ole/axfontdata.hxx | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'include/oox') 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 #include #include +#include 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 : is_typed_flags {}; +} + 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. -- cgit