summaryrefslogtreecommitdiff
path: root/xfa/src/fgas/include
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-24 11:23:20 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-24 11:23:20 -0800
commit86b5c31dc7c98af877a5e8952c5b55b9ea611f3c (patch)
treeab1c624008578cd4fcb70b30ffab091375769d95 /xfa/src/fgas/include
parent4ca48d1b10998f6c77683f184b8c8c53c7121b9b (diff)
downloadpdfium-86b5c31dc7c98af877a5e8952c5b55b9ea611f3c.tar.xz
Moar _CAPS naming, part 4
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1731483004 .
Diffstat (limited to 'xfa/src/fgas/include')
-rw-r--r--xfa/src/fgas/include/fx_cpg.h52
-rw-r--r--xfa/src/fgas/include/fx_datetime.h50
-rw-r--r--xfa/src/fgas/include/fx_rbk.h14
-rw-r--r--xfa/src/fgas/include/fx_tbk.h14
-rw-r--r--xfa/src/fgas/include/fx_ucd.h9
5 files changed, 80 insertions, 59 deletions
diff --git a/xfa/src/fgas/include/fx_cpg.h b/xfa/src/fgas/include/fx_cpg.h
index 970066156a..0652411779 100644
--- a/xfa/src/fgas/include/fx_cpg.h
+++ b/xfa/src/fgas/include/fx_cpg.h
@@ -164,7 +164,8 @@ enum FX_CODESYSTEM {
FX_SBCS,
FX_DBCS,
};
-typedef struct _FX_CODEPAGE_HEADER {
+
+struct FX_CODEPAGE_HEADER {
uint16_t uCPID;
uint8_t uMinCharBytes;
uint8_t uMaxCharBytes;
@@ -176,54 +177,63 @@ typedef struct _FX_CODEPAGE_HEADER {
FX_WCHAR wMinUnicode;
FX_WCHAR wMaxUnicode;
FX_WCHAR wDefUnicode;
-} FX_CODEPAGE_HEADER;
+};
+
#define FX_CPMAPTYPE_Consecution 1
#define FX_CPMAPTYPE_Strict 2
#define FX_CPMAPTYPE_NoMapping 3
#define FX_CPMAPTYPE_Delta 4
-typedef struct _FX_CPCU_MAPTABLE1 {
+
+struct FX_CPCU_MAPTABLE1 {
uint16_t uMapType;
uint16_t uUniocde;
-} FX_CPCU_MAPTABLE1;
-typedef struct _FX_CPCU_MAPTABLE2 {
+};
+
+struct FX_CPCU_MAPTABLE2 {
uint8_t uTrailByte;
uint8_t uMapType;
uint16_t uOffset;
-} FX_CPCU_MAPTABLE2;
-typedef struct _FX_CPCU_MAPINFO {
+};
+
+struct FX_CPCU_MAPINFO {
FX_CPCU_MAPTABLE1* pMapTable1;
FX_CPCU_MAPTABLE2* pMapTable2;
const uint8_t* pMapData;
-} FX_CPCU_MAPINFO;
-typedef struct _FX_CPUC_MAPTABLE {
+};
+
+struct FX_CPUC_MAPTABLE {
uint16_t uStartUnicode;
uint16_t uEndUnicode;
uint16_t uMapType;
uint16_t uOffset;
-} FX_CPUC_MAPTABLE;
-typedef struct _FX_CPUC_MAPINFO {
+};
+
+struct FX_CPUC_MAPINFO {
uint32_t uMapCount;
FX_CPUC_MAPTABLE* pMapTable;
const uint8_t* pMapData;
-} FX_CPUC_MAPINFO;
-typedef struct _FX_CODEPAGE {
+};
+
+struct FX_CODEPAGE {
FX_CODEPAGE_HEADER const* pCPHeader;
FX_CPCU_MAPINFO const* pCPCUMapInfo;
FX_CPUC_MAPINFO const* pCPUCMapInfo;
-} FX_CODEPAGE, *FX_LPCODEPAGE;
-typedef FX_CODEPAGE const* FX_LPCCODEPAGE;
-typedef struct _FX_STR2CPHASH {
+};
+
+struct FX_STR2CPHASH {
uint32_t uHash;
uint32_t uCodePage;
-} FX_STR2CPHASH;
-typedef struct _FX_CHARSET_MAP {
+};
+
+struct FX_CHARSET_MAP {
uint16_t charset;
uint16_t codepage;
-} FX_CHARSET_MAP;
-typedef struct _FX_LANG2CPMAP {
+};
+
+struct FX_LANG2CPMAP {
FX_WORD wLanguage;
FX_WORD wCodepage;
-} FX_LANG2CPMAP;
+};
class IFX_CodePage {
public:
diff --git a/xfa/src/fgas/include/fx_datetime.h b/xfa/src/fgas/include/fx_datetime.h
index f5bbee7f81..99d1561b50 100644
--- a/xfa/src/fgas/include/fx_datetime.h
+++ b/xfa/src/fgas/include/fx_datetime.h
@@ -161,25 +161,25 @@ class CFX_Unitime {
#if _FX_OS_ != _FX_ANDROID_
#pragma pack(push, 1)
#endif
-typedef struct _FX_DATE {
+struct FX_DATE {
int32_t year;
uint8_t month;
uint8_t day;
-} FX_DATE, *FX_LPDATE;
-typedef FX_DATE const* FX_LPCDATE;
-typedef struct _FX_TIME {
+};
+
+struct FX_TIME {
uint8_t hour;
uint8_t minute;
uint8_t second;
FX_WORD millisecond;
-} FX_TIME, *FX_LPTIME;
-typedef FX_TIME const* FX_LPCTIME;
-typedef struct _FX_TIMEZONE {
+};
+
+struct FX_TIMEZONE {
int8_t tzHour;
uint8_t tzMinute;
-} FX_TIMEZONE, *FX_LPTIMEZONE;
-typedef FX_TIMEZONE const* FX_LPCTIMEZONE;
-typedef struct _FX_DATETIME {
+};
+
+struct FX_DATETIME {
union {
struct {
int32_t year;
@@ -197,9 +197,9 @@ typedef struct _FX_DATETIME {
} sTime;
FX_TIME aTime;
} Time;
-} FX_DATETIME, *FX_LPDATETIME;
-typedef FX_DATETIME const* FX_LPCDATETIME;
-typedef struct _FX_DATETIMEZONE {
+};
+
+struct FX_DATETIMEZONE {
union {
struct {
union {
@@ -229,11 +229,11 @@ typedef struct _FX_DATETIMEZONE {
};
FX_TIMEZONE tz;
};
-} FX_DATETIMEZONE, *FX_LPDATETIMEZONE;
-typedef FX_DATETIMEZONE const* FX_LPCDATETIMEZONE;
+};
#if _FX_OS_ != _FX_ANDROID_
#pragma pack(pop)
#endif
+
class CFX_DateTime {
public:
CFX_DateTime() {}
@@ -241,7 +241,7 @@ class CFX_DateTime {
CFX_DateTime(const CFX_DateTime& dt) { m_DateTime = dt.m_DateTime; }
virtual ~CFX_DateTime() {}
operator FX_DATETIME*() { return &m_DateTime; }
- operator FX_DATETIME const*() const { return &m_DateTime; }
+ operator const FX_DATETIME*() const { return &m_DateTime; }
operator FX_DATETIME&() { return m_DateTime; }
operator const FX_DATETIME&() const { return m_DateTime; }
CFX_DateTime& operator=(const CFX_DateTime& dt) {
@@ -331,24 +331,30 @@ class CFX_DateTime {
return dt;
}
friend FX_BOOL operator==(const CFX_DateTime& dt1, const CFX_DateTime& dt2) {
- return FXSYS_memcmp((FX_LPCDATETIME)dt1, (FX_LPCDATETIME)dt2,
+ return FXSYS_memcmp(static_cast<const FX_DATETIME*>(dt1),
+ static_cast<const FX_DATETIME*>(dt2),
sizeof(FX_DATETIME)) == 0;
}
friend FX_BOOL operator==(const CFX_DateTime& dt1, const FX_DATETIME& dt2) {
- return FXSYS_memcmp((FX_LPCDATETIME)dt1, &dt2, sizeof(FX_DATETIME)) == 0;
+ return FXSYS_memcmp(static_cast<const FX_DATETIME*>(dt1), &dt2,
+ sizeof(FX_DATETIME)) == 0;
}
friend FX_BOOL operator==(const FX_DATETIME& dt1, const CFX_DateTime& dt2) {
- return FXSYS_memcmp(&dt1, (FX_LPCDATETIME)dt2, sizeof(FX_DATETIME)) == 0;
+ return FXSYS_memcmp(&dt1, static_cast<const FX_DATETIME*>(dt2),
+ sizeof(FX_DATETIME)) == 0;
}
friend FX_BOOL operator!=(const CFX_DateTime& dt1, const CFX_DateTime& dt2) {
- return FXSYS_memcmp((FX_LPCDATETIME)dt1, (FX_LPCDATETIME)dt2,
+ return FXSYS_memcmp(static_cast<const FX_DATETIME*>(dt1),
+ static_cast<const FX_DATETIME*>(dt2),
sizeof(FX_DATETIME)) != 0;
}
friend FX_BOOL operator!=(const CFX_DateTime& dt1, const FX_DATETIME& dt2) {
- return FXSYS_memcmp((FX_LPCDATETIME)dt1, &dt2, sizeof(FX_DATETIME)) != 0;
+ return FXSYS_memcmp(static_cast<const FX_DATETIME*>(dt1), &dt2,
+ sizeof(FX_DATETIME)) != 0;
}
friend FX_BOOL operator!=(const FX_DATETIME& dt1, const CFX_DateTime& dt2) {
- return FXSYS_memcmp(&dt1, (FX_LPCDATETIME)dt2, sizeof(FX_DATETIME)) != 0;
+ return FXSYS_memcmp(&dt1, static_cast<const FX_DATETIME*>(dt2),
+ sizeof(FX_DATETIME)) != 0;
}
friend FX_BOOL operator>(const CFX_DateTime& dt1, const CFX_DateTime& dt2) {
return dt1.ToUnitime() > dt2.ToUnitime();
diff --git a/xfa/src/fgas/include/fx_rbk.h b/xfa/src/fgas/include/fx_rbk.h
index a56040de67..5ce93960c9 100644
--- a/xfa/src/fgas/include/fx_rbk.h
+++ b/xfa/src/fgas/include/fx_rbk.h
@@ -63,8 +63,9 @@ class IFX_RTFBreak;
(FX_RTFLINEALIGNMENT_Right | FX_RTFLINEALIGNMENT_Distributed)
#define FX_RTFLINEALIGNMENT_LowerMask 0x03
#define FX_RTFLINEALIGNMENT_HigherMask 0x0C
-typedef struct _FX_RTFTEXTOBJ {
- _FX_RTFTEXTOBJ() {
+
+struct FX_RTFTEXTOBJ {
+ FX_RTFTEXTOBJ() {
pStr = NULL;
pWidths = NULL;
iLength = 0;
@@ -78,6 +79,7 @@ typedef struct _FX_RTFTEXTOBJ {
iHorizontalScale = 100;
iVerticalScale = 100;
}
+
const FX_WCHAR* pStr;
int32_t* pWidths;
int32_t iLength;
@@ -90,8 +92,8 @@ typedef struct _FX_RTFTEXTOBJ {
FX_WCHAR wLineBreakChar;
int32_t iHorizontalScale;
int32_t iVerticalScale;
-} FX_RTFTEXTOBJ, *FX_LPRTFTEXTOBJ;
-typedef FX_RTFTEXTOBJ const* FX_LPCRTFTEXTOBJ;
+};
+
class CFX_RTFPiece : public CFX_Target {
public:
CFX_RTFPiece()
@@ -221,12 +223,12 @@ class IFX_RTFBreak {
virtual void ClearBreakPieces() = 0;
virtual void Reset() = 0;
virtual int32_t GetDisplayPos(
- FX_LPCRTFTEXTOBJ pText,
+ const FX_RTFTEXTOBJ* pText,
FXTEXT_CHARPOS* pCharPos,
FX_BOOL bCharCode = FALSE,
CFX_WideString* pWSForms = NULL,
FX_AdjustCharDisplayPos pAdjustPos = NULL) const = 0;
- virtual int32_t GetCharRects(FX_LPCRTFTEXTOBJ pText,
+ virtual int32_t GetCharRects(const FX_RTFTEXTOBJ* pText,
CFX_RectFArray& rtArray,
FX_BOOL bCharBBox = FALSE) const = 0;
};
diff --git a/xfa/src/fgas/include/fx_tbk.h b/xfa/src/fgas/include/fx_tbk.h
index 5063aec142..073228883d 100644
--- a/xfa/src/fgas/include/fx_tbk.h
+++ b/xfa/src/fgas/include/fx_tbk.h
@@ -77,8 +77,9 @@ class IFX_TxtAccess {
virtual FX_WCHAR GetChar(void* pIdentity, int32_t index) const = 0;
virtual int32_t GetWidth(void* pIdentity, int32_t index) const = 0;
};
-typedef struct _FX_TXTRUN {
- _FX_TXTRUN() {
+
+struct FX_TXTRUN {
+ FX_TXTRUN() {
pAccess = NULL;
pIdentity = NULL;
pStr = NULL;
@@ -95,6 +96,7 @@ typedef struct _FX_TXTRUN {
wLineBreakChar = L'\n';
bSkipSpace = TRUE;
}
+
IFX_TxtAccess* pAccess;
void* pIdentity;
const FX_WCHAR* pStr;
@@ -110,8 +112,8 @@ typedef struct _FX_TXTRUN {
FX_LPCRECTF pRect;
FX_WCHAR wLineBreakChar;
FX_BOOL bSkipSpace;
-} FX_TXTRUN, *FX_LPTXTRUN;
-typedef FX_TXTRUN const* FX_LPCTXTRUN;
+};
+
class CFX_TxtPiece : public CFX_Target {
public:
CFX_TxtPiece()
@@ -206,12 +208,12 @@ class IFX_TxtBreak {
virtual void ClearBreakPieces() = 0;
virtual void Reset() = 0;
virtual int32_t GetDisplayPos(
- FX_LPCTXTRUN pTxtRun,
+ const FX_TXTRUN* pTxtRun,
FXTEXT_CHARPOS* pCharPos,
FX_BOOL bCharCode = FALSE,
CFX_WideString* pWSForms = NULL,
FX_AdjustCharDisplayPos pAdjustPos = NULL) const = 0;
- virtual int32_t GetCharRects(FX_LPCTXTRUN pTxtRun,
+ virtual int32_t GetCharRects(const FX_TXTRUN* pTxtRun,
CFX_RectFArray& rtArray,
FX_BOOL bCharBBox = FALSE) const = 0;
};
diff --git a/xfa/src/fgas/include/fx_ucd.h b/xfa/src/fgas/include/fx_ucd.h
index 51a0a1f2fc..ae1c882e94 100644
--- a/xfa/src/fgas/include/fx_ucd.h
+++ b/xfa/src/fgas/include/fx_ucd.h
@@ -13,12 +13,13 @@
#define FX_JAPCHARPROPERTYEX_Top 0x10
#define FX_JAPCHARPROPERTYEX_Middle 0x20
#define FX_JAPCHARPROPERTYEX_Bottom 0x30
-typedef struct _FX_JAPCHARPROPERTYEX {
+
+struct FX_JAPCHARPROPERTYEX {
FX_WCHAR wChar;
uint8_t uAlign;
-} FX_JAPCHARPROPERTYEX, *FX_LPJAPCHARPROPERTYEX;
-typedef FX_JAPCHARPROPERTYEX const* FX_LPCJAPCHARPROPERTYEX;
-FX_LPCJAPCHARPROPERTYEX FX_GetJapCharPropertyEx(FX_WCHAR wch);
+};
+
+const FX_JAPCHARPROPERTYEX* FX_GetJapCharPropertyEx(FX_WCHAR wch);
typedef FX_BOOL (*FX_AdjustCharDisplayPos)(FX_WCHAR wch,
FX_BOOL bMBCSCode,
IFX_Font* pFont,