From 49e13aa41895e8562d83cff189ab6a78d5d902aa Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 19 May 2015 13:12:35 +0200 Subject: convert FONT_SUBSTITUTE constants to scoped enum Change-Id: I8312f0117f33349218a09ccdfea946c66ceb1b3e --- include/vcl/outdev.hxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index dda1507807ea..f9586ca7023a 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -266,9 +266,17 @@ namespace o3tl template<> struct typed_flags : is_typed_flags {}; } -// AddFontSubstitute -#define FONT_SUBSTITUTE_ALWAYS ((sal_uInt16)0x0001) -#define FONT_SUBSTITUTE_SCREENONLY ((sal_uInt16)0x0002) +// AddFontSubstitute() flags +enum class AddFontSubstituteFlags +{ + NONE = 0x00, + ALWAYS = 0x01, + ScreenOnly = 0x02, +}; +namespace o3tl +{ + template<> struct typed_flags : is_typed_flags {}; +} #define DEFAULTFONT_FLAGS_ONLYONE ((sal_uLong)0x00000001) @@ -1259,7 +1267,7 @@ public: static void EndFontSubstitution(); static void AddFontSubstitute( const OUString& rFontName, const OUString& rReplaceFontName, - sal_uInt16 nFlags = 0 ); + AddFontSubstituteFlags nFlags = AddFontSubstituteFlags::NONE ); static void RemoveFontSubstitute( sal_uInt16 n ); static sal_uInt16 GetFontSubstituteCount(); -- cgit