summaryrefslogtreecommitdiff
path: root/xfa/fgas/layout/fgas_textbreak.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-09 16:59:12 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-03-13 14:46:37 +0000
commit9e9bab6fe80b41f18c45f52db7ad61503124cbf8 (patch)
tree6f2d635e89b3309c6d21ae464259f834b4faf9f5 /xfa/fgas/layout/fgas_textbreak.h
parent1c97fd137e03a22c69be6d0162197e2add6b81e0 (diff)
downloadpdfium-9e9bab6fe80b41f18c45f52db7ad61503124cbf8.tar.xz
Cleanup TXTLINEALIGNMENT defines
This Cl replaces the FX_TXTLINEALIGNMENT_ defines with an enum and cleans up various usages. Change-Id: I5ff20f046322e5cd39a7d2abbd8735eac81e8c69 Reviewed-on: https://pdfium-review.googlesource.com/2941 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fgas/layout/fgas_textbreak.h')
-rw-r--r--xfa/fgas/layout/fgas_textbreak.h27
1 files changed, 8 insertions, 19 deletions
diff --git a/xfa/fgas/layout/fgas_textbreak.h b/xfa/fgas/layout/fgas_textbreak.h
index e9c37ee5d9..36085bbe4e 100644
--- a/xfa/fgas/layout/fgas_textbreak.h
+++ b/xfa/fgas/layout/fgas_textbreak.h
@@ -33,6 +33,7 @@ struct FDE_TEXTEDITPIECE;
#define FX_TXTLAYOUTSTYLE_ExpandTab 0x0100
#define FX_TXTLAYOUTSTYLE_SingleLine 0x0200
#define FX_TXTLAYOUTSTYLE_CombText 0x0400
+
#define FX_TXTCHARSTYLE_Alignment 0x000F
#define FX_TXTCHARSTYLE_ArabicNumber 0x0010
#define FX_TXTCHARSTYLE_ArabicShadda 0x0020
@@ -41,25 +42,13 @@ struct FDE_TEXTEDITPIECE;
#define FX_TXTCHARSTYLE_ArabicContext 0x0300
#define FX_TXTCHARSTYLE_ArabicIndic 0x0400
#define FX_TXTCHARSTYLE_ArabicComma 0x0800
-#define FX_TXTLINEALIGNMENT_Left 0
-#define FX_TXTLINEALIGNMENT_Center 1
-#define FX_TXTLINEALIGNMENT_Right 2
-#define FX_TXTLINEALIGNMENT_Justified (1 << 2)
-#define FX_TXTLINEALIGNMENT_Distributed (2 << 2)
-#define FX_TXTLINEALIGNMENT_JustifiedLeft \
- (FX_TXTLINEALIGNMENT_Left | FX_TXTLINEALIGNMENT_Justified)
-#define FX_TXTLINEALIGNMENT_JustifiedCenter \
- (FX_TXTLINEALIGNMENT_Center | FX_TXTLINEALIGNMENT_Justified)
-#define FX_TXTLINEALIGNMENT_JustifiedRight \
- (FX_TXTLINEALIGNMENT_Right | FX_TXTLINEALIGNMENT_Justified)
-#define FX_TXTLINEALIGNMENT_DistributedLeft \
- (FX_TXTLINEALIGNMENT_Left | FX_TXTLINEALIGNMENT_Distributed)
-#define FX_TXTLINEALIGNMENT_DistributedCenter \
- (FX_TXTLINEALIGNMENT_Center | FX_TXTLINEALIGNMENT_Distributed)
-#define FX_TXTLINEALIGNMENT_DistributedRight \
- (FX_TXTLINEALIGNMENT_Right | FX_TXTLINEALIGNMENT_Distributed)
-#define FX_TXTLINEALIGNMENT_LowerMask 0x03
-#define FX_TXTLINEALIGNMENT_HigherMask 0x0C
+
+enum CFX_TxtLineAlignment {
+ CFX_TxtLineAlignment_Left = 0,
+ CFX_TxtLineAlignment_Center = 1 << 0,
+ CFX_TxtLineAlignment_Right = 1 << 1,
+ CFX_TxtLineAlignment_Justified = 1 << 2
+};
struct FX_TPO {
int32_t index;