summaryrefslogtreecommitdiff
path: root/xfa/fgas/localization
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-03-21 15:00:20 -0700
committerTom Sepez <tsepez@chromium.org>2016-03-21 15:00:20 -0700
commit62a70f90c49cf7714c960186eb063ad55333e6f3 (patch)
tree84b5d0f70b770e6a9ec261342d46638f4d5102bd /xfa/fgas/localization
parent4161c5ca6c5438476bf07b6dacfafb61ea611cc5 (diff)
downloadpdfium-62a70f90c49cf7714c960186eb063ad55333e6f3.tar.xz
Remove FX_WORD in favor of uint16_t.
It isn't buying us anthing, and it looks strange in a struct when other uint types are already present. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1821043003 .
Diffstat (limited to 'xfa/fgas/localization')
-rw-r--r--xfa/fgas/localization/fgas_datetime.cpp36
-rw-r--r--xfa/fgas/localization/fgas_datetime.h18
-rw-r--r--xfa/fgas/localization/fgas_locale.cpp62
-rw-r--r--xfa/fgas/localization/fgas_locale.h8
-rw-r--r--xfa/fgas/localization/fgas_localeimp.h2
-rw-r--r--xfa/fgas/localization/fgas_localemgr.cpp8
-rw-r--r--xfa/fgas/localization/fgas_localemgr.h8
7 files changed, 71 insertions, 71 deletions
diff --git a/xfa/fgas/localization/fgas_datetime.cpp b/xfa/fgas/localization/fgas_datetime.cpp
index 34b8210fc3..ac5ee4a01d 100644
--- a/xfa/fgas/localization/fgas_datetime.cpp
+++ b/xfa/fgas/localization/fgas_datetime.cpp
@@ -124,14 +124,14 @@ static void FX_DaysToDate(int64_t iDays,
}
struct FXUT_SYSTEMTIME {
- FX_WORD wYear;
- FX_WORD wMonth;
- FX_WORD wDayOfWeek;
- FX_WORD wDay;
- FX_WORD wHour;
- FX_WORD wMinute;
- FX_WORD wSecond;
- FX_WORD wMilliseconds;
+ uint16_t wYear;
+ uint16_t wMonth;
+ uint16_t wDayOfWeek;
+ uint16_t wDay;
+ uint16_t wHour;
+ uint16_t wMinute;
+ uint16_t wSecond;
+ uint16_t wMilliseconds;
};
void CFX_Unitime::Now() {
@@ -160,7 +160,7 @@ void CFX_Unitime::Now() {
#endif
Set(utLocal.wYear, (uint8_t)utLocal.wMonth, (uint8_t)utLocal.wDay,
(uint8_t)utLocal.wHour, (uint8_t)utLocal.wMinute,
- (uint8_t)utLocal.wSecond, (FX_WORD)utLocal.wMilliseconds);
+ (uint8_t)utLocal.wSecond, (uint16_t)utLocal.wMilliseconds);
}
void CFX_Unitime::SetGMTime() {
FXUT_SYSTEMTIME utLocal;
@@ -188,7 +188,7 @@ void CFX_Unitime::SetGMTime() {
#endif
Set(utLocal.wYear, (uint8_t)utLocal.wMonth, (uint8_t)utLocal.wDay,
(uint8_t)utLocal.wHour, (uint8_t)utLocal.wMinute,
- (uint8_t)utLocal.wSecond, (FX_WORD)utLocal.wMilliseconds);
+ (uint8_t)utLocal.wSecond, (uint16_t)utLocal.wMilliseconds);
}
void CFX_Unitime::Set(int32_t year,
uint8_t month,
@@ -196,7 +196,7 @@ void CFX_Unitime::Set(int32_t year,
uint8_t hour,
uint8_t minute,
uint8_t second,
- FX_WORD millisecond) {
+ uint16_t millisecond) {
FXSYS_assert(hour <= 23);
FXSYS_assert(minute <= 59);
FXSYS_assert(second <= 59);
@@ -238,7 +238,7 @@ FX_WEEKDAY CFX_Unitime::GetDayOfWeek() const {
}
return (FX_WEEKDAY)v;
}
-FX_WORD CFX_Unitime::GetDayOfYear() const {
+uint16_t CFX_Unitime::GetDayOfYear() const {
int32_t iYear;
uint8_t iMonth, iDay;
FX_DaysToDate(GetDayOfAD(), iYear, iMonth, iDay);
@@ -274,12 +274,12 @@ uint8_t CFX_Unitime::GetSecond() const {
}
return (uint8_t)(v / g_FXMillisecondsPerSecond);
}
-FX_WORD CFX_Unitime::GetMillisecond() const {
+uint16_t CFX_Unitime::GetMillisecond() const {
int32_t v = (int32_t)(m_iUnitime % g_FXMillisecondsPerSecond);
if (v < 0) {
v += g_FXMillisecondsPerSecond;
}
- return (FX_WORD)v;
+ return (uint16_t)v;
}
FX_BOOL CFX_Unitime::AddYears(int32_t iYears) {
FX_UNITIME ut = m_iUnitime;
@@ -350,7 +350,7 @@ FX_BOOL CFX_DateTime::Set(int32_t year,
uint8_t hour,
uint8_t minute,
uint8_t second,
- FX_WORD millisecond) {
+ uint16_t millisecond) {
ASSERT(year != 0);
ASSERT(month >= 1 && month <= 12);
ASSERT(day >= 1 && day <= FX_DaysInMonth(year, month));
@@ -407,7 +407,7 @@ FX_WEEKDAY CFX_DateTime::GetDayOfWeek() const {
}
return (FX_WEEKDAY)v;
}
-FX_WORD CFX_DateTime::GetDayOfYear() const {
+uint16_t CFX_DateTime::GetDayOfYear() const {
return FX_DaysBeforeMonthInYear(m_DateTime.Date.sDate.year,
m_DateTime.Date.sDate.month) +
m_DateTime.Date.sDate.day;
@@ -425,7 +425,7 @@ uint8_t CFX_DateTime::GetMinute() const {
uint8_t CFX_DateTime::GetSecond() const {
return m_DateTime.Time.sTime.second;
}
-FX_WORD CFX_DateTime::GetMillisecond() const {
+uint16_t CFX_DateTime::GetMillisecond() const {
return m_DateTime.Time.sTime.millisecond;
}
FX_BOOL CFX_DateTime::AddYears(int32_t iYears) {
@@ -542,7 +542,7 @@ FX_BOOL CFX_DateTime::AddMilliseconds(int32_t iMilliseconds) {
if (iMilliseconds < 0) {
iSeconds--, iMilliseconds += g_FXMillisecondsPerSecond;
}
- m_DateTime.Time.sTime.millisecond = (FX_WORD)iMilliseconds;
+ m_DateTime.Time.sTime.millisecond = (uint16_t)iMilliseconds;
if (iSeconds != 0) {
AddSeconds(iSeconds);
}
diff --git a/xfa/fgas/localization/fgas_datetime.h b/xfa/fgas/localization/fgas_datetime.h
index 4aa5093006..0a3d14d240 100644
--- a/xfa/fgas/localization/fgas_datetime.h
+++ b/xfa/fgas/localization/fgas_datetime.h
@@ -68,18 +68,18 @@ class CFX_Unitime {
uint8_t hour = 0,
uint8_t minute = 0,
uint8_t second = 0,
- FX_WORD millisecond = 0);
+ uint16_t millisecond = 0);
void Set(FX_UNITIME t);
int32_t GetYear() const;
uint8_t GetMonth() const;
uint8_t GetDay() const;
FX_WEEKDAY GetDayOfWeek() const;
- FX_WORD GetDayOfYear() const;
+ uint16_t GetDayOfYear() const;
int64_t GetDayOfAD() const;
uint8_t GetHour() const;
uint8_t GetMinute() const;
uint8_t GetSecond() const;
- FX_WORD GetMillisecond() const;
+ uint16_t GetMillisecond() const;
FX_BOOL AddYears(int32_t iYears);
FX_BOOL AddMonths(int32_t iMonths);
FX_BOOL AddDays(int32_t iDays);
@@ -177,7 +177,7 @@ struct FX_TIME {
uint8_t hour;
uint8_t minute;
uint8_t second;
- FX_WORD millisecond;
+ uint16_t millisecond;
};
struct FX_TIMEZONE {
@@ -199,7 +199,7 @@ struct FX_DATETIME {
uint8_t hour;
uint8_t minute;
uint8_t second;
- FX_WORD millisecond;
+ uint16_t millisecond;
} sTime;
FX_TIME aTime;
} Time;
@@ -221,7 +221,7 @@ struct FX_DATETIMEZONE {
uint8_t hour;
uint8_t minute;
uint8_t second;
- FX_WORD millisecond;
+ uint16_t millisecond;
};
FX_TIME time;
};
@@ -280,19 +280,19 @@ class CFX_DateTime {
uint8_t hour = 0,
uint8_t minute = 0,
uint8_t second = 0,
- FX_WORD millisecond = 0);
+ uint16_t millisecond = 0);
virtual FX_BOOL FromUnitime(FX_UNITIME t);
virtual FX_UNITIME ToUnitime() const;
virtual int32_t GetYear() const;
virtual uint8_t GetMonth() const;
virtual uint8_t GetDay() const;
virtual FX_WEEKDAY GetDayOfWeek() const;
- virtual FX_WORD GetDayOfYear() const;
+ virtual uint16_t GetDayOfYear() const;
virtual int64_t GetDayOfAD() const;
virtual uint8_t GetHour() const;
virtual uint8_t GetMinute() const;
virtual uint8_t GetSecond() const;
- virtual FX_WORD GetMillisecond() const;
+ virtual uint16_t GetMillisecond() const;
virtual FX_BOOL AddYears(int32_t iYears);
virtual FX_BOOL AddMonths(int32_t iMonths);
virtual FX_BOOL AddDays(int32_t iDays);
diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp
index 6af9205d30..db94f766b5 100644
--- a/xfa/fgas/localization/fgas_locale.cpp
+++ b/xfa/fgas/localization/fgas_locale.cpp
@@ -629,14 +629,14 @@ FX_LOCALECATEGORY CFX_FormatString::GetCategory(
}
return eCategory;
}
-static FX_WORD FX_WStringToLCID(const FX_WCHAR* pstrLCID) {
+static uint16_t FX_WStringToLCID(const FX_WCHAR* pstrLCID) {
if (!pstrLCID) {
return 0;
}
wchar_t* pEnd;
- return (FX_WORD)wcstol((wchar_t*)pstrLCID, &pEnd, 16);
+ return (uint16_t)wcstol((wchar_t*)pstrLCID, &pEnd, 16);
}
-FX_WORD CFX_FormatString::GetLCID(const CFX_WideString& wsPattern) {
+uint16_t CFX_FormatString::GetLCID(const CFX_WideString& wsPattern) {
return FX_WStringToLCID(GetLocaleName(wsPattern));
}
CFX_WideString CFX_FormatString::GetLocaleName(
@@ -2386,7 +2386,7 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate,
}
} else if (dwSymbol == FXBSTR_ID(0, 0, 'M', '3')) {
CFX_WideString wsMonthNameAbbr;
- FX_WORD i = 0;
+ uint16_t i = 0;
for (; i < 12; i++) {
pLocale->GetMonthName(i, wsMonthNameAbbr, TRUE);
if (wsMonthNameAbbr.IsEmpty()) {
@@ -2403,7 +2403,7 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate,
}
} else if (dwSymbol == FXBSTR_ID(0, 0, 'M', '4')) {
CFX_WideString wsMonthName;
- FX_WORD i = 0;
+ uint16_t i = 0;
for (; i < 12; i++) {
pLocale->GetMonthName(i, wsMonthName, FALSE);
if (wsMonthName.IsEmpty()) {
@@ -2422,7 +2422,7 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate,
cc += 1;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'E', '3')) {
CFX_WideString wsDayNameAbbr;
- FX_WORD i = 0;
+ uint16_t i = 0;
for (; i < 7; i++) {
pLocale->GetDayName(i, wsDayNameAbbr, TRUE);
if (wsDayNameAbbr.IsEmpty()) {
@@ -2529,7 +2529,7 @@ static FX_BOOL FX_ParseLocaleTime(const CFX_WideString& wsTime,
uint8_t hour = 0;
uint8_t minute = 0;
uint8_t second = 0;
- FX_WORD millisecond = 0;
+ uint16_t millisecond = 0;
int32_t ccf = 0;
const FX_WCHAR* str = (const FX_WCHAR*)wsTime;
int len = wsTime.GetLength();
@@ -3768,7 +3768,7 @@ FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate,
int32_t year = 1900;
int32_t month = 1;
int32_t day = 1;
- FX_WORD wYear = 0;
+ uint16_t wYear = 0;
int cc_start = 0, cc = 0;
const FX_WCHAR* str = (const FX_WCHAR*)wsDate;
int len = wsDate.GetLength();
@@ -3851,7 +3851,7 @@ FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime,
uint8_t hour = 0;
uint8_t minute = 0;
uint8_t second = 0;
- FX_WORD millisecond = 0;
+ uint16_t millisecond = 0;
int cc_start = 0, cc = cc_start;
const FX_WCHAR* str = (const FX_WCHAR*)wsTime.GetPtr();
int len = wsTime.GetLength();
@@ -3923,7 +3923,7 @@ FX_BOOL FX_TimeFromCanonical(const CFX_WideStringC& wsTime,
datetime = datetime + ut;
return TRUE;
}
-static FX_WORD FX_GetSolarMonthDays(FX_WORD year, FX_WORD month) {
+static uint16_t FX_GetSolarMonthDays(uint16_t year, uint16_t month) {
if (month % 2) {
return 31;
} else if (month == 2) {
@@ -3931,9 +3931,9 @@ static FX_WORD FX_GetSolarMonthDays(FX_WORD year, FX_WORD month) {
}
return 30;
}
-static FX_WORD FX_GetWeekDay(FX_WORD year, FX_WORD month, FX_WORD day) {
- FX_WORD g_month_day[] = {0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5};
- FX_WORD nDays =
+static uint16_t FX_GetWeekDay(uint16_t year, uint16_t month, uint16_t day) {
+ uint16_t g_month_day[] = {0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5};
+ uint16_t nDays =
(year - 1) % 7 + (year - 1) / 4 - (year - 1) / 100 + (year - 1) / 400;
nDays += g_month_day[month - 1] + day;
if (FX_IsLeapYear(year) && month > 2) {
@@ -3941,9 +3941,9 @@ static FX_WORD FX_GetWeekDay(FX_WORD year, FX_WORD month, FX_WORD day) {
}
return nDays % 7;
}
-static FX_WORD FX_GetWeekOfMonth(FX_WORD year, FX_WORD month, FX_WORD day) {
- FX_WORD week_day = FX_GetWeekDay(year, month, 1);
- FX_WORD week_index = 0;
+static uint16_t FX_GetWeekOfMonth(uint16_t year, uint16_t month, uint16_t day) {
+ uint16_t week_day = FX_GetWeekDay(year, month, 1);
+ uint16_t week_index = 0;
week_index += day / 7;
day = day % 7;
if (week_day + day > 7) {
@@ -3951,14 +3951,14 @@ static FX_WORD FX_GetWeekOfMonth(FX_WORD year, FX_WORD month, FX_WORD day) {
}
return week_index;
}
-static FX_WORD FX_GetWeekOfYear(FX_WORD year, FX_WORD month, FX_WORD day) {
- FX_WORD nDays = 0;
- for (FX_WORD i = 1; i < month; i++) {
+static uint16_t FX_GetWeekOfYear(uint16_t year, uint16_t month, uint16_t day) {
+ uint16_t nDays = 0;
+ for (uint16_t i = 1; i < month; i++) {
nDays += FX_GetSolarMonthDays(year, i);
}
nDays += day;
- FX_WORD week_day = FX_GetWeekDay(year, 1, 1);
- FX_WORD week_index = 1;
+ uint16_t week_day = FX_GetWeekDay(year, 1, 1);
+ uint16_t week_index = 1;
week_index += nDays / 7;
nDays = nDays % 7;
if (week_day + nDays > 7) {
@@ -4002,7 +4002,7 @@ static FX_BOOL FX_DateFormat(const CFX_WideString& wsDatePattern,
wsDay.Format(L"%02d", day);
wsResult += wsDay;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'J', '1')) {
- FX_WORD nDays = 0;
+ uint16_t nDays = 0;
for (int i = 1; i < month; i++) {
nDays += FX_GetSolarMonthDays(year, i);
}
@@ -4011,7 +4011,7 @@ static FX_BOOL FX_DateFormat(const CFX_WideString& wsDatePattern,
wsDays.Format(L"%d", nDays);
wsResult += wsDays;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'J', '3')) {
- FX_WORD nDays = 0;
+ uint16_t nDays = 0;
for (int i = 1; i < month; i++) {
nDays += FX_GetSolarMonthDays(year, i);
}
@@ -4036,24 +4036,24 @@ static FX_BOOL FX_DateFormat(const CFX_WideString& wsDatePattern,
pLocale->GetMonthName(month - 1, wsTemp, FALSE);
wsResult += wsTemp;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'E', '1')) {
- FX_WORD wWeekDay = FX_GetWeekDay(year, month, day);
+ uint16_t wWeekDay = FX_GetWeekDay(year, month, day);
CFX_WideString wsWeekDay;
wsWeekDay.Format(L"%d", wWeekDay + 1);
wsResult += wsWeekDay;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'E', '3')) {
- FX_WORD wWeekDay = FX_GetWeekDay(year, month, day);
+ uint16_t wWeekDay = FX_GetWeekDay(year, month, day);
CFX_WideString wsTemp;
pLocale->GetDayName(wWeekDay, wsTemp, TRUE);
wsResult += wsTemp;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'E', '4')) {
- FX_WORD wWeekDay = FX_GetWeekDay(year, month, day);
+ uint16_t wWeekDay = FX_GetWeekDay(year, month, day);
if (pLocale) {
CFX_WideString wsTemp;
pLocale->GetDayName(wWeekDay, wsTemp, FALSE);
wsResult += wsTemp;
}
} else if (dwSymbol == FXBSTR_ID(0, 0, 'e', '1')) {
- FX_WORD wWeekDay = FX_GetWeekDay(year, month, day);
+ uint16_t wWeekDay = FX_GetWeekDay(year, month, day);
CFX_WideString wsWeekDay;
wsWeekDay.Format(L"%d", wWeekDay ? wWeekDay : 7);
wsResult += wsWeekDay;
@@ -4070,12 +4070,12 @@ static FX_BOOL FX_DateFormat(const CFX_WideString& wsDatePattern,
wsYear.Format(L"%d", year);
wsResult += wsYear;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'w', '1')) {
- FX_WORD week_index = FX_GetWeekOfMonth(year, month, day);
+ uint16_t week_index = FX_GetWeekOfMonth(year, month, day);
CFX_WideString wsWeekInMonth;
wsWeekInMonth.Format(L"%d", week_index);
wsResult += wsWeekInMonth;
} else if (dwSymbol == FXBSTR_ID(0, 0, 'W', '2')) {
- FX_WORD week_index = FX_GetWeekOfYear(year, month, day);
+ uint16_t week_index = FX_GetWeekOfYear(year, month, day);
CFX_WideString wsWeekInYear;
wsWeekInYear.Format(L"%02d", week_index);
wsResult += wsWeekInYear;
@@ -4092,11 +4092,11 @@ static FX_BOOL FX_TimeFormat(const CFX_WideString& wsTimePattern,
uint8_t hour = datetime.GetHour();
uint8_t minute = datetime.GetMinute();
uint8_t second = datetime.GetSecond();
- FX_WORD millisecond = datetime.GetMillisecond();
+ uint16_t millisecond = datetime.GetMillisecond();
int32_t ccf = 0;
const FX_WCHAR* strf = (const FX_WCHAR*)wsTimePattern;
int32_t lenf = wsTimePattern.GetLength();
- FX_WORD wHour = hour;
+ uint16_t wHour = hour;
FX_BOOL bPM = FALSE;
if (wsTimePattern.Find('A') != -1) {
if (wHour >= 12) {
diff --git a/xfa/fgas/localization/fgas_locale.h b/xfa/fgas/localization/fgas_locale.h
index a7e14b3c26..3dd6c79fb7 100644
--- a/xfa/fgas/localization/fgas_locale.h
+++ b/xfa/fgas/localization/fgas_locale.h
@@ -87,13 +87,13 @@ class IFX_LocaleMgr {
public:
virtual ~IFX_LocaleMgr() {}
virtual void Release() = 0;
- virtual FX_WORD GetDefLocaleID() = 0;
+ virtual uint16_t GetDefLocaleID() = 0;
virtual IFX_Locale* GetDefLocale() = 0;
- virtual IFX_Locale* GetLocale(FX_WORD lcid) = 0;
+ virtual IFX_Locale* GetLocale(uint16_t lcid) = 0;
virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName) = 0;
};
IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath,
- FX_WORD wDefaultLCID);
+ uint16_t wDefaultLCID);
void FX_ParseNumString(const CFX_WideString& wsNum, CFX_WideString& wsResult);
FX_BOOL FX_DateFromCanonical(const CFX_WideString& wsDate,
CFX_Unitime& datetime);
@@ -109,7 +109,7 @@ class IFX_FormatString {
virtual void SplitFormatString(const CFX_WideString& wsFormatString,
CFX_WideStringArray& wsPatterns) = 0;
virtual FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern) = 0;
- virtual FX_WORD GetLCID(const CFX_WideString& wsPattern) = 0;
+ virtual uint16_t GetLCID(const CFX_WideString& wsPattern) = 0;
virtual CFX_WideString GetLocaleName(const CFX_WideString& wsPattern) = 0;
virtual FX_BOOL ParseText(const CFX_WideString& wsSrcText,
const CFX_WideString& wsPattern,
diff --git a/xfa/fgas/localization/fgas_localeimp.h b/xfa/fgas/localization/fgas_localeimp.h
index f4b2b0ec8a..1eeaa418ca 100644
--- a/xfa/fgas/localization/fgas_localeimp.h
+++ b/xfa/fgas/localization/fgas_localeimp.h
@@ -52,7 +52,7 @@ class CFX_FormatString : public IFX_FormatString {
virtual void SplitFormatString(const CFX_WideString& wsFormatString,
CFX_WideStringArray& wsPatterns);
virtual FX_LOCALECATEGORY GetCategory(const CFX_WideString& wsPattern);
- virtual FX_WORD GetLCID(const CFX_WideString& wsPattern);
+ virtual uint16_t GetLCID(const CFX_WideString& wsPattern);
virtual CFX_WideString GetLocaleName(const CFX_WideString& wsPattern);
virtual FX_BOOL ParseText(const CFX_WideString& wsSrcText,
const CFX_WideString& wsPattern,
diff --git a/xfa/fgas/localization/fgas_localemgr.cpp b/xfa/fgas/localization/fgas_localemgr.cpp
index 4ed8ddb79a..02061f75f3 100644
--- a/xfa/fgas/localization/fgas_localemgr.cpp
+++ b/xfa/fgas/localization/fgas_localemgr.cpp
@@ -9,7 +9,7 @@
#include "core/include/fxcrt/fx_xml.h"
IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath,
- FX_WORD wDefaultLCID) {
+ uint16_t wDefaultLCID) {
void* pPathHandle = FX_OpenFolder(pszLocalPath);
if (!pPathHandle) {
return NULL;
@@ -53,7 +53,7 @@ IFX_LocaleMgr* FX_LocaleMgr_Create(const FX_WCHAR* pszLocalPath,
FX_CloseFolder(pPathHandle);
return pLocaleMgr;
}
-CFX_LocaleMgr::CFX_LocaleMgr(FX_WORD wDefLCID) : m_wDefLCID(wDefLCID) {}
+CFX_LocaleMgr::CFX_LocaleMgr(uint16_t wDefLCID) : m_wDefLCID(wDefLCID) {}
CFX_LocaleMgr::~CFX_LocaleMgr() {
FX_POSITION ps = m_lcid2locale.GetStartPosition();
while (ps) {
@@ -72,13 +72,13 @@ CFX_LocaleMgr::~CFX_LocaleMgr() {
}
m_lcid2xml.RemoveAll();
}
-FX_WORD CFX_LocaleMgr::GetDefLocaleID() {
+uint16_t CFX_LocaleMgr::GetDefLocaleID() {
return m_wDefLCID;
}
IFX_Locale* CFX_LocaleMgr::GetDefLocale() {
return GetLocale(m_wDefLCID);
}
-IFX_Locale* CFX_LocaleMgr::GetLocale(FX_WORD lcid) {
+IFX_Locale* CFX_LocaleMgr::GetLocale(uint16_t lcid) {
IFX_Locale* pLocale =
(IFX_Locale*)m_lcid2locale.GetValueAt((void*)(uintptr_t)lcid);
if (!pLocale) {
diff --git a/xfa/fgas/localization/fgas_localemgr.h b/xfa/fgas/localization/fgas_localemgr.h
index 5ae0d738cb..5f2647071b 100644
--- a/xfa/fgas/localization/fgas_localemgr.h
+++ b/xfa/fgas/localization/fgas_localemgr.h
@@ -11,18 +11,18 @@
class CFX_LocaleMgr : public IFX_LocaleMgr {
public:
- CFX_LocaleMgr(FX_WORD wDefLCID);
+ CFX_LocaleMgr(uint16_t wDefLCID);
virtual void Release() { delete this; }
- virtual FX_WORD GetDefLocaleID();
+ virtual uint16_t GetDefLocaleID();
virtual IFX_Locale* GetDefLocale();
- virtual IFX_Locale* GetLocale(FX_WORD lcid);
+ virtual IFX_Locale* GetLocale(uint16_t lcid);
virtual IFX_Locale* GetLocaleByName(const CFX_WideStringC& wsLocaleName);
CFX_MapPtrToPtr m_lcid2xml;
protected:
~CFX_LocaleMgr();
CFX_MapPtrToPtr m_lcid2locale;
- FX_WORD m_wDefLCID;
+ uint16_t m_wDefLCID;
};
#endif // XFA_FGAS_LOCALIZATION_FGAS_LOCALEMGR_H_