diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx | 2 | ||||
-rw-r--r-- | include/drawinglayer/primitive2d/textenumsprimitive2d.hxx | 10 | ||||
-rw-r--r-- | include/editeng/emphasismarkitem.hxx | 2 | ||||
-rw-r--r-- | include/tools/fontenum.hxx | 31 |
4 files changed, 23 insertions, 22 deletions
diff --git a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx index 671b73246261..23f6b26f33b3 100644 --- a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx @@ -99,7 +99,7 @@ namespace drawinglayer bool bUnderlineAbove = false, TextStrikeout eTextStrikeout = TEXT_STRIKEOUT_NONE, bool bWordLineMode = false, - TextEmphasisMark eTextEmphasisMark = TEXT_EMPHASISMARK_NONE, + TextEmphasisMark eTextEmphasisMark = TEXT_FONT_EMPHASIS_MARK_NONE, bool bEmphasisMarkAbove = true, bool bEmphasisMarkBelow = false, TextRelief eTextRelief = TEXT_RELIEF_NONE, diff --git a/include/drawinglayer/primitive2d/textenumsprimitive2d.hxx b/include/drawinglayer/primitive2d/textenumsprimitive2d.hxx index 9464d80e6563..b84779984e95 100644 --- a/include/drawinglayer/primitive2d/textenumsprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/textenumsprimitive2d.hxx @@ -78,11 +78,11 @@ namespace drawinglayer /** TextEmphasisMark definition */ enum TextEmphasisMark { - TEXT_EMPHASISMARK_NONE, - TEXT_EMPHASISMARK_DOT, - TEXT_EMPHASISMARK_CIRCLE, - TEXT_EMPHASISMARK_DISC, - TEXT_EMPHASISMARK_ACCENT + TEXT_FONT_EMPHASIS_MARK_NONE, + TEXT_FONT_EMPHASIS_MARK_DOT, + TEXT_FONT_EMPHASIS_MARK_CIRCLE, + TEXT_FONT_EMPHASIS_MARK_DISC, + TEXT_FONT_EMPHASIS_MARK_ACCENT }; /** TextRelief definition */ diff --git a/include/editeng/emphasismarkitem.hxx b/include/editeng/emphasismarkitem.hxx index 2384aa4e688d..62955dc4832b 100644 --- a/include/editeng/emphasismarkitem.hxx +++ b/include/editeng/emphasismarkitem.hxx @@ -37,7 +37,7 @@ class EDITENG_DLLPUBLIC SvxEmphasisMarkItem : public SfxUInt16Item public: static SfxPoolItem* CreateDefault(); - SvxEmphasisMarkItem( const FontEmphasisMark eVal /*= EMPHASISMARK_NONE*/, + SvxEmphasisMarkItem( const FontEmphasisMark eVal /*= FontEmphasisMark::NONE*/, const sal_uInt16 nId ); // "pure virtual Methods" from SfxPoolItem + SfxEnumItem diff --git a/include/tools/fontenum.hxx b/include/tools/fontenum.hxx index 3ab14d4697c0..ce5736b192d1 100644 --- a/include/tools/fontenum.hxx +++ b/include/tools/fontenum.hxx @@ -20,6 +20,7 @@ #define INCLUDED_TOOLS_FONTENUM_HXX #include <sal/types.h> +#include <o3tl/typed_flags_set.hxx> enum FontFamily { FAMILY_DONTKNOW, FAMILY_DECORATIVE, FAMILY_MODERN, FAMILY_ROMAN, FAMILY_SCRIPT, FAMILY_SWISS, FAMILY_SYSTEM, FontFamily_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; @@ -58,21 +59,21 @@ enum FontStrikeout { STRIKEOUT_NONE, STRIKEOUT_SINGLE, STRIKEOUT_DOUBLE, STRIKEOUT_SLASH, STRIKEOUT_X, FontStrikeout_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; -typedef sal_uInt16 FontEmphasisMark; -#define EMPHASISMARK_NONE ((FontEmphasisMark)0x0000) -#define EMPHASISMARK_DOT ((FontEmphasisMark)0x0001) -#define EMPHASISMARK_CIRCLE ((FontEmphasisMark)0x0002) -#define EMPHASISMARK_DISC ((FontEmphasisMark)0x0003) -#define EMPHASISMARK_ACCENT ((FontEmphasisMark)0x0004) -#define EMPHASISMARK_STYLE ((FontEmphasisMark)0x00FF) -#define EMPHASISMARK_POS_ABOVE ((FontEmphasisMark)0x1000) -#define EMPHASISMARK_POS_BELOW ((FontEmphasisMark)0x2000) - -// Only for compatibility -#define EMPHASISMARK_DOTS_ABOVE (EMPHASISMARK_DOT | EMPHASISMARK_POS_ABOVE) -#define EMPHASISMARK_DOTS_BELOW (EMPHASISMARK_DOT | EMPHASISMARK_POS_BELOW) -#define EMPHASISMARK_SIDE_DOTS (EMPHASISMARK_ACCENT | EMPHASISMARK_POS_ABOVE) -#define EMPHASISMARK_CIRCLE_ABOVE (EMPHASISMARK_CIRCLE | EMPHASISMARK_POS_ABOVE) +enum class FontEmphasisMark { + NONE = 0x0000, // capitalisation to avoid conflict with X11 macro + Dot = 0x0001, + Circle = 0x0002, + Disc = 0x0003, + Accent = 0x0004, + Style = 0x000f, + PosAbove = 0x1000, + PosBelow = 0x2000 +}; +namespace o3tl +{ + template<> struct typed_flags<FontEmphasisMark> : is_typed_flags<FontEmphasisMark, 0x300f> {}; +} + enum FontType { TYPE_DONTKNOW, TYPE_RASTER, TYPE_VECTOR, TYPE_SCALABLE, FontType_FORCE_EQUAL_SIZE=SAL_MAX_ENUM }; |