Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: core/include/fxcrt/fx_ucd.h

Issue 1471323004: Inflict PPDF_ENABLE_XFA ifdefs on XFA core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_INCLUDE_FXCRT_FX_UCD_H_ 7 #ifndef CORE_INCLUDE_FXCRT_FX_UCD_H_
8 #define CORE_INCLUDE_FXCRT_FX_UCD_H_ 8 #define CORE_INCLUDE_FXCRT_FX_UCD_H_
9 9
10 #ifndef PDF_ENABLE_XFA
Lei Zhang 2015/11/24 23:36:04 Maybe just fx_basic.h, since that #include fx_syst
Tom Sepez 2015/11/25 18:51:45 Yes, will do in next CL.
11 #include "fx_system.h"
12 #else
10 #include "fx_basic.h" 13 #include "fx_basic.h"
14 #endif
11 15
16 #ifdef PDF_ENABLE_XFA
12 enum FX_CHARBREAKPROP { 17 enum FX_CHARBREAKPROP {
13 FX_CBP_OP = 0, 18 FX_CBP_OP = 0,
14 FX_CBP_CL = 1, 19 FX_CBP_CL = 1,
15 FX_CBP_QU = 2, 20 FX_CBP_QU = 2,
16 FX_CBP_GL = 3, 21 FX_CBP_GL = 3,
17 FX_CBP_NS = 4, 22 FX_CBP_NS = 4,
18 FX_CBP_EX = 5, 23 FX_CBP_EX = 5,
19 FX_CBP_SY = 6, 24 FX_CBP_SY = 6,
20 FX_CBP_IS = 7, 25 FX_CBP_IS = 7,
21 FX_CBP_PR = 8, 26 FX_CBP_PR = 8,
(...skipping 21 matching lines...) Expand all
43 FX_CBP_NL = 29, 48 FX_CBP_NL = 29,
44 FX_CBP_SA = 30, 49 FX_CBP_SA = 30,
45 FX_CBP_SG = 31, 50 FX_CBP_SG = 31,
46 FX_CBP_CB = 32, 51 FX_CBP_CB = 32,
47 FX_CBP_XX = 33, 52 FX_CBP_XX = 33,
48 FX_CBP_AI = 34, 53 FX_CBP_AI = 34,
49 FX_CBP_SP = 35, 54 FX_CBP_SP = 35,
50 FX_CBP_TB = 37, 55 FX_CBP_TB = 37,
51 FX_CBP_NONE = 36, 56 FX_CBP_NONE = 36,
52 }; 57 };
58 #endif
53 #define FX_BIDICLASSBITS 6 59 #define FX_BIDICLASSBITS 6
54 #define FX_BIDICLASSBITSMASK (31 << FX_BIDICLASSBITS) 60 #define FX_BIDICLASSBITSMASK (31 << FX_BIDICLASSBITS)
55 enum FX_BIDICLASS { 61 enum FX_BIDICLASS {
56 FX_BIDICLASS_ON = 0, // Other Neutral 62 FX_BIDICLASS_ON = 0, // Other Neutral
57 FX_BIDICLASS_L = 1, // Left Letter 63 FX_BIDICLASS_L = 1, // Left Letter
58 FX_BIDICLASS_R = 2, // Right Letter 64 FX_BIDICLASS_R = 2, // Right Letter
59 FX_BIDICLASS_AN = 3, // Arabic Number 65 FX_BIDICLASS_AN = 3, // Arabic Number
60 FX_BIDICLASS_EN = 4, // European Number 66 FX_BIDICLASS_EN = 4, // European Number
61 FX_BIDICLASS_AL = 5, // Arabic Letter 67 FX_BIDICLASS_AL = 5, // Arabic Letter
62 FX_BIDICLASS_NSM = 6, // Non-spacing Mark 68 FX_BIDICLASS_NSM = 6, // Non-spacing Mark
(...skipping 14 matching lines...) Expand all
77 83
78 extern const FX_DWORD kTextLayoutCodeProperties[]; 84 extern const FX_DWORD kTextLayoutCodeProperties[];
79 extern const size_t kTextLayoutCodePropertiesSize; 85 extern const size_t kTextLayoutCodePropertiesSize;
80 86
81 extern const FX_WCHAR kFXTextLayoutVerticalMirror[]; 87 extern const FX_WCHAR kFXTextLayoutVerticalMirror[];
82 extern const size_t kFXTextLayoutVerticalMirrorSize; 88 extern const size_t kFXTextLayoutVerticalMirrorSize;
83 89
84 extern const FX_WCHAR kFXTextLayoutBidiMirror[]; 90 extern const FX_WCHAR kFXTextLayoutBidiMirror[];
85 extern const size_t kFXTextLayoutBidiMirrorSize; 91 extern const size_t kFXTextLayoutBidiMirrorSize;
86 92
93 #ifdef PDF_ENABLE_XFA
87 #define FX_CHARTYPEBITS 11 94 #define FX_CHARTYPEBITS 11
88 #define FX_CHARTYPEBITSMASK (15 << FX_CHARTYPEBITS) 95 #define FX_CHARTYPEBITSMASK (15 << FX_CHARTYPEBITS)
89 enum FX_CHARTYPE { 96 enum FX_CHARTYPE {
90 FX_CHARTYPE_Unknown = 0, 97 FX_CHARTYPE_Unknown = 0,
91 FX_CHARTYPE_Tab = (1 << FX_CHARTYPEBITS), 98 FX_CHARTYPE_Tab = (1 << FX_CHARTYPEBITS),
92 FX_CHARTYPE_Space = (2 << FX_CHARTYPEBITS), 99 FX_CHARTYPE_Space = (2 << FX_CHARTYPEBITS),
93 FX_CHARTYPE_Control = (3 << FX_CHARTYPEBITS), 100 FX_CHARTYPE_Control = (3 << FX_CHARTYPEBITS),
94 FX_CHARTYPE_Combination = (4 << FX_CHARTYPEBITS), 101 FX_CHARTYPE_Combination = (4 << FX_CHARTYPEBITS),
95 FX_CHARTYPE_Numeric = (5 << FX_CHARTYPEBITS), 102 FX_CHARTYPE_Numeric = (5 << FX_CHARTYPEBITS),
96 FX_CHARTYPE_Normal = (6 << FX_CHARTYPEBITS), 103 FX_CHARTYPE_Normal = (6 << FX_CHARTYPEBITS),
97 FX_CHARTYPE_ArabicAlef = (7 << FX_CHARTYPEBITS), 104 FX_CHARTYPE_ArabicAlef = (7 << FX_CHARTYPEBITS),
98 FX_CHARTYPE_ArabicSpecial = (8 << FX_CHARTYPEBITS), 105 FX_CHARTYPE_ArabicSpecial = (8 << FX_CHARTYPEBITS),
99 FX_CHARTYPE_ArabicDistortion = (9 << FX_CHARTYPEBITS), 106 FX_CHARTYPE_ArabicDistortion = (9 << FX_CHARTYPEBITS),
100 FX_CHARTYPE_ArabicNormal = (10 << FX_CHARTYPEBITS), 107 FX_CHARTYPE_ArabicNormal = (10 << FX_CHARTYPEBITS),
101 FX_CHARTYPE_ArabicForm = (11 << FX_CHARTYPEBITS), 108 FX_CHARTYPE_ArabicForm = (11 << FX_CHARTYPEBITS),
102 FX_CHARTYPE_Arabic = (12 << FX_CHARTYPEBITS), 109 FX_CHARTYPE_Arabic = (12 << FX_CHARTYPEBITS),
103 }; 110 };
104 111
112 #endif
105 FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch); 113 FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch);
114 #ifdef PDF_ENABLE_XFA
106 FX_BOOL FX_IsCtrlCode(FX_WCHAR ch); 115 FX_BOOL FX_IsCtrlCode(FX_WCHAR ch);
116 #endif
107 FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_BOOL bRTL, FX_BOOL bVertical); 117 FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, FX_BOOL bRTL, FX_BOOL bVertical);
118 #ifdef PDF_ENABLE_XFA
108 FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch, 119 FX_WCHAR FX_GetMirrorChar(FX_WCHAR wch,
109 FX_DWORD dwProps, 120 FX_DWORD dwProps,
110 FX_BOOL bRTL, 121 FX_BOOL bRTL,
111 FX_BOOL bVertical); 122 FX_BOOL bVertical);
112 class CFX_Char { 123 class CFX_Char {
113 public: 124 public:
114 CFX_Char() 125 CFX_Char()
115 : m_wCharCode(0), 126 : m_wCharCode(0),
116 m_nBreakType(0), 127 m_nBreakType(0),
117 m_nRotation(0), 128 m_nRotation(0),
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 int32_t m_iFontHeight; 187 int32_t m_iFontHeight;
177 int16_t m_iBidiClass; 188 int16_t m_iBidiClass;
178 int16_t m_iBidiLevel; 189 int16_t m_iBidiLevel;
179 int16_t m_iBidiPos; 190 int16_t m_iBidiPos;
180 int16_t m_iBidiOrder; 191 int16_t m_iBidiOrder;
181 FX_DWORD m_dwLayoutStyles; 192 FX_DWORD m_dwLayoutStyles;
182 FX_DWORD m_dwIdentity; 193 FX_DWORD m_dwIdentity;
183 IFX_Unknown* m_pUserData; 194 IFX_Unknown* m_pUserData;
184 }; 195 };
185 typedef CFX_ArrayTemplate<CFX_RTFChar> CFX_RTFCharArray; 196 typedef CFX_ArrayTemplate<CFX_RTFChar> CFX_RTFCharArray;
197 #endif
186 198
187 #endif // CORE_INCLUDE_FXCRT_FX_UCD_H_ 199 #endif // CORE_INCLUDE_FXCRT_FX_UCD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698