diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-01 12:34:33 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-20 09:01:26 -0500 |
commit | 794d5ac4ac0b1dcaac289772ce096a4295d4e15d (patch) | |
tree | d02d4d13e793b0856c4dd962cf4b8d946942e3c4 /include/vcl/outdev.hxx | |
parent | 71804294c79136ef43a8f91b5c961e266d32187a (diff) |
vcl: use enum for complex text layout constants
Since these constants are bitfield flags, we define some methods to make
working with them reasonably type safe.
Move the definitions to outdevstate.hxx, since we need the values there,
and that appears to be the "root most" header file.
Also dump TEXT_LAYOUT_BIDI_LTR constant, since it means the same thing
as TEXT_LAYOUT_DEFAULT (ie. 0), and leaving it in causes people to write
weird code thinking that it's a real flag.
Change-Id: Iddab86cd6c78181ceb8caa48e77e1f5a8e526343
Reviewed-on: https://gerrit.libreoffice.org/10676
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/vcl/outdev.hxx')
-rw-r--r-- | include/vcl/outdev.hxx | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 738e6847bdf7..61114a1fba9c 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -181,17 +181,6 @@ namespace vcl #define GRID_VERTLINES ((sal_uLong)0x00000004) #define GRID_LINES (GRID_HORZLINES | GRID_VERTLINES) -// LayoutModes for Complex Text Layout -#define TEXT_LAYOUT_DEFAULT ((sal_uLong)0x00000000) -#define TEXT_LAYOUT_BIDI_LTR ((sal_uLong)0x00000000) -#define TEXT_LAYOUT_BIDI_RTL ((sal_uLong)0x00000001) -#define TEXT_LAYOUT_BIDI_STRONG ((sal_uLong)0x00000002) -#define TEXT_LAYOUT_TEXTORIGIN_LEFT ((sal_uLong)0x00000004) -#define TEXT_LAYOUT_TEXTORIGIN_RIGHT ((sal_uLong)0x00000008) -#define TEXT_LAYOUT_COMPLEX_DISABLED ((sal_uLong)0x00000100) -#define TEXT_LAYOUT_ENABLE_LIGATURES ((sal_uLong)0x00000200) -#define TEXT_LAYOUT_SUBSTITUTE_DIGITS ((sal_uLong)0x00000400) - // DrawModes #define DRAWMODE_DEFAULT ((sal_uLong)0x00000000) #define DRAWMODE_BLACKLINE ((sal_uLong)0x00000001) @@ -316,7 +305,7 @@ private: mutable long mnEmphasisAscent; mutable long mnEmphasisDescent; sal_uLong mnDrawMode; - sal_uLong mnTextLayoutMode; + ComplexTextLayoutMode mnTextLayoutMode; ImplMapRes maMapRes; ImplThresholdRes maThresRes; OutDevType meOutDevType; @@ -565,8 +554,8 @@ public: void SetDrawMode( sal_uLong nDrawMode ); sal_uLong GetDrawMode() const { return mnDrawMode; } - void SetLayoutMode( sal_uLong nTextLayoutMode ); - sal_uLong GetLayoutMode() const { return mnTextLayoutMode; } + void SetLayoutMode( ComplexTextLayoutMode nTextLayoutMode ); + ComplexTextLayoutMode GetLayoutMode() const { return mnTextLayoutMode; } void SetDigitLanguage( LanguageType ); LanguageType GetDigitLanguage() const { return meTextLanguage; } |